mac-code-local-ai-agent — Claude Code skill: local AI agent on Mac
A skill that walks you through running a coding agent entirely on your Apple Silicon Mac, with no cloud calls and no subscription.
npx skills add reason-machines/trending-skills --skill mac-code-local-ai-agent -a claude-codeWhat mac-code-local-ai-agent does
The skill covers setup and use of mac-code, a command-line coding agent that picks its own path for each prompt: a web lookup, a shell command, or a plain answer. The model acts as a router and sorts every request into one of those three buckets. Its tools are DuckDuckGo search, shell execution, and file reads and writes.
Two backends are documented. With llama.cpp you get a 35B MoE model at roughly 30 tok/s using IQ2_M quantization, which fits inside 16 GB of memory; a 9B option reaches a 64K context through a quantized KV cache. MLX adds KV cache save and load, context compression, and sync through Cloudflare R2. R2 sync needs credentials in environment variables, so without them the context download will not run.
Before anything starts, install llama.cpp with Homebrew and the rich, ddgs, huggingface-hub, and mlx-lm packages with pip. Models are pulled from Hugging Face into ~/models. The backend listens on 127.0.0.1:8000, and the agent starts with python3 agent.py. Inside the REPL you get commands such as /model 9b, /search, /bench, and /stats.
What it helps with
- fit a 35B model into 16 GB of RAM
- switch between a fast model and a 64K context
- save a KV cache after reading a large codebase
- sync context between two Macs over R2
- benchmark local inference speed
Example prompts for the agent
- Set up a local AI agent on my Mac with llama.cpp
- Switch to the 9b model with 64K context
- Save the project context as my-project
How to install mac-code-local-ai-agent
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill mac-code-local-ai-agent -a claude-code2Manually: put the files in place
~/.claude/skills/mac-code-local-ai-agent/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/mac-code-local-ai-agent/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill mac-code-local-ai-agent -a codex2Manually: put the files in place
.agents/skills/mac-code-local-ai-agent/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill mac-code-local-ai-agent -a cursor2Manually: put the files in place
.cursor/skills/mac-code-local-ai-agent/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/trending-skills mac-code-local-ai-agent2Manually: put the files in place
.github/skills/mac-code-local-ai-agent/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill mac-code-local-ai-agent -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/trending-skills --path skills/mac-code-local-ai-agentManually: put the files in place
.devin/skills/mac-code-local-ai-agent/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill mac-code-local-ai-agent -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about mac-code-local-ai-agent
How do I install mac-code-local-ai-agent in Claude Code?
Run npx skills add reason-machines/trending-skills --skill mac-code-local-ai-agent -a claude-code. The skill lands in ~/.claude/skills/mac-code-local-ai-agent/SKILL.md.
What does mac-code-local-ai-agent do?
It documents how to run a local coding agent on Apple Silicon, where the model decides between a web search, a shell command, or a direct reply.
Which backends does it support?
llama.cpp and MLX. The first gives a 35B MoE model at about 30 tok/s or a 9B model with 64K context; the second adds KV cache persistence and R2 sync.