clash-doctor — скилл для Claude Code: что делает и как установить
Скилл clash-doctor диагностирует сетевые сбои в Clash Verge и mihomo, правит маршруты для ИИ-инструментов и настраивает исключения TUN.
MIT 142 установок ★ 300 обновлён 2026-10-23
npx skills add majiayu000/spellbook --skill clash-doctor -a claude-codeЧто делает clash-doctor
Скилл проверяет состояние ядра mihomo, активные профили и цепочки узлов через сокеты Unix или HTTP-контроллер. В режиме диагностики и сверки конфигураций между машинами агент работает строго в режиме чтения. Изменения вносятся только после подтверждения пользователем.
Запись затрагивает оверлеи расширений для удалённых профилей или локальный YAML хаба. Сырые дампы подписок скилл не меняет, а при настройке обхода TUN использует параметр tun.route-exclude-address.
После сохранения оверлея или YAML-файла хаба Clash Verge нужно перезапустить вручную, так как запрос PUT /configs не пересобирает оверлеи на лету.
Какие задачи решает
- разобрать сбой прокси и проверить статус ядра mihomo
- настроить маршрутизацию трафика для ИИ-сервисов в профиле
- добавить IP-адрес релея в исключения TUN через
bypass - сравнить топологию и роли узлов на нескольких машинах
- переключить или клонировать рабочий профиль без ручной правки дампов
Примеры запросов агенту
- Проверь статус ядра mihomo и активные узлы через clash-doctor
- Настрой маршруты для ИИ-инструментов в профиле remote-work через clash-doctor setup-ai
- Добавь IP-адрес 192.168.1.50 в исключения TUN с помощью clash-doctor bypass
Как установить clash-doctor
1Через Skills CLI (Vercel)
npx skills add majiayu000/spellbook --skill clash-doctor -a claude-code2Вручную: положить файлы
~/.claude/skills/clash-doctor/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/clash-doctor/
1Через Skills CLI (Vercel)
npx skills add majiayu000/spellbook --skill clash-doctor -a codex2Вручную: положить файлы
.agents/skills/clash-doctor/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add majiayu000/spellbook --skill clash-doctor -a cursor2Вручную: положить файлы
.cursor/skills/clash-doctor/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install majiayu000/spellbook skills/clash-doctor2Вручную: положить файлы
.github/skills/clash-doctor/SKILL.md1Через Skills CLI (Vercel)
npx skills add majiayu000/spellbook --skill clash-doctor -a gemini-cli2Командой платформы
gemini skills install https://github.com/majiayu000/spellbook --path skills/clash-doctorВручную: положить файлы
.devin/skills/clash-doctor/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add majiayu000/spellbook --skill clash-doctor -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о clash-doctor
Как установить clash-doctor в Claude Code?
Выполните команду npx skills add majiayu000/spellbook --skill clash-doctor -a claude-code в терминале.
Что делает clash-doctor?
Скилл управляет профилями Clash Verge и mihomo, находит причины ошибок подключения, сверяет конфигурации узлов и готовит правила обхода TUN.
Почему после изменения оверлея требуется перезапуск Clash Verge?
Вызов PUT /configs не применяет заново правила объединения оверлеев, поэтому приложение необходимо закрыть и открыть снова.
Исходный текст
SKILL.md · MIT
--- name: clash-doctor description: > Clash Verge 与 mihomo 诊断和 profile 管理。当用户遇到代理失败、需要配置 AI 工具路由、本地 Hub 拓扑、多机对齐、TUN 绕过、克隆或切换订阅,或同步后 配置未生效时使用。进程线路使用 clash-routes,出口 IP 质量使用 ip-check。 普通网络测速不使用。 allowed-tools: Bash, Read, Write, Edit, Glob, Grep metadata: argument-hint: '[host | profiles | status | hub | align | roles | switch-check <name> | clone <src> <dst> | setup-ai <name> | switch <name> | rustdesk <IP> | bypass <IP>]' --- # 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
© majiayu000 · MIT · majiayu000/spellbook