clash-routes

Inspect live Mihomo proxy chains and matched rules for local processes.

1|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/rockcookies/skills --skill clash-routes-rockcookies
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clash-routes
Source: https://github.com/rockcookies/skills/tree/main/skills/majiayu-spellbook/clash-routes
Command: npx skills add https://github.com/rockcookies/skills --skill clash-routes-rockcookies

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When running AI tools like Claude, Codex, Gemini, or ChatGPT behind a Clash/Mihomo proxy, it is hard to know which rule, policy group, and exit node each process actually uses. This Skill queries the Mihomo API read-only and shows the real-time proxy chain per process. ## Core Features & Use Cases - Live Connection Inspection: Queries Mihomo via Unix socket or HTTP controller to list all active connections with their matched rules and proxy chains. - Per-Process Filtering: Filter connections by process name (e.g., claude, codex) to confirm which exit node a specific tool is using. - Drift Detection: Identifies when the active profile or exit node differs from expectations, without modifying any YAML configuration. - Use Case: You suspect Claude's traffic is going through the wrong proxy exit. Run this Skill to see the exact rule, policy group, and real exit node for every active Claude connection. ## Quick Start Ask which proxy route the claude process is currently using and show its matched rule and exit node.

Frequently Asked Questions about clash-routes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check which proxy a process is using in Clash?▼

Query the Mihomo /connections API through its Unix socket or HTTP controller and filter by process name. Each connection shows the matched rule, policy group chain, and real exit node, grouped per process.

How to find the Mihomo external controller address and secret?▼

Read the external-controller and secret fields from the Clash Verge config file, typically under ~/Library/Application Support/io.github.clash-verge-rev.clash-verge-rev/ on macOS or ~/.config/clash/ on Linux. Never print the secret value itself.

Does this work with Clash Verge on macOS?▼

Yes. It first tries the Clash Verge Unix sockets at /tmp/verge/verge-mihomo.sock and /var/tmp/verge/verge-mihomo.sock, then falls back to the configured HTTP external controller, defaulting to 127.0.0.1:9090.

Why does a connection show only an IP address instead of a hostname?▼

A bare IP means the sniffer did not resolve the domain, often because system DNS bypassed Clash. Check the sniffer.parse-pure-ip setting and DNS routing rather than changing the AI policy group directly.

Can this tool change proxy rules or profiles?▼

No. It is strictly read-only and only queries the connections endpoint. Profile topology changes belong to a separate tool like clash-doctor, and exit IP quality checks belong to ip-check.