# mac-code-local-ai-agent

A skill that walks you through running a coding agent entirely on your Apple Silicon Mac, with no cloud calls and no subscription.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 843 installs · ★ 88
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/mac-code-local-ai-agent/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/mac-code-local-ai-agent

## What it 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`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill mac-code-local-ai-agent -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/mac-code-local-ai-agent/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/mac-code-local-ai-agent/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill mac-code-local-ai-agent -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/mac-code-local-ai-agent/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill mac-code-local-ai-agent -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/mac-code-local-ai-agent/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/trending-skills mac-code-local-ai-agent
```

2. **Manually: put the files in place**
- File: `.github/skills/mac-code-local-ai-agent/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill mac-code-local-ai-agent -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/trending-skills --path skills/mac-code-local-ai-agent
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/mac-code-local-ai-agent/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill mac-code-local-ai-agent -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/mac-code-local-ai-agent/SKILL.md

## When to use it
- 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
- 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

## Similar
- [setup-matt-pocock-skills](https://affpapa.org/en/nevibecode/skills/setup-matt-pocock-skills.md) — skill · 1052851 installs
- [ask-matt](https://affpapa.org/en/nevibecode/skills/ask-matt.md) — skill · 766587 installs
- [to-tickets](https://affpapa.org/en/nevibecode/skills/to-tickets.md) — skill · 711230 installs
- [writing-plans](https://affpapa.org/en/nevibecode/skills/writing-plans.md) — skill · 282859 installs
- [caveman-review](https://affpapa.org/en/nevibecode/skills/caveman-review.md) — skill · 411800 installs
- [caveman-compress](https://affpapa.org/en/nevibecode/skills/caveman-compress.md) — skill · 411500 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 186 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
