Agent skill

Setup Ollama Local

by receptron in receptron/mulmoclaude

Interactively guide setup for connecting the Claude Code CLI to a local Ollama LLM on Mac.

MITAuto-check: notesAI & LLM Engineering

Install Setup Ollama Local

skills CLI
$ npx skills add receptron/mulmoclaude --skill setup-ollama-local -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install receptron/mulmoclaude setup-ollama-local --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/receptron/mulmoclaude.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/setup-ollama-local .claude/skills/setup-ollama-local && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
setup-ollama-local
GitHub stars
371
Token cost
~1.9k tokens
SKILL.md length
785 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

Interactively guide setup for connecting the Claude Code CLI to a local Ollama LLM on Mac.

  • Works in 8 steps: Verify / install Ollama → Verify Claude Code → Choose and pull a model → …
  • Tasks that involve LLM inference and serving
  • SKILL.md covers Prerequisites / 前提知識, Step 1: Verify / install Ollama, Step 2: Verify Claude Code and Step 3: Choose and pull a model, plus 7 more sections
  • Calls ollama, brew and claude; reaches claude.ai; needs ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN

What it does

Setup Ollama Local is an agent skill from receptron/mulmoclaude. Interactively guide setup for connecting the Claude Code CLI to a local Ollama LLM on Mac. NOTE — This is for the standalone Claude Code CLI itself, NOT MulmoClaude (MulmoClaude does not currently support Ollama as a backend). Covers Ollama install, model pull, env switching, and verification. Respond in the user's language.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering LLM inference and serving. It works with Ollama and Homebrew. The repository describes itself as: Nurture your own AI assistant on your own computer. Local-first and MIT: memories, data and apps stay as plain files in your workspace. Chat summons the right GUI — wiki… The licence is MIT.

When your agent uses it

  • Tasks that involve LLM inference and serving

Example prompts

  • “/setup-ollama-local”

Requirements

  • Node.js
  • A credential in ANTHROPIC_AUTH_TOKEN
  • A credential in ANTHROPIC_API_KEY
  • Pre-approved tools (allowed-tools): Read, Bash, Glob, Grep

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Verify / install Ollama
  2. Verify Claude Code
  3. Choose and pull a model
  4. Start Ollama with the right context window
  5. Warm up the model
  6. Run Claude Code against Ollama
  7. Switching back to cloud Claude
  8. (optional): Convenience alias

What it can do on your machine

Read from SKILL.md and the folder at commit 3c609e5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Bash
    • Glob
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • ollama
    • brew
    • claude
    • curl
    • npm
    • sh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • claude.ai

    Also links to:

    • ollama.com
    • docs.ollama.com
    • code.claude.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • ANTHROPIC_API_KEY
    • ANTHROPIC_AUTH_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Setup Ollama Local loads about 1.9k tokens when it runs. Until then it costs about 86 tokens; SKILL.md has 785 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~86
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePipes a well-known installer script into a shellSKILL.md:58
    - `curl -fsSL https://claude.ai/install.sh | sh`
  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Bash, Glob, Grep

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from receptron/mulmoclaude at commit 3c609e5, republished under its MIT licence (© receptron). 785 words, ~1,933 tokens.

Download SKILL.mdSave it as .claude/skills/setup-ollama-local/SKILL.md (or your agent's skills folder).
name
setup-ollama-local
description
Interactively guide setup for connecting the Claude Code CLI to a local Ollama LLM on Mac. NOTE — This is for the standalone Claude Code CLI itself, NOT MulmoClaude (MulmoClaude does not currently support Ollama as a backend). Covers Ollama install, model pull, env switching, and verification. Respond in the user's language.
allowed-tools
Read, Bash, Glob, Grep

Setup Claude Code × Ollama (local LLM)

Scope / 適用範囲

This skill sets up the standalone claude CLI to talk to a local Ollama server. It is independent of MulmoClaude; MulmoClaude itself does not currently support Ollama (see plans/feat-mulmoclaude-ollama-support.md for a tentative plan).

このスキルは claude CLI 単体をローカルの Ollama サーバに接続するセットアップです。MulmoClaude とは独立しており、MulmoClaude 本体は現在 Ollama 接続をサポートしていません(実装案は plans/feat-mulmoclaude-ollama-support.md を参照)。

For detailed findings and pitfalls, see docs/tips/claude-code-ollama.md (Japanese) / docs/tips/claude-code-ollama.en.md (English).

Prerequisites / 前提知識

  • Ollama v0.14.0 or later is required (Anthropic Messages API compatibility was added in that version).
  • Claude Code sends roughly 50,000–57,000 tokens per request, so the model needs at least a 64k context window.
  • 3B-class small models effectively cannot drive Claude Code (no tool calling, broken templates).
  • Even on supported models, the first turn often takes 10+ minutes on a MacBook Air; subsequent turns benefit from KV cache and drop to 1–3 minutes.

Step 1: Verify / install Ollama

1-1. Check existing install
bash
which ollama && ollama --version
  • Installed and v0.14.0+: proceed to 1-2.
  • Older version: brew upgrade ollama and then brew services restart ollama (Homebrew installs).
  • Not installed: suggest one of:
1-2. Verify the server is running
bash
curl -s http://localhost:11434/api/tags | head -c 200
  • Got JSON back: server is up, go to Step 2.
  • Empty / connection refused: start it.
    • Official app: click the Ollama menu-bar icon.
    • Homebrew: brew services start ollama or ollama serve.

Step 2: Verify Claude Code

bash
which claude && claude --version
  • Installed: continue to Step 3.
  • Not installed: install via npm (recommended), the official script, or Homebrew:
    • npm install -g @anthropic-ai/claude-code
    • curl -fsSL https://claude.ai/install.sh | sh
    • brew install anthropic/tap/claude-code

Step 3: Choose and pull a model

Confirm the user's RAM and use case before recommending. Verified working models on a MacBook Air M4 32GB are summarized in docs/tips/claude-code-ollama.md. Quick picks:

RAMRecommendedSizeNotes
8–16GB(Claude Code × Ollama is impractical here)—Cold start exceeds 10 min timeout
32GBqwen3.5:9b6.6GBMost practical, lightest fit
32GBqwen3.6:35b-a3b23GBMoE (3B active), heavier but works
16–32GBgemma4:e4b3GB on disk (~10.9 GiB resident)Verified on 32GB; thinking blocks render correctly
24GB+ (NVIDIA)glm-4.7-flash19GB198k context, untested on Mac

Avoid: qwen3:14b (40k training limit), qwen2.5-coder:14b (older runner ignores OLLAMA_CONTEXT_LENGTH), gemma4:26b (Content block parse errors — note: gemma4:e4b is fine), gpt-oss:20b (Ollama template bug). See findings doc for details.

bash
ollama pull <model>
ollama list

Step 4: Start Ollama with the right context window

Claude Code requires ≥64k context. The default is 32k, so always extend it when launching Ollama for Claude Code:

bash
brew services stop ollama   # if running under brew services
OLLAMA_CONTEXT_LENGTH=65536 ollama serve

This terminal must stay open for the duration of the session. For longer sessions add OLLAMA_KEEP_ALIVE=30m so the KV cache survives idle gaps.

Step 5: Warm up the model

In a second terminal, load the model into memory and confirm it responds at all:

bash
ollama run <model> "hello"

Expect a response within a few seconds. If this hangs, the model is unsuitable for Claude Code.

Show full SKILL.md (339 more words)Show less

Step 6: Run Claude Code against Ollama

In a third terminal, set the env vars and launch:

bash
export ANTHROPIC_AUTH_TOKEN="ollama"
export ANTHROPIC_API_KEY=""
export ANTHROPIC_BASE_URL="http://localhost:11434"
claude --verbose --model <model>

Role of each variable:

VariableValuePurpose
ANTHROPIC_AUTH_TOKEN"ollama"Enables Ollama mode
ANTHROPIC_API_KEY"" (empty)Disables the cloud API key (prevents collision)
ANTHROPIC_BASE_URLhttp://localhost:11434Routes API calls to the local server

Send a simple message (e.g. "Hello, what model are you?") to confirm. The first turn can take 10+ minutes; subsequent turns drop to 1–3 minutes once the KV cache is warm.

While waiting, watch the Ollama log in another terminal to see what's happening:

bash
tail -f /opt/homebrew/var/log/ollama.log    # Homebrew install
# or just watch the terminal where `ollama serve` is running

Key log signals:

  • KvSize:65536 ✓ — context is correctly extended
  • truncating input prompt limit=XXXXX ✗ — model/runner ignores the env var; switch model
  • POST /v1/messages 200 ✓ — successful turn
  • POST /v1/messages 500 ✗ — template incompatibility; switch model

Step 7: Switching back to cloud Claude

The local mode is scoped to the terminal where the env vars were set:

  1. Easiest: close that terminal and open a fresh one — back to cloud.
  2. Or unset explicitly:
    bash
    unset ANTHROPIC_AUTH_TOKEN ANTHROPIC_API_KEY ANTHROPIC_BASE_URL

Step 8 (optional): Convenience alias

If the user wants a one-liner, suggest an alias in ~/.zshrc. Do not put bare export ANTHROPIC_BASE_URL=... lines in a startup file — that breaks normal cloud usage everywhere.

bash
alias claude-local='ANTHROPIC_AUTH_TOKEN="ollama" ANTHROPIC_API_KEY="" ANTHROPIC_BASE_URL="http://localhost:11434" claude'

After source ~/.zshrc, usage is:

bash
claude-local --model qwen3.5:9b   # local
claude                            # cloud, unchanged

Key pitfalls to highlight

  • Ollama < v0.14.0 has no Anthropic API compatibility — always check the version first.
  • ANTHROPIC_API_KEY must be explicitly empty; otherwise an existing cloud key may collide.
  • 3B-class models cannot reliably emit Claude's tool-use JSON, so file edits and shell commands fail.
  • Even tool-capable open models (Gemma 4, gpt-oss) are not fully aligned with Anthropic's response format — complex skill chains misbehave.
  • Large models (20B+) eat memory; watch with vm_stat or Activity Monitor.
  • Permanent export ANTHROPIC_BASE_URL=... in .zshrc / .bashrc will silently break normal cloud Claude usage. Use an alias instead.
  • The first-turn 10-minute Claude Code timeout is unavoidable, but Ollama keeps processing in the background, so a retry usually succeeds via cache reuse.

© receptron, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/setup-ollama-local of receptron/mulmoclaude.

Open the folder on GitHubat commit 3c609e5

Compare with similar skills

Setup Ollama Local next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Setup Ollama Local compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Setup Ollama Local this skillreceptron/mulmoclaude371—~1.9kAutomated safety check: NotesMIT
Aider DelegateamElnagdy/delegate-skills2.3k2 repos~3kAutomated safety check: PassMIT
Perfupraullenchai/Rapid-MLX4k—~1.6kAutomated safety check: NotesCustom licence
Debug InferenceNVIDIA/OpenShell16k—~1.9kAutomated safety check: PassApache-2.0
Ideer Daily Paper ChatbotAI45Lab/iDeer416—~3kAutomated safety check: NotesAGPL-3.0
Integrate Modeltryonlabs/opentryon551—~1.1kAutomated safety check: PassCustom licence

Similar skills

  • Aider Delegate

    amElnagdy/delegate-skills

    Delegate a coding task to Aider (aider) as a background implementer, then review its diff and land it yourself.

    2.3k GitHub starsUsed in 2 repos~3k tokens
    AI & LLM EngineeringAuto-check passed
  • Perfup

    raullenchai/Rapid-MLX

    Autonomous performance optimization: research, PoC, benchmark, implement, review, PR

    4k GitHub stars~1.6k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Debug Inference

    NVIDIA/OpenShell

    Official

    Debug inference clients that use an attached provider and its native endpoint, including hosted APIs and host-local Ollama, vLLM, SGLang, TRT-LLM, LM Studio, or NIM.

    16k GitHub stars~1.9k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Use iDeer as a daily paper-reading workflow for chatbot-first users such as Codex, Gemini, or ChatGPT.

    416 GitHub stars~3k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check: notes
  • Integrate Model

    tryonlabs/opentryon

    Integrates a hosted API or local/open-weight model end-to-end across OpenTryOn (adapter, CLI registry, MCP, docs) and TryOn Studio (catalog, Connect keys, planner).

    551 GitHub stars~1.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Agent Framework

    jihadkhawaja/Egroo

    Build, extend, and debug AI agents in Egroo using the Microsoft Agent Framework (C .NET).

    178 GitHub stars~1.9k tokensUpdated 6 mo ago
    AI & LLM EngineeringAuto-check passed

More from receptron/mulmoclaude

All 17 skills in this repo
  • Mc Cooking Coach

    receptron/mulmoclaude

    Personal recipe book — save / read / update / delete cooking recipes as markdown files under data/cooking/recipes/, with a README.md index that lists every recipe.

    371 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Mc Manage Automations

    receptron/mulmoclaude

    Schedule, list, edit, or remove a recurring agent task (cron / interval) in config/scheduler/tasks.json.

    371 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Mc Manage Skills

    receptron/mulmoclaude

    Save, edit, list, or delete a Claude Code skill in this workspace.

    371 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Mc Wiki Ingest

    receptron/mulmoclaude

    Ingest a source (workspace file path or pasted text) into the wiki — write a summary page, cross-reference up to 5 related pages with [[links]], and append a log entry.

    371 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Mc Wiki Promote

    receptron/mulmoclaude

    Promote a chat exchange (the assistant's answer + the user's preceding question) into a wiki page — propose a slug + new-or-append target + draft body, show the proposal in the next assistant turn…

    371 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Mc Zenn

    receptron/mulmoclaude

    Turn MulmoClaude work into a Zenn tech article (markdown) inside the workspace.

    371 GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Questions about Setup Ollama Local

What does Setup Ollama Local do?

Interactively guide setup for connecting the Claude Code CLI to a local Ollama LLM on Mac. Setup Ollama Local is an agent skill from receptron/mulmoclaude. Interactively guide setup for connecting the Claude Code CLI to a local Ollama LLM on Mac.

When should I use Setup Ollama Local?

Setup Ollama Local fits situations like: tasks that involve LLM inference and serving.

How do I install Setup Ollama Local in Claude Code?

Run `npx skills add receptron/mulmoclaude --skill setup-ollama-local -a claude-code`. Or copy the skill folder (.claude/skills/setup-ollama-local in receptron/mulmoclaude) into .claude/skills/setup-ollama-local in your project. Claude Code loads it when a task matches its description.

How do I install Setup Ollama Local in Codex?

Run `npx skills add receptron/mulmoclaude --skill setup-ollama-local -a codex`. Or copy the skill folder (.claude/skills/setup-ollama-local in receptron/mulmoclaude) into .agents/skills/setup-ollama-local in your project. Codex loads it when a task matches its description.

Can I use Setup Ollama Local in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add receptron/mulmoclaude --skill setup-ollama-local -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/setup-ollama-local, .gemini/skills/setup-ollama-local, .github/skills/setup-ollama-local and .opencode/skills/setup-ollama-local in your project.

What does Setup Ollama Local need to run?

Going by SKILL.md and its folder, Setup Ollama Local needs the command-line tools its instructions call (ollama, brew, claude, curl, npm and sh) and credentials named ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN. Our summary lists: Node.js; A credential in ANTHROPIC_AUTH_TOKEN; A credential in ANTHROPIC_API_KEY. Its frontmatter pre-approves these tools: Read, Bash, Glob, Grep.

Does Setup Ollama Local access the network?

SKILL.md names 4 domains. In commands or code: claude.ai; the agent is likely to contact it when it follows the instructions. As links in the text: ollama.com, docs.ollama.com and code.claude.com. This is read from the text; nothing was executed.

Is Setup Ollama Local safe to install?

Our automated static check of SKILL.md found notes only (pipes a well-known installer script into a shell; pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Setup Ollama Local use?

Setup Ollama Local is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Setup Ollama Local use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Setup Ollama Local?

Skills that share tags, products or a category with Setup Ollama Local: Aider Delegate (amElnagdy/delegate-skills, 2.3k stars), Perfup (raullenchai/Rapid-MLX, 4k stars), Debug Inference (NVIDIA/OpenShell, 16k stars) and Ideer Daily Paper Chatbot (AI45Lab/iDeer, 416 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Setup Ollama Local?

receptron (a GitHub organization) maintains it in receptron/mulmoclaude, which has 371 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 10, 2026.

Source: receptron/mulmoclaude on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.