Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add m3taz-ahmed/ai-globals --skill local-ai-lordgit clone --depth 1 https://github.com/m3taz-ahmed/ai-globalsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/m3taz-ahmed/ai-globals/local-ai-lord)<a href="https://agentmods.dev/skills/m3taz-ahmed/ai-globals/local-ai-lord"><img src="https://agentmods.dev/badge/skills/m3taz-ahmed/ai-globals/local-ai-lord/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/m3taz-ahmed/ai-globals/local-ai-lord"><img src="https://agentmods.dev/badge/skills/m3taz-ahmed/ai-globals/local-ai-lord.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00052 | $0.01512 |
| Opus 5 | $0.00026 | $0.00756 |
| Sonnet 5 | $0.00010 | $0.00302 |
| Haiku 4.5 | $0.00005 | $0.00151 |
Grade A, and why
local-ai-lord scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Local AI Lord
[OBJ] Deploy and operate AI models locally and at the edge — runtime selection, quantization, GPU acceleration, monitoring, and security — with hybrid local+cloud fallback patterns.
Problem
Cloud AI APIs have per-token costs, latency, data residency constraints, and availability dependencies. Local AI eliminates per-token cost, keeps data on-device, and works offline — but requires careful runtime selection, quantization tradeoffs, GPU management, and security hardening. A wrong runtime or quantization choice turns a fast local model into a slow, OOM-crashing mess.
Rules
- [REQ] Local runtime selection. Ollama 0.33 (easiest, model management, OpenAI-compatible API), LM Studio 0.4.0 (GUI, model discovery, OpenAI-compatible), Jan (open-source, cross-platform), GPT4All (CPU-first, lightweight), llama.cpp (max control, C++, every platform), vLLM 0.28 (high-throughput server, GPU, PagedAttention), LocalAI (drop-in OpenAI replacement, multi-model), Tabby (code completion focused), Apple MLX (Apple Silicon optimized). Match runtime to hardware and use case.
- [REQ] Model selection and quantization. Default to Q4_K_M (good quality/size balance) or Q5_K_M (higher quality, larger). GGUF format for Ollama/llama.cpp/LM Studio. Test quality degradation vs the full-precision model on your task — do not assume Q4 is "good enough" without measurement.
- [REQ] GPU acceleration. CUDA (NVIDIA, most supported), Metal (Apple Silicon, MLX/llama.cpp), ROCm (AMD, Linux), Vulkan (cross-vendor, llama.cpp), WebGPU (browser, experimental). Verify GPU is actually used — check VRAM utilization, not just that it doesn't error.
- [REQ] Memory management. Model must fit in VRAM/RAM with headroom for context. Rule of thumb: model size × 1.3 (overhead). If model + context > VRAM, it spills to CPU = 10-100× slower. Monitor VRAM usage; OOM kills are silent in some runtimes.
- [REQ] Context window optimization. Larger context = more VRAM + slower. Set context to the actual need, not the model max. Use context caching (vLLM prefix caching, Ollama keep_alive) for repeated system prompts. Rotating context (sliding window) for long conversations.
- [REQ] OpenAI-compatible API. Expose a local OpenAI-compatible endpoint (Ollama, LM Studio, vLLM, LocalAI all support this). Applications talk to
http://localhost:PORT/v1/chat/completions. Enables swapping local ↔ cloud by changing the base URL. No application code changes needed. - [REQ] Batch vs streaming inference. Use streaming for interactive UX (token-by-token display). Use batch for throughput (process multiple requests together — vLLM continuous batching). Never batch interactive requests — latency per token matters more than throughput.
- [REQ] Concurrent requests. vLLM supports high concurrency via continuous batching. Ollama supports sequential or limited parallel (OLLAMA_NUM_PARALLEL). LM Studio supports limited concurrent. Match concurrency setting to hardware — too high = OOM, too low = poor throughput.
- [REQ] Caching strategies. Prefix caching (cache the system prompt + few-shot examples — vLLM, SGLang support this). Semantic caching (cache similar queries — use a vector DB). KV cache reuse across requests with same prefix. Caching reduces latency and cost for repeated patterns.
- [REQ] Monitoring. Track: GPU memory utilization, GPU temperature, queue depth, tokens/sec, time-to-first-token (TTFT), request latency P50/P95, OOM events, model load time. Alert on VRAM >90%, queue depth > threshold, TTFT regression. No local deployment without monitoring.
- [REQ] Security — network binding. Bind to
127.0.0.1orlocalhostby default. Never bind to0.0.0.0without auth. If remote access needed, use a reverse proxy (nginx/caddy) with TLS + authentication. Exposed local AI = unauthenticated LLM access = prompt injection attack surface. - [REQ] Security — auth. If the local API is network-accessible, require API key authentication. Ollama: use a reverse proxy with auth. vLLM:
--api-keyflag. LM Studio: not designed for remote — use proxy. No unauthenticated network-exposed AI endpoint. - [REQ] Security — sandboxing. If the local AI executes tools or code (agent mode), sandbox the execution environment: Docker container, gVisor, or seccomp. No local AI agent with tool execution runs without sandboxing — prompt injection can invoke tools.
- [REQ] Cost comparison with cloud. Calculate break-even: (cloud cost per 1M tokens) × (monthly token volume) vs (hardware cost / amortization + electricity). Local wins at high volume. Cloud wins at low volume or spiky load. Document the analysis — do not assume local is always cheaper.
- [REQ] Hybrid local+cloud patterns. Route by task: local for simple/fast/private tasks, cloud for complex/high-quality tasks. Use a gateway (Portkey, LiteLLM, OpenRouter) to route based on task type, latency budget, or data sensitivity. Fallback: if local is overloaded, route to cloud. No hard dependency on either.
- [PROHIBIT] Exposing a local AI endpoint to the network without TLS + authentication, or running a local AI agent with tool execution outside a sandbox — these are critical security failures.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago Changed · +1 lines 254844925ab3
- 6d ago First seen · 63 lines · 52 tokens per session scan A 20b35ef8e206
local-ai-lord is a skill published in the GitHub repository m3taz-ahmed/ai-globals (5 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 1,512 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-06.
Other skills, from other repositories
agent-platform-rag-engine-management
Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…
agent-platform-model-registry
Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.
foundry-config-setup
Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.
google-cloud-solution-agentic-analytics-spark-knowledge-catalog
Discovers requirements and generates guidance to design and deploy a governed, secure agentic-analytics solution for data that's distributed across Google Cloud, other cloud providers, or on-premises. Data that's outside Google Cloud (such as data from Databricks, Snowflake, Salesforce, SAP, or Oracle systems) is…
training-check
Interactively monitor training metrics from the current Codex session, periodically checking WandB or fallback logs for NaN, divergence, plateaus, and broken runs.
nemo-automodel-launcher-config
Configure NeMo AutoModel job launches for interactive runs, Slurm clusters, and SkyPilot cloud execution.