executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
lov-clash-tun-doctorDiagnose and repair application connectivity failures caused by Clash Verge Rev TUN routing, rule precedence, stale runtime state, proxy timeouts, or unusable IPv6 paths. Trigger for symptoms such as WeChat images failing to send, Moments images loading slowly, an app hanging after TUN is enabled, or requests unexpectedly matching DIRECT/proxy rules. Also t…
Independent GitHub snapshot · Automated classification · Original documentation governs
Evidence-first diagnosis and reversible repair for application networking failures behind Clash Verge Rev TUN mode.
ipv6: false, but runtime traffic still uses IPv6.no route to host, context deadline exceeded, or an
unexpected rule/strategy for the affected process.Do not use this skill for generic subscription acquisition, node purchasing, or bypassing organizational network policy.
Resolve SKILL_DIR from the installed skill context. For manual execution:
export SKILL_DIR="/path/to/lov-clash-tun-doctor"
The CLI resolves the Clash Verge Rev data directory in this order:
--data-dirSKILL_CLASH_TUN_DOCTOR_DATA_DIR~/Library/Application Support/Never hard-code a user's home directory.
Run the read-only command first:
python3 "$SKILL_DIR/scripts/clash_tun_doctor.py" diagnose --app wechat
Report concrete evidence from all available layers:
config.yaml overrides.clash-verge.yaml top-level and DNS IPv6 values./configs, /rules, and /connections through Mihomo's Unix socket.Treat screenshots and runtime state as truth. A rule saying DIRECT does not
prove the connection succeeded.
Use references/troubleshooting.md to map evidence to a repair. For the proven
WeChat pattern, use the built-in repair:
python3 "$SKILL_DIR/scripts/clash_tun_doctor.py" fix-wechat
This is a dry run. It previews:
Do not route the whole application through a proxy merely because direct media failed. First check proxy health and IPv6 errors; a proxy timeout can turn one failed image into a fully stuck application.
For a browser site or application with multiple dependency hosts, generate one evidence-backed DIRECT list instead of adding domains one by one:
python3 "$SKILL_DIR/scripts/clash_tun_doctor.py" direct-list \
--app miracleplus \
--host apply.miracleplus.com \
--output ./miracleplus-direct.yaml
The command reads active connections and recent rotated service logs, deduplicates hostnames, and includes only:
--host.Hosts observed only through a healthy DIRECT route are reported as ignored instead of bloating the explicit list.
For a DIRECT list, preview first, then persist and hot-load it:
python3 "$SKILL_DIR/scripts/clash_tun_doctor.py" direct-list \
--app miracleplus \
--host apply.miracleplus.com \
--apply
This path must merge with existing prepend rules, create a timestamped backup,
update the generated config, hot-load Mihomo through its Unix socket, and verify
every listed host as an exact DOMAIN -> DIRECT runtime rule. Keep Clash Verge
running throughout this rule-only flow.
For the specialized WeChat IPv6 repair, run:
python3 "$SKILL_DIR/scripts/clash_tun_doctor.py" fix-wechat --apply
The command must:
false.DIRECT rules in the current profile's rule file.If verification fails, report the backup path and do not claim success.
Close stale connections or restart the affected application. Re-run diagnosis:
python3 "$SKILL_DIR/scripts/clash_tun_doctor.py" diagnose --app wechat --json
For the WeChat IPv6 failure, success requires all of the following:
ipv6 is false.DIRECT.no route to host errors.python3 "$SKILL_DIR/scripts/clash_tun_doctor.py" rollback --apply
Rollback restores the newest backup by default. Never delete backups automatically.
| Command / option | Default | Description |
|---|---|---|
diagnose | — | Read configuration, runtime state, connections, and logs. |
direct-list | — | Discover, export, or apply an evidence-backed DIRECT host list. |
fix-wechat | dry run | Preview or apply the proven WeChat repair. |
rollback | dry run | Preview or restore the latest repair backup. |
--data-dir PATH | auto | Clash Verge Rev application data directory. |
--socket PATH | <data-dir>/mihomo.sock fallback | Mihomo controller Unix socket; standard /tmp/verge/verge-mihomo.sock is auto-detected. |
--app NAME | wechat | Application filter used by diagnosis. |
--host HOST | — | Seed an exact host in a DIRECT list; repeatable. |
--output PATH | — | Save a Mihomo classical rule-provider YAML list. |
--log-limit N | 4000 | Recent lines inspected in each rotated service log. |
--apply | false | Authorize filesystem changes and restart/restore actions. |
--no-reload | false | Persist a DIRECT list without runtime hot-load. |
--no-restart | false | Apply changes without restarting Clash Verge. |
--json | false | Emit machine-readable diagnosis output. |
Python 3.8+ standard library only.
运行前读取本 Skill 包的 skill.yaml,由宿主提供 skill-runtime/v1 上下文。字段解析顺序为:当前请求、项目上下文、个人 Preferences、品牌 Profile、通用默认值。
required: true 字段缺失时,按 Manifest 的问题配置向用户提出一个聚焦问题;用户明确同意后再保存回答。context_id、字段路径与来源,诊断内容避开秘密、完整私人路径和原始配置。用户在 Skill 驱动任务中提出修改意见时,继续当前产物前必须执行:
task-specific(仅本次)还是 reusable(可跨任务复用)。task-specific 只修改当前任务,不改 Skill。reusable 先确定作用域:领域规则先更新对应 canonical Skill;适用于所有 Skill 的规则先更新共享规范。reusable 修改会使此前的“确认”“继续”“发吧”失效;完成当前产物修改和回读后必须停下,等待用户下一步指示,不自动进入发布、提交或其他外部写入。