/install clash-verge-auto-switch
Clash Verge Auto Switch
This skill gives Codex a reliable workflow for Clash Verge Rev and Mihomo proxy switching on macOS. It is meant for users who want a concrete node selected from a selector group, not just a passive health check.
When To Use It
Use this skill when the user asks to:
- speed test Clash Verge or Mihomo nodes
- switch the currently used Clash selector groups to the fastest node
- diagnose why the Clash controller cannot be reached
- install or remove a timed automatic switch job on macOS
Quick Start
Run the main script:
/usr/bin/python3 ~/.codex/skills/clash-verge-auto-switch/scripts/switch_fastest.py
By default it auto-discovers the current active selector chain from the live Clash controller. To inspect what it found:
/usr/bin/python3 ~/.codex/skills/clash-verge-auto-switch/scripts/switch_fastest.py --list-groups
Target explicit groups:
/usr/bin/python3 ~/.codex/skills/clash-verge-auto-switch/scripts/switch_fastest.py \
--group 'Proxy' \
--group 'ChatGPT'
Dry-run without changing selections:
/usr/bin/python3 ~/.codex/skills/clash-verge-auto-switch/scripts/switch_fastest.py --dry-run
Workflow
- Check whether the Mihomo controller is reachable.
- If the user did not name target groups, inspect the live
/proxiestree and auto-discover groups from the current active selection chain. - Expand
url-test,fallback, andload-balancegroups into leaf proxies, but do not rewrite nested selector groups unless the user explicitly targets them. - Test candidate proxies with the controller delay API and switch the selector group to the lowest-latency healthy node.
- Report the winning node, measured latency, and whether a switch happened.
Group Discovery
- Default mode is
--group-scope current, which follows the currently selected chain from the live Clash proxy tree. - Use
--group-scope top-levelwhen you want all top-level selector groups discovered from the current controller session. - Use
--group-scope allwhen you want every selector group in the current Clash instance. - Use explicit
--groupflags when the user wants exact control.
Scheduling
For a true custom-minute schedule on macOS, use the bundled launchd installer instead of Codex automations because Codex recurring schedules only support hourly intervals.
Install:
~/.codex/skills/clash-verge-auto-switch/scripts/install_launch_agent.sh \
--interval-minutes 30 \
--group-scope current
Remove:
~/.codex/skills/clash-verge-auto-switch/scripts/uninstall_launch_agent.sh
Notes
- Read runtime-notes.md when you need the generic controller discovery and group-detection rules.
- If the controller is offline, ask the user whether Clash Verge should be opened first or run the script with
--launch-if-needed.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install clash-verge-auto-switch - 安装完成后,直接呼叫该 Skill 的名称或使用
/clash-verge-auto-switch触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
clash-verge-auto-switch 是什么?
Use when the user wants Codex to speed test Clash Verge Rev or Mihomo proxies, auto-detect currently used Clash groups from the live controller, switch a sel... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 98 次。
如何安装 clash-verge-auto-switch?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install clash-verge-auto-switch」即可一键安装,无需额外配置。
clash-verge-auto-switch 是免费的吗?
是的,clash-verge-auto-switch 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
clash-verge-auto-switch 支持哪些平台?
clash-verge-auto-switch 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 clash-verge-auto-switch?
由 tankeito(@tankeito)开发并维护,当前版本 v1.0.0。