clashverge-rules-debug
Skill3 starsChanged 8 months agoMITView on GitHub
Diagnose and fix ClashVerge Rev routing problems on macOS, especially TUN/fake-ip issues that break SSH, cloudflared, WebSocket, or domain-specific direct routing. Use when traffic is being hijacked by ClashVerge, domains resolve to 198.18.x.x, or specific processes/domains need DIRECT bypass. Chinese triggers: clash, 代理, 分流, 直连, 网络不通, 198.18, 翻墙规则, VPN规则.
In this repository8 other files it gives its agents.
- ace-searchSkill
- bib-verifySkill
- grok-imagineSkill
- grok-searchSkill
- hydraSkill
- lit-reviewSkill
- memory-palaceSkill
- readmeSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 1 is distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill for macOS ClashVerge Rev debugging when a host or process must bypass TUN/proxy, especially for ssh, cloudflared, WebSocket, …
- Very specific: line 14
Write DIRECT rules into the active rules file, usually under prepend.
- Very specific: line 15
Write the hostname into the active merge file under dns.fake-ip-filter.
- Very specific: line 16
If the issue must be fixed immediately, patch the generated clash-verge.yaml too.
- Distinctive: line 20
Read the service log. Trust the log over assumptions.
- Very specific: line 29
If the result is 198.18.x.x, Clash fake-ip is in play.
- Very specific: line 43
Add a DIRECT rule to the active rules template under prepend:
- Very specific: line 50
Add the hostname to dns.fake-ip-filter in the active merge template:
- Very specific: line 93
Prefer editing the active profile's rules and merge files for persistence.
- Very specific: line 94
Use direct edits to clash-verge.yaml only for immediate fixes.
- Very specific: line 97
If hostname is still 198.18.x.x after config change, you likely missed the fake-ip cache flush.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ClashVerge Rules Debug
Use this skill for macOS ClashVerge Rev debugging when a host or process must bypass TUN/proxy, especially for ssh, cloudflared, WebSocket, Cloudflare Access, campus VPN, or any hostname that starts resolving to 198.18.x.x.
Minimal Workflow
- Find the active profile in
profiles.yaml. - Find that profile's
merge,rules, andscriptfiles. - Write DIRECT rules into the active
rulesfile, usually underprepend. - Write the hostname into the active
mergefile underdns.fake-ip-filter. - If the issue must be fixed immediately, patch the generated
clash-verge.yamltoo. - Reload Mihomo through the unix socket controller.
- Flush fake-ip cache and macOS DNS cache.
- Re-test DNS and the failing command.
- Read the service log. Trust the log over assumptions.
What To Check First
- Confirm the symptom.
If the result isdig +short <host> dscacheutil -q host -a name <host>198.18.x.x, Clash fake-ip is in play. - Confirm Mihomo is intercepting the traffic.
rg -n "<host>" ~/Library/Application\ Support/io.github.clash-verge-rev.clash-verge-rev/logs/service/service_latest.log - Identify the active profile and its enhancement files.
Read
~/Library/Application Support/io.github.clash-verge-rev.clash-verge-rev/profiles.yaml
The Reliable Fix Pattern
For a host that must bypass Clash:
- Add a DIRECT rule to the active rules template under
prepend:prepend: - DOMAIN,example.com,DIRECT - PROCESS-NAME,cloudflared,DIRECT - Add the hostname to
dns.fake-ip-filterin the active merge template:dns: fake-ip-filter: - example.com - Reload and flush caches:
curl --unix-socket /tmp/verge/verge-mihomo.sock \ -X PATCH 'http://localhost/configs?force=true' \ -H 'Content-Type: application/json' \ -d '{"path":"'$HOME'/Library/Application Support/io.github.clash-verge-rev.clash-verge-rev/clash-verge.yaml"}' curl --unix-socket /tmp/verge/verge-mihomo.sock -X POST http://localhost/cache/fakeip/flush dscacheutil -flushcache - Verify:
dig +short example.com # Should NOT be 198.18.x.x
Useful Controller Commands
# Check version
curl --unix-socket /tmp/verge/verge-mihomo.sock http://localhost/version
# View current config
curl --unix-socket /tmp/verge/verge-mihomo.sock http://localhost/configs
# Reload config
curl --unix-socket /tmp/verge/verge-mihomo.sock \
-X PATCH 'http://localhost/configs?force=true' \
-H 'Content-Type: application/json' \
-d '{"path":"'$HOME'/Library/Application Support/io.github.clash-verge-rev.clash-verge-rev/clash-verge.yaml"}'
# Flush fake-ip cache
curl --unix-socket /tmp/verge/verge-mihomo.sock -X POST http://localhost/cache/fakeip/flushKey Principles
- Prefer editing the active profile's
rulesandmergefiles for persistence. - Use direct edits to
clash-verge.yamlonly for immediate fixes. PROCESS-NAMErules protect specific processes;DOMAINrules protect specific hosts.- The service log is the source of truth.
- If hostname is still
198.18.x.xafter config change, you likely missed the fake-ip cache flush.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

