← 返回 Skills 市场
Clash Controller
作者
Minjie.ZHOU
· GitHub ↗
· v1.0.0
· MIT-0
295
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install clash-controller
功能描述
管理Clash/mihomo代理环境,支持安装、启停代理、订阅管理、Web面板操作、Tun模式配置、升级内核等常用功能。触发场景:用户提到clash、mihomo、代理、clashctl、clashon、clashoff、clashui、订阅更新等关键词时使用。
使用说明 (SKILL.md)
Clash Controller Skill
核心功能
支持Clash/mihomo代理全生命周期管理,适配nelvko/clash-for-linux-install一键安装脚本的所有功能。
环境前置说明
当前环境Clash命令通过自定义脚本加载,非登录shell执行前需先初始化环境:
# 加载Clash命令环境(必须先执行)
source /home/kklldog/clashctl/scripts/cmd/clashctl.sh
# 或使用交互式shell执行命令
bash -i -c "clashsub ls"
用户SSH登录时会自动加载.bashrc里的配置,可直接使用命令。
常用操作指南
1. 安装Clash
git clone --branch master --depth 1 https://gh-proxy.org/https://github.com/nelvko/clash-for-linux-install.git \
&& cd clash-for-linux-install \
&& bash install.sh
默认带gh-proxy加速,如失效可更换为其他github加速地址。
2. 代理启停
- 开启代理:
clashon(自动配置系统代理) - 关闭代理:
clashoff(自动清除系统代理) - 查看运行状态:
clashctl status
3. 订阅管理
- 添加订阅:
clashsub add \x3C订阅链接>(支持http/https/file协议) - 查看订阅列表:
clashsub ls - 切换使用订阅:
clashsub use \x3C订阅ID> - 更新订阅:
clashsub update [订阅ID](加--auto配置自动更新,加--convert开启本地订阅转换) - 删除订阅:
clashsub del \x3C订阅ID>
4. Web管理面板
- 打开面板:
clashui(默认端口9090,自动显示内网/公网访问地址) - 重置面板密钥:
clashsecret \x3C新密钥>
5. Tun模式(全局流量代理)
- 查看状态:
clashtun - 开启Tun:
clashtun on(支持Docker等容器流量代理、DNS劫持) - 关闭Tun:
clashtun off
6. 其他功能
- 自定义配置(优先级高于订阅):
clashmixin -e - 升级内核:
clashupgrade - 卸载:在安装目录执行
bash uninstall.sh
注意事项
- 安装后必须先添加订阅才能正常使用
- 如需将面板暴露到公网,建议定期更换密钥或使用SSH端口转发
- Tun模式需要root权限,首次开启会自动配置相关内核参数
安全使用建议
This skill appears to implement a legitimate set of Clash management commands, but it instructs you to fetch and execute installer scripts from the network and to source a hardcoded path in /home/kklldog. Before installing: (1) inspect the install.sh and uninstall.sh in the nelvko/clash-for-linux-install repo locally (do not run them blindly); (2) avoid using untrusted proxies — clone directly from GitHub or verify the proxy's trustworthiness; (3) adapt or remove the hardcoded source path and ensure the environment setup is correct for your system; (4) be aware TUN mode requires root and will change kernel parameters — test in a VM or isolated environment first; (5) if you plan to expose the web panel, enforce strong authentication and consider SSH tunnel instead of direct public exposure. If you want higher assurance, request an explicit install spec with integrity checks (signed releases, checksums) or provide the repository and script hashes for verification.
功能分析
Type: OpenClaw Skill
Name: clash-controller
Version: 1.0.0
The skill automates the installation and management of Clash/mihomo proxies by downloading and executing scripts from an external GitHub repository (nelvko/clash-for-linux-install) via a third-party proxy (gh-proxy.org). While these actions align with the stated purpose, the pattern of fetching and running remote shell scripts (install.sh) and requesting root privileges for Tun mode presents a high-risk execution flow that could be exploited if the remote source is compromised. The instructions also include hardcoded local paths (SKILL.md).
能力评估
Purpose & Capability
The name/description (manage Clash/mihomo: install, start/stop, subscriptions, web UI, TUN mode, upgrade) aligns with the commands and operations documented. However the SKILL.md references a hardcoded path (/home/kklldog/...) to load the clashctl environment which is environment-specific and unlikely to exist on arbitrary hosts — this is an inconsistency that reduces portability and may indicate the instructions were copied from one user's machine.
Instruction Scope
The runtime instructions tell the agent/user to source an absolute path in another user's home and to run remote install/uninstall scripts (git clone + bash install.sh). They also instruct enabling TUN mode which requires root and automatically modifies kernel parameters. These actions operate at system level and execute remote code; while related to installing/managing Clash, they meaningfully expand the agent's rights (file, kernel, network) and could run arbitrary code fetched from the internet.
Install Mechanism
There is no formal install spec (instruction-only), but the instructions perform git clone of nelvko/clash-for-linux-install and directly run its install.sh. The clone uses gh-proxy.org as an accelerator/proxy rather than a direct GitHub HTTPS URL — relying on a third-party proxy for fetching installer scripts increases the risk of tampered content. Executing install.sh from the network without an integrity check is risky even if functionally consistent with installing Clash.
Credentials
The skill declares no required environment variables, credentials, or config paths beyond the hardcoded path it tells the user to source. It does not request unrelated secrets. The lack of credential requests is proportionate, but the hardcoded path is an unexplained environment dependency.
Persistence & Privilege
The skill is not always-enabled and does not request persistent credentials. However several operations require elevated privileges (TUN mode modifies kernel parameters, installation/uninstallation scripts may write system files), giving the installer high privilege on the host. This is consistent with the stated purpose but increases the blast radius if the remote installer is malicious or buggy.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install clash-controller - 安装完成后,直接呼叫该 Skill 的名称或使用
/clash-controller触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Clash Controller Skill 1.0.0 released with full lifecycle management for Clash/mihomo proxy environments.
- Supports seamless installation, startup, shutdown, and upgrade of Clash/mihomo proxies.
- Provides easy subscription management (add, update, delete, and switch proxies).
- Enables web UI management and quick system proxy toggle commands.
- Adds Tun mode for comprehensive network traffic proxying, including container support.
- All functions are accessible with simple command-line instructions and environment initialization.
- Contains clear usage guidelines and important operational notes for users.
元数据
常见问题
Clash Controller 是什么?
管理Clash/mihomo代理环境,支持安装、启停代理、订阅管理、Web面板操作、Tun模式配置、升级内核等常用功能。触发场景:用户提到clash、mihomo、代理、clashctl、clashon、clashoff、clashui、订阅更新等关键词时使用。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 295 次。
如何安装 Clash Controller?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install clash-controller」即可一键安装,无需额外配置。
Clash Controller 是免费的吗?
是的,Clash Controller 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Clash Controller 支持哪些平台?
Clash Controller 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Clash Controller?
由 Minjie.ZHOU(@kklldog)开发并维护,当前版本 v1.0.0。
推荐 Skills