From ironclaude
Configure Ollama as the validation backend for professional mode hooks
How this skill is triggered — by the user, by Claude, or both
Slash command
/ironclaude:setup-ollama-validationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Configure Ollama as the validation backend for professional mode hooks. This replaces the slow Claude Haiku CLI calls (~12-15s) with near-instant local Ollama calls (~1s).
Configure Ollama as the validation backend for professional mode hooks. This replaces the slow Claude Haiku CLI calls (~12-15s) with near-instant local Ollama calls (~1s).
Display:
🔧 Hook Validation Backend Setup
Professional mode hooks that use LLM validation (benefiting from Ollama):
- Checks if messages relate to the active plan (topic-change-detector) — uses LLM
- Confirms task completion (task-completion-validator) — uses LLM
Other professional mode hooks (rule-based, no LLM):
- Validates that code changes match plan scope (professional-mode-guard)
- Detects when subagents complete (subagent-drift-detector)
By default, this uses Claude Haiku via the CLI, but it's slow (~12-15 seconds per call)
due to CLI startup overhead.
Ollama runs locally with near-instant response times (<1 second).
This setup configures Ollama as your validation backend.
Run:
ollama --version
If command not found, display:
❌ Ollama not found.
Install Ollama: https://ollama.com/download
After installing, run: ollama serve
Then retry this setup.
Then STOP.
If version < 0.5.0, display:
❌ Ollama version X.X.X found, but 0.5.0+ required for JSON schema support.
Update Ollama: https://ollama.com/download
Then STOP.
Use AskUserQuestion:
Ollama detected. Is http://localhost:11434 the correct URL?
Options:
If B, prompt for custom URL.
Use AskUserQuestion:
Would you like to configure a fallback Ollama URL?
This is useful when your primary Ollama runs on a remote machine.
If the primary is unreachable (2s timeout), hooks will try the fallback.
Options:
If A: No fallback_url in config.
If B: Set ollama.fallback_url to http://localhost:11434.
If C: Prompt for custom fallback URL.
Run:
ollama list
Analyze the output and recommend the fastest model that's at least Haiku-quality.
Known good models (in order of preference for this task):
Models NOT recommended:
If no suitable models found, display:
⚠️ No suitable models found for hook validation.
Recommended models:
• ollama pull qwen3:8b (5.2 GB, recommended, reliable JSON)
• ollama pull llama3.2:3b (2.0 GB, fast, good quality)
• ollama pull gemma2:2b (1.6 GB, lightweight, good quality)
After pulling a model, run this setup again.
Then STOP.
Use AskUserQuestion to let user pick from available suitable models.
Run a test call:
curl -s --max-time 10 "$URL/api/generate" \
-d '{"model": "MODEL", "prompt": "Respond with only: {\"ok\": true}", "stream": false, "format": {"type": "object", "properties": {"ok": {"type": "boolean"}}, "required": ["ok"]}}'
Verify response contains valid JSON with "ok": true.
If test fails, display:
❌ Configuration test failed.
Options:
A) Try a different model
B) Keep config anyway (may have parsing issues)
C) Cancel setup and keep Haiku default
Write to ~/.claude/ironclaude-hooks-config.json:
{
"validation_backend": "ollama",
"ollama": {
"url": "URL",
"fallback_url": "FALLBACK_URL (omit if not configured)",
"model": "MODEL_NAME"
},
"timeout_seconds": 60
}
Display:
✅ Ollama validation backend configured successfully!
Config saved to: ~/.claude/ironclaude-hooks-config.json
Backend: ollama
Model: MODEL_NAME
URL: URL
Fallback URL: FALLBACK_URL (or "none")
Hook validation will now use Ollama instead of Haiku.
Expected response time: <1 second (vs ~12-15 seconds with Haiku)
To revert to Haiku: rm ~/.claude/ironclaude-hooks-config.json
npx claudepluginhub robertphyatt/ironclaude --plugin ironclaudeAutomates Ollama installation, hardware-based model selection, GPU setup, and client integration (Python/Node.js/REST) for local LLM inference on macOS/Linux/Docker.
Adds an Ollama MCP server so the container agent can offload tasks like summarization, translation, or general queries to local models. Sets up stdio-based tools and configures the runner.
Adds Ollama MCP server exposing local models as tools for container agent, including list/generate core tools and optional pull/delete/show/list-running management.