← Back to Skills Marketplace
kklldog

Clash Controller

by Minjie.ZHOU · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
295
Downloads
0
Stars
2
Active Installs
1
Versions
Install in OpenClaw
/install clash-controller
Description
管理Clash/mihomo代理环境,支持安装、启停代理、订阅管理、Web面板操作、Tun模式配置、升级内核等常用功能。触发场景:用户提到clash、mihomo、代理、clashctl、clashon、clashoff、clashui、订阅更新等关键词时使用。
README (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

注意事项

  1. 安装后必须先添加订阅才能正常使用
  2. 如需将面板暴露到公网,建议定期更换密钥或使用SSH端口转发
  3. Tun模式需要root权限,首次开启会自动配置相关内核参数
Usage Guidance
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.
Capability Analysis
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).
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install clash-controller
  3. After installation, invoke the skill by name or use /clash-controller
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug clash-controller
Version 1.0.0
License MIT-0
All-time Installs 2
Active Installs 2
Total Versions 1
Frequently Asked Questions

What is Clash Controller?

管理Clash/mihomo代理环境,支持安装、启停代理、订阅管理、Web面板操作、Tun模式配置、升级内核等常用功能。触发场景:用户提到clash、mihomo、代理、clashctl、clashon、clashoff、clashui、订阅更新等关键词时使用。 It is an AI Agent Skill for Claude Code / OpenClaw, with 295 downloads so far.

How do I install Clash Controller?

Run "/install clash-controller" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Clash Controller free?

Yes, Clash Controller is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Clash Controller support?

Clash Controller is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Clash Controller?

It is built and maintained by Minjie.ZHOU (@kklldog); the current version is v1.0.0.

💬 Comments