skills/hermes-restart/SKILL.md
Diagnose and auto-fix Hermes Agent routing, Ollama, and gateway issues
npx skillsauth add asets-gobizit/claude-skills hermes-healthInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
python "C:\Users\dansk\.claude\skills\hermes-health\hermes_health.py"
python "C:\Users\dansk\.claude\skills\hermes-health\hermes_health.py" --fix
python "C:\Users\dansk\.claude\skills\hermes-health\hermes_health.py" --fix --restart-gateway
| Flag | Description |
|------|-------------|
| --fix | Auto-fix issues found (restart Ollama, unload models, fix config) |
| --restart-gateway | Also restart Hermes gateway after fixes |
| --verbose | Show detailed diagnostic output |
qwen/qwen3.6-plus:free on OpenRouter (FREE - $0/token)/home/dansk/.hermes/config.yaml (inside WSL)/home/dansk/.hermes/.env (inside WSL)smart_model_routing:
enabled: true
max_simple_chars: 1000
max_simple_words: 180
cheap_model:
provider: openrouter
model: qwen/qwen3.6-plus:free
Danny tried adding qwen2.5:32b (19GB) to local Ollama for higher quality. This caused:
provider: openai no longer routes to localhostprovider: custom reached localhost but Hermes v0.6.0 sends full tool definitions with every messagellama3.1:8b cannot handle tool-use protocol -- hangs forever on tool schemas| Attempt | Result |
|---------|--------|
| provider: openai + localhost | v0.6.0 resolves to real OpenAI API, not localhost |
| provider: ollama + localhost | "Unknown provider 'ollama'" |
| provider: custom + localhost + llama3.1:8b | Reaches Ollama but 8B model hangs on tool definitions |
| provider: openai (original working setup) | Auth flow changed in v0.6.0, no longer works |
| provider: custom + localhost + qwen2.5:7b | WORKED -- but slower and weaker than cloud |
| Free OpenRouter model (qwen3.6-plus:free) | FINAL DECISION -- $0/token, fast, smart |
hermes update changed provider resolution mid-debugllama3.1:8b cannot handle Hermes tool-use -- Hermes v0.6.0 sends 20+ tool schemas with every message. Use qwen2.5:7b which supports tool-useprovider: custom is the only working option for local Ollama in v0.6.0curl localhost:11434/api/generate -d '{"model":"qwen2.5:32b","keep_alive":0}'File: /home/dansk/.hermes/hermes-agent/agent/smart_model_routing.py
Added direct api_key reading from cheap_model config (Hermes only checked api_key_env):
if not explicit_api_key:
direct_key = str(route.get("api_key") or "").strip()
if direct_key:
explicit_api_key = direct_key
NOTE: This fix may be overwritten by hermes update. Re-apply if routing breaks after update.
Hermes can modify its own source code (smart_model_routing.py, gateway/run.py) during conversations when debugging itself. These patches may have errors and break the response pipeline, causing Handler returned empty/None response in the gateway logs.
# Check for modified source files (run in WSL)
cd /home/dansk/.hermes/hermes-agent && git status
If agent/smart_model_routing.py or gateway/run.py show as modified, Hermes has patched itself.
# 1. Restore broken files to clean upstream state
cd /home/dansk/.hermes/hermes-agent
git restore agent/smart_model_routing.py gateway/run.py
# 2. Pull latest upstream (if behind)
git pull
# 3. Restart gateway
hermes gateway stop && sleep 2 && hermes gateway start
WARNING gateway.platforms.base: [Telegram] Handler returned empty/None response🔧 patch entries with [error] — Hermes tried to patch itself and failedhermes update, check git status in the source directoryWhen a session accumulates many messages, a "thinking" block can get corrupted (invalid signature). The API rejects every retry with HTTP 400: Invalid signature in thinking block. The session becomes permanently stuck.
API call failed after 3 retries. HTTP 400: Provider returned errorInvalid signature in thinking blockFile: /home/dansk/.hermes/hermes-agent/run_agent.py
Patch script: C:\Users\dansk\.paperclip\hermes-thinking-patch.py
The patch detects "invalid signature + thinking" errors and automatically clears the session history, keeping only the last user message. This recovers the session instead of aborting.
hermes updatepython "C:\Users\dansk\.paperclip\hermes-thinking-patch.py"
wsl -d Ubuntu -- bash -c "source ~/.local/bin/env 2>/dev/null; hermes gateway stop; sleep 2; hermes gateway start"
NOTE: This patch WILL be overwritten by hermes update. Always re-apply after updating.
Everything starts automatically on PC reboot:
Ollama.lnk in Windows Startup folderHermes Agent.lnk in Startup folder + systemd linger enabledLocation: /home/dansk/.hermes/hermes-restart.sh
# From Claude Code (Windows):
wsl -e bash -c "source ~/.local/bin/env; bash /home/dansk/.hermes/hermes-restart.sh"
# With update:
wsl -e bash -c "source ~/.local/bin/env; bash /home/dansk/.hermes/hermes-restart.sh --update"
# Full kill (force-kill all hermes processes first):
wsl -e bash -c "source ~/.local/bin/env; bash /home/dansk/.hermes/hermes-restart.sh --full"
hermes gateway stop (graceful)gateway_state.json and processes.json to clean statehermes update if --update flag passednohup in backgroundhermes update| What | When needed | How |
|------|-------------|-----|
| Full clean restart | Gateway stuck, zombie processes | Claude runs: wsl -e bash -c "source ~/.local/bin/env; bash /home/dansk/.hermes/hermes-restart.sh" |
| Hermes gateway only | Config changed, quick restart | Claude runs: wsl.exe bash -c "hermes gateway stop; sleep 2; hermes gateway start" |
| Hermes CLI | Only if CLI open in terminal | User types /quit then hermes |
| Ollama | Model stuck, not responding | Claude runs: powershell Stop-Process -Name ollama -Force (auto-restarts) |
| WSL | WSL itself frozen (rare) | User opens PowerShell as admin: wsl --shutdown then wsl |
Key rule: You almost NEVER need to restart WSL. 99% of the time it's just the restart script or Ollama.
data-ai
Automated backup skill for PKA + Obsidian + Claude memory. Snapshots pka.db (via SQLite .backup so WAL is handled safely), the Obsidian vault, Claude memory files, agent profiles, and the help-content Excel into a single timestamped zip in Zoho WorkDrive. Daily/weekly/monthly retention rotation built in. USE WHEN Danny says "backup", "run backup", "snapshot pka", or to recover from a snapshot.
testing
Run any question, idea, or decision through a council of 5 AI advisors who independently analyze it, peer-review each other anonymously, and synthesize a final verdict. Based on Karpathy's LLM Council methodology, packaged as the stress-test skill. MANDATORY TRIGGERS: 'stress-test this', 'stress test this', 'pressure-test this', 'pressure test this', 'war room this', 'council this', 'run the council', 'debate this'. STRONG TRIGGERS (use when combined with a real decision or tradeoff): 'should I X or Y', 'which option', 'what would you do', 'is this the right move', 'validate this', 'get multiple perspectives', 'I can't decide', 'I'm torn between'. Do NOT trigger on simple yes/no questions, factual lookups, or casual 'should I' without a meaningful tradeoff (e.g. 'should I use markdown' is not a stress-test question). DO trigger when the user presents a genuine decision with stakes, multiple options, and context that suggests they want it pressure-tested from multiple angles.
content-media
Weekly scan of Obsidian vault for empty/low-content notes. Moves them to zToBeDeleted/ for user review. Use when the user says "tidy obsidian", "clean obsidian", "obsidian cleanup", or on scheduled weekly run.
development
Design-first website builder. Accepts a Claude Design export (HTML or screenshot) as a visual blueprint, collects business inputs, calls Claude API to generate a design-matched index.html, and publishes to GitHub Pages. Falls back to vibe-based generation if no design is provided. Use when the user says "make-website-design", "design website", "build from design", or provides a Claude Design export for website generation.