local-ai-lord

local-ai-lord is a skill for Claude Code, Codex from m3taz-ahmed/ai-globals. It costs 52 tokens per session (1,512 once invoked), scanned A, original, MIT.

A guide to running AI models on a local computer or edge device instead of relying entirely on a remote service. It covers model runtimes, smaller model formats, graphics hardware, and local or mixed local-cloud setups.

In plain words
What is it for?
It is for selecting a local model runtime, choosing quantization, using GPU acceleration, exposing an AI API, and planning local-cloud fallback.
Why use it?
It can reduce dependence on network access and remote APIs, while requiring careful choices about computer hardware, speed, memory, and model quality.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for selecting a local model runtime, choosing quantization, using GPU acceleration, exposing an AI API, and planning local-cloud fallback.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/m3taz-ahmed/ai-globals/local-ai-lord
Install

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.

Any agent
npx skills add m3taz-ahmed/ai-globals --skill local-ai-lord
Clone the repo
git clone --depth 1 https://github.com/m3taz-ahmed/ai-globals

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for local-ai-lord

README.md
[![agentmods](https://agentmods.dev/badge/skills/m3taz-ahmed/ai-globals/local-ai-lord/github.svg)](https://agentmods.dev/skills/m3taz-ahmed/ai-globals/local-ai-lord)
Your own site
<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.

agentmods 80×15 button for local-ai-lord

Your own site · 80×15
<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>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,512 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 4d ago against content hash 254844925ab3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

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.

skills/local-ai-lord/SKILL.md · 64 lines

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

  1. [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.
  2. [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.
  3. [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.
  4. [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.
  5. [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.
  6. [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.
  7. [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.
  8. [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.
  9. [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.
  10. [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.
  11. [REQ] Security — network binding. Bind to 127.0.0.1 or localhost by default. Never bind to 0.0.0.0 without auth. If remote access needed, use a reverse proxy (nginx/caddy) with TLS + authentication. Exposed local AI = unauthenticated LLM access = prompt injection attack surface.
  12. [REQ] Security — auth. If the local API is network-accessible, require API key authentication. Ollama: use a reverse proxy with auth. vLLM: --api-key flag. LM Studio: not designed for remote — use proxy. No unauthenticated network-exposed AI endpoint.
  13. [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.
  14. [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.
  15. [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.
  16. [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.

Read the full file on GitHub · 64 lines

Changes

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.

  1. 4d ago Changed · +1 lines 254844925ab3
  2. 6d ago First seen · 63 lines · 52 tokens per session scan A 20b35ef8e206

Subscribe to this mod's changes

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.

Related

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…

google/skills · 85 tokens

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.

google/skills · 60 tokens

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.

microsoft/agent-framework · 65 tokens

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…

google/skills · 138 tokens

training-check

Interactively monitor training metrics from the current Codex session, periodically checking WandB or fallback logs for NaN, divergence, plateaus, and broken runs.

wanshuiyin/Auto-claude-code-research-in-sleep · 35 tokens

nemo-automodel-launcher-config

Configure NeMo AutoModel job launches for interactive runs, Slurm clusters, and SkyPilot cloud execution.

NVIDIA/skills · 30 tokens