Guide · Agent skill
How to use the Add Ollama Provider agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The add-ollama-provider skill is a set of instructions that an AI coding agent follows to point one NanoClaw agent group at a model running on your own machine through Ollama, instead of Anthropic's cloud API. This guide explains what the skill changes, how to install it, how to trigger it, and how to check the result. It is written for readers who have not used agent skills before, but the setup itself assumes you already run NanoClaw and can edit its config files.
Quick start
- 1Check Ollama and a model. Confirm Ollama answers at localhost:11434 and that you have pulled at least one model, for example gemma4 or qwen3-coder.
- 2Install the skill. Unzip the downloaded skill into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills.
- 3Ask for the change. Tell the agent which group you want to run on a local model. It will ask for the group, the Ollama model and whether to block the Anthropic API.
- 4Let the skill edit config. The agent updates container.json, adds the source fields if missing, and sets the model in the group's shared settings.json.
- 5Build and restart. Run the build and restart the NanoClaw service using the launchctl or systemctl commands from the skill.
- 6Verify. Send a message, then check Ollama's /api/ps endpoint and the container's ExtraHosts and environment.
What the skill makes the agent do
Ollama can speak the Anthropic API format (v1/messages), so NanoClaw does not need new provider code. The skill only changes configuration: it sets environment variables that redirect the Anthropic SDK to Ollama, and it sets a model name in the group's Claude settings.
It also checks whether two fields (env and blockedHosts) exist in src/container-config.ts and src/container-runner.ts, and adds them if they are missing. It can block api.anthropic.com inside the container so the agent cannot reach the cloud API by accident.
- Edits groups/<FOLDER>/container.json to add an env block and optionally blockedHosts
- Sets a model key in the group's shared Claude settings.json
- Adds a small code change to the container runner if it is not already present
- Rebuilds the project and restarts the NanoClaw service
What you need before installing
The source lists these requirements. Check each one before you start, because the steps depend on them.
- A NanoClaw repository containing src/container-config.ts and src/container-runner.ts
- Ollama installed and running on the host at localhost:11434
- At least one pulled Ollama model
- Docker or a compatible container runtime
- pnpm and tsx for the build and database query steps
- An existing NanoClaw agent group
curl -s http://localhost:11434/api/tagsHow to install the skill
Download the skill ZIP from this page and unzip it. The skill is a single file, SKILL.md. Put the unzipped folder in one of two places: ~/.claude/skills/ to make it available everywhere, or a project's .claude/skills/ folder to limit it to one project.
If you use the Claude apps instead, open Settings, go to Capabilities, then Skills, and upload the skill there.
- Personal install: ~/.claude/skills/
- Project install: .claude/skills/ inside your NanoClaw project
- Claude apps: Settings → Capabilities → Skills
How to trigger it with a natural request
You do not need a special command. Describe what you want in plain language, such as asking the agent to run a group on a local model, or to cut Anthropic API costs for one group. The skill's description says it applies when you want to run the agent locally, reduce API costs, or experiment with open-weight models.
The agent will then ask you which agent group to change, which Ollama model to use, and whether to block the Anthropic API.
- "Route my research agent group to a local gemma model."
- "I want to cut API costs for the support group. Use Ollama instead."
- "Set up qwen3-coder on Ollama for the coding agent."
Walk through the configuration
The skill checks for the two source fields first. If they are missing, it adds them to the container config types and to the container runner, which passes env values as -e flags and blocked hosts as --add-host entries that resolve to 0.0.0.0.
For the group, the container.json env block points ANTHROPIC_BASE_URL at http://host.docker.internal:11434 and sets a placeholder ANTHROPIC_API_KEY, since Ollama ignores the key but the SDK requires one. NO_PROXY is set so requests to Ollama skip the OneCLI HTTPS proxy. The model name goes in the group's shared settings.json, because Claude Code reads its model from that file rather than from environment variables.
{
"env": {
"ANTHROPIC_BASE_URL": "http://host.docker.internal:11434",
"ANTHROPIC_API_KEY": "ollama",
"NO_PROXY": "host.docker.internal",
"no_proxy": "host.docker.internal"
},
"blockedHosts": ["api.anthropic.com"]
}Build, restart and verify
After the changes, the skill runs the build and restarts the NanoClaw service. On macOS it uses launchctl; on Linux it uses systemctl --user restart. Then send the agent a message and check that Ollama shows the model as active and that the container has the expected variables.
Expected results are api.anthropic.com:0.0.0.0 in the container's ExtraHosts and ANTHROPIC_BASE_URL pointing to Ollama.
- Ollama lists the model as active at /api/ps
- The container's ExtraHosts includes api.anthropic.com:0.0.0.0
- The container environment includes ANTHROPIC_BASE_URL
curl -s http://localhost:11434/api/ps | grep '"name"'How to switch back to Claude
To revert, remove the env and blockedHosts keys from groups/<FOLDER>/container.json, remove the model key from the shared settings file, and restart the service. The source says no rebuild is needed for this, because both files are read when the container starts.
- Remove env and blockedHosts from container.json
- Remove model from the shared settings.json
- Restart the service
What people use it for
- Testing an open-weight model such as gemma or qwen against a NanoClaw agent group you already use
- Running a high-volume agent group locally to reduce Anthropic API spend
- Keeping a sensitive group's requests on your own hardware while you evaluate its behaviour
- Comparing how a local model handles one group's tasks before deciding whether to keep it
Frequently asked questions
Is the add-ollama-provider skill free?
The skill is published under the MIT licence, according to the listing. It does not charge API fees for the agent once applied, though you still need your own Ollama and hardware setup.
What do I need installed before using this skill?
You need a NanoClaw repository with the two container source files, Ollama running on localhost:11434, at least one pulled model, Docker or a compatible runtime, pnpm and tsx, and an existing agent group.
Does the skill run scripts?
Yes. The listing says it runs scripts, and the steps include shell commands for grep, curl, pnpm, docker and launchctl or systemctl. It does not use the network itself according to the listing, but the commands you run do call the local Ollama server.
Why does the agent still say it is Claude?
The source notes that the model may have been trained on data that includes Claude conversations. You can add a line to the group's CLAUDE.md that states which model the agent runs on.
The agent hangs with no response. What should I check?
Large models can take 10 to 30 seconds to load. Watch localhost:11434/api/ps until the model appears. If you get a model-not-found error, run ollama list and use the exact name shown.
How does this compare with just using the Anthropic API?
A local model costs no API fees, but the listing warns that answers and tool use may differ from Claude's. Keep the Anthropic API for groups where quality matters most.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits developers who already run NanoClaw and want to test a local open-weight model or cut API costs for one agent group. It is not a good fit for people without Ollama and a capable machine, for anyone expecting Claude-level quality from a local model, or for non-technical users, since it requires editing Docker config, TypeScript and service files.
Download the skill