clash-doctor

clash-doctor is a skill for Claude Code from majiayu000/spellbook. It costs 91 tokens per session (688 once invoked), scanned A, original, MIT.

A diagnostic and configuration skill for Clash Verge and Mihomo, tools that manage network proxy profiles and routing rules. It focuses on inspecting profiles, checking connectivity, switching profiles, and routing AI tools such as Claude, Codex, Cursor, or Warp.

In plain words
What is it for?
Use it to inspect or clone subscription profiles, configure proxy routes, switch the active profile, and verify settings with configuration checks, API queries, or connectivity tests.
Why use it?
It helps diagnose proxy and network problems while limiting changes to the requested target and keeping a rollback path for profile edits.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to inspect or clone subscription profiles, configure proxy routes, switch the active profile, and verify settings with configuration checks, API queries, or connectivity tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/majiayu000/spellbook/clash-doctor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add majiayu000/spellbook --skill clash-doctor
Clone the repo
git clone --depth 1 https://github.com/majiayu000/spellbook

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for clash-doctor

README.md
[![agentmods](https://agentmods.dev/badge/skills/majiayu000/spellbook/clash-doctor/github.svg)](https://agentmods.dev/skills/majiayu000/spellbook/clash-doctor)
Your own site
<a href="https://agentmods.dev/skills/majiayu000/spellbook/clash-doctor"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/clash-doctor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for clash-doctor

Your own site · 80×15
<a href="https://agentmods.dev/skills/majiayu000/spellbook/clash-doctor"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/clash-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 688 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00091 $0.00688
Opus 5 $0.00046 $0.00344
Sonnet 5 $0.00018 $0.00138
Haiku 4.5 $0.00009 $0.00069

Measured 8d ago against content hash 65883e5655e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

clash-doctor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/clash-doctor/SKILL.md · 58 lines

How it starts

The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Clash Verge Diagnostics

Inspect Clash Verge or mihomo, manage profile-specific routing, and diagnose connectivity.

Routing

  • Confirm the target profile, constraints, requested access path, and done-when signal.
  • Load references/full-guide.md for commands, templates, and diagnosis matrices.
  • Load references/local-hub.md before hub, align, roles, clone, setup-ai, or switch, and whenever the user says a previous sync did not apply.
  • Keep the change limited to the requested target.

Safety

  • Diagnose and align are read-only. Writes require a shown summary and explicit confirmation.
  • Edit enhancement overlays or the confirmed local-hub YAML. Do not edit raw subscription dumps.
  • tun.route-exclude-address is union-only. DIRECT is not a TUN bypass.
  • Never invent or print node IPs, credentials, subscription UIDs, or machine hostnames.
  • After an overlay or hub-YAML write, quit and reopen Clash Verge. PUT /configs does not re-merge overlays.

Modes

Argument Mode
empty or a hostname diagnose
profiles / list / ls list local and remote profiles
status live kernel, TUN, and selected nodes
hub / roles local-hub topology
align / sync-check read-only multi-machine comparison
switch-check / health pre-switch health
clone / setup-ai / switch confirmed profile writes
rustdesk / bypass TUN exclusion for a relay IP

Resolve the named target before setup-ai. Apply airport-style enhancement overlays only when that target is type: remote; edit the named hub YAML when it is type: local.

Verify

  • Parse the target YAML after every write.
  • Query mihomo by trying both Unix sockets and then the configured HTTP controller; fall back on request failure, not socket existence alone.
  • For routes, chains[-1] is the matched group and chains[0] is the dialed node.
  • Report files changed, commands run, evidence, and remaining risk.

References

  • references/full-guide.md — commands, templates, and diagnosis matrix
  • references/local-hub.md — hub ownership, node roles, alignment, and landmines

Read the full file on GitHub · 58 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago Changed · +28 lines · +20 tokens per session 65883e5655e7
  2. 12d ago First seen · 30 lines · 71 tokens per session scan A 87c3c07447cd

Subscribe to this mod's changes

clash-doctor is a skill published in the GitHub repository majiayu000/spellbook (278 stars, last pushed yesterday), licensed MIT. It adds 91 tokens to every session and 688 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

pneuma-session

Instructions for renaming an active Pneuma session and replacing its default preview with a useful title and summary. A Pneuma session is one work area inside a larger project.

pandazki/pneuma-skills · 127 tokens

session-handoff

Use when the user wants to hand off, transfer, pause, or continue the current session in a new session or with another agent — asks for a "session handoff", a "prompt para a próxima sessão", to "continuar de onde paramos", or invokes /session-handoff; also when context is running low and in-flight work must survive a…

will-pagane/claude-superdev-harness · 91 tokens

aenv

Use when the user wants to set up, switch between, or manage aenv namespaces — named bundles of CLAUDE.md, skills, MCP entries, and other AI-coding-harness config — in a project OR globally across $HOME. Triggers include aenv … mentioned directly, "switch namespace/profile", "activate/deactivate", "create/snapshot a…

Blevene/aenv · 176 tokens

cao-session-management

Interact with CAO (CLI Agent Orchestrator) — launch multi-agent sessions, check status, send follow-up instructions, unblock stuck terminals, or shut down sessions. Use when working with CAO sessions in any capacity.

awslabs/cli-agent-orchestrator · 49 tokens

mulmoterminal-keys

Bind keyboard shortcuts and fix keyboard/clipboard behaviour in MulmoTerminal. Writes keymap, which Settings cannot set at all — its Keyboard shortcuts section is read-only, listing every action bound or not plus a send row. Explains copyOnSelect, questionPaneEnabled and terminalSubmit, which have their own Settings…

receptron/mulmoterminal · 289 tokens

tokf-discover

Find missed token savings by scanning AI coding session files for commands that ran without tokf filtering.

mpecan/tokf · 24 tokens