Skip to content

nanocoai/nanoclaw / .claude/skills/add-ollama-tool

add-ollama-tool

Verified

Add Ollama MCP server so the container agent can call local models and optionally manage the Ollama model library.

FileKindSize
REMOVE.mdmarkdown1.7 KB
SKILL.mdskill md11.8 KB
ollama-env.tsscript958 B
ollama-mcp-stdio.tsscript13.7 KB
ollama-registration.test.tsscript2.2 KB
ollama-wiring.test.tsscript2.1 KB
# Remove Ollama

Idempotent — safe to run even if some steps were never applied.

## 1. Delete the copied files (both trees)

```bash
rm -f container/agent-runner/src/ollama-mcp-stdio.ts \
      container/agent-runner/src/ollama-registration.test.ts \
      src/ollama-env.ts \
      src/ollama-wiring.test.ts
```

## 2. Unregister the MCP server

In `container/agent-runner/src/index.ts`, remove the `ollama: { … }` entry from the `mcpServers` object (leave `nanoclaw` and any other entries).

## 3. Revert the host-side edits

- Remove the `import { ollamaEnv } from './ollama-env.js';` import.
- Remove the `...ollamaEnv(),` spread from the `env` literal in `composeSessionSpec`.
- Remove the `[OLLAMA]` branch from the driver's stderr handler in `src/drivers/docker-driver.ts`. If `[OLLAMA]` was the only prefix branch, restore the handler to its single `log.debug(line, …)` form (keep the stderr-tail lines); if other local-model tools still have branches there, just drop the `[OLLAMA]` one and leave the rest intact.

## 4. Remove env vars

Remove the Ollama block from `.env.example`, and the `OLLAMA_HOST` / `OLLAMA_ADMIN_TOOLS` lines from `.env` if you set them.

## 5. Rebuild and restart

Run from your NanoClaw project root:

```bash
pnpm run build && ./container/build.sh
source setup/lib/install-slug.sh

# macOS
launchctl kickstart -k gui/$(id -u)/$(launchd_label)

# Linux
systemctl --user restart $(systemd_unit)
```

## Verification

After removal, confirm the tool is gone — in a wired agent, asking it to "list ollama models" should report no such tool, and the logs should show no `[OLLAMA]` lines after the last restart:

```bash
grep "\[OLLAMA\]" logs/nanoclaw.log | tail -5
```
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall