idea-analogist
想法群聊室 — 类比者角色。被 idea-team 主编排器调用,或用户单独说"类比一下"、"别的行业有没有"、"yes-and 扩展"、"X 让你想到什么"、"跨界启示"时触发。**专门做跨界类比 + yes-and…
查看本机进程的 Mihomo 实时代理链。当用户问 Claude、Codex、Gemini、ChatGPT、 浏览器或其他进程走哪个代理时使用。只读。Profile 拓扑和写入使用 clash-doctor, 出口 IP 质量使用 ip-check。
Claude Code
$ npx -y skills add majiayu000/spellbook --skill clash-routes --agent claude-code
Codex
$ npx skills add majiayu000/spellbook --skill clash-routes -a codex -y
Cursor
$ npx skills add majiayu000/spellbook --skill clash-routes -a cursor -y
Gemini CLI
$ npx skills add majiayu000/spellbook --skill clash-routes -a gemini-cli -y
GitHub Copilot
$ npx skills add majiayu000/spellbook --skill clash-routes -a github-copilot -y
OpenCode
$ npx skills add majiayu000/spellbook --skill clash-routes -a opencode -y
Windsurf
$ npx skills add majiayu000/spellbook --skill clash-routes -a windsurf -y
name: clash-routes description: > 查看本机进程的 Mihomo 实时代理链。当用户问 Claude、Codex、Gemini、ChatGPT、 浏览器或其他进程走哪个代理时使用。只读。Profile 拓扑和写入使用 clash-doctor, 出口 IP 质量使用 ip-check。 allowed-tools: Bash metadata: argument-hint: "[process,默认显示全部]"
查看本机当前活跃连接,确认指定进程命中的规则、策略组与真实出口。不接受 SSH 参数;远程机器应先通过 Tailscale SSH 登录,再在目标机器执行同一只读流程。
用户传入的参数:$ARGUMENTS。没有参数时列出所有活跃连接。诊断 Gemini、ChatGPT 或浏览器流量时,先不加过滤获取实际 `metadata.process`,再使用观察到的进程名;不要假定它们属于 `claude`。
读取 Clash Verge 配置,但不要打印 secret:
SECRET=$(grep '^secret:' "$HOME/Library/Application Support/io.github.clash-verge-rev.clash-verge-rev/clash-verge.yaml" 2>/dev/null | awk '{print $2}')
[ -z "$SECRET" ] && SECRET=$(grep '^secret:' "$HOME/.config/clash/config.yaml" 2>/dev/null | awk '{print $2}')
[ -n "$SECRET" ] && echo "API secret: configured" || echo "API secret: not configured"请求成功才采用该 endpoint。`/tmp` socket 存在但失效时继续尝试 `/var/tmp`,最后尝试配置的 HTTP controller。所有 endpoint 都失败时明确报错,不返回空数据。
request_connections() {
for socket_path in \
/tmp/verge/verge-mihomo.sock \
/var/tmp/verge/verge-mihomo.sock
do
[ -S "$socket_path" ] || continue
if curl --fail --silent --show-error \
--unix-socket "$socket_path" \
"http://localhost/connections" \
-H "Authorization: Bearer $SECRET"
then
return 0
fi
done
controller=$(grep '^external-controller:' "$HOME/Library/Application Support/io.github.clash-verge-rev.clash-verge-rev/clash-verge.yaml" 2>/dev/null | awk '{print $2}' | tr -d "'\"")
[ -n "$controller" ] || controller="127.0.0.1:9090"
curl --fail --silent --show-error \
"http://$controller/connections" \
-H "Authorization: Bearer $SECRET"
}
if ! DATA=$(request_connections); then
echo "无法从 Mihomo Unix socket 或 HTTP controller 获取连接数据" >&2
exit 1
fi
if ! printf '%s' "$DATA" | python3 -c 'import json, sys; value=json.load(sys.stdin); assert isinstance(value.get("connections"), list)' 2>/dev/null; then
echo "Mihomo 返回了无效的 connections JSON" >&2
exit 1
fi通过环境变量传递过滤值,避免把用户输入插进 Python 源码:
printf '%s' "$DATA" | FILTER="$ARGUMENTS" python3 -c '
import json
import os
import sys
from collections import defaultdict
data = json.load(sys.stdin)
process_filter = os.environ.get("FILTER", "").strip().lower()
results = []
for connection in data.get("connections", []):
metadata = connection.get("metadata", {})
process = metadata.get("process", "unknown")
if process_filter and process_filter not in process.lower():
continue
host = metadata.get("host", "") or metadata.get("destinationIP", "")
port = metadata.get("destinationPort", "")
rule = connection.get("rule", "")
payload = connection.get("rulePayload", "")
if payload:
rule += "/" + payload
chains = connection.get("chains", [])
chain_text = " → ".join(reversed(chains)) if chains else "DIRECT"
results.append({
"process": process,
"host": f"{host}:{port}" if port else host,
"rule": rule,
"chain": chain_text,
})
grouped = defaultdict(list)
for result in results:
grouped[result["process"]].append(result)
if not grouped:
target = process_filter or "任何进程"
print(f"未找到 {target} 的活跃连接")
raise SystemExit(0)
for process, connections in sorted(grouped.items()):
print(f"\n进程: {process} ({len(connections)} 个连接)")
route_stats = defaultdict(lambda: {"count": 0, "hosts": set()})
for connection in connections:
key = "{} → {}".format(connection["rule"], connection["chain"])
route_stats[key]["count"] += 1
route_stats[key]["hosts"].add(connection["host"])
for route, info in sorted(route_stats.items(), key=lambda item: -item[1]["count"]):
hosts = sorted(info["hosts"])
shown = ", ".join(hosts[:5])
suffix = f" ... (+{len(hosts) - 5})" if len(hosts) > 5 else ""
print(f" 线路: {route}")
print(" 连接数: {}".format(info["count"]))
print(f" 目标: {shown}{suffix}")
'想法群聊室 — 类比者角色。被 idea-team 主编排器调用,或用户单独说"类比一下"、"别的行业有没有"、"yes-and 扩展"、"X 让你想到什么"、"跨界启示"时触发。**专门做跨界类比 + yes-and…
想法群聊室 — 反方角色。被 idea-team 主编排器调用,或用户单独说"反方意见"、"挑这个想法的刺"、"为什么会失败"、"找漏洞 / 反例"、"devil's…
想法群聊室 — 调研员角色。被 idea-team 主编排器调用,或用户单独说"调研一下 X"、"X 的现状/竞品/数据"、"找 2026 数据"、"事实底"时触发。**用 WebSearch 拉真实 2026…
想法群聊室主持人 — 把一句话想法丢给多角色 AI 团队(调研员/反方/类比者)做查漏补缺。每个角色有自己的 voice,他们互相 @ 接话;你随时插话。**这是创意扩展工具,不打分、不否决、不堵路**。Use when…
端到端产品教练 — 把一句话想法走到 PRD + 可点击 HTML 原型。会顶嘴、强制砍功能、用 Nielsen + Norman 做友好性硬检。Use when user 说"我有一个想法"、"想做一个产品"、"做 MVP"、"写…
Mobile app UI design expert for iOS and Android. Use when designing app interfaces, creating design systems, ensuring…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.