skills/clashctl-linux/SKILL.md
Bootstrap, operate, and troubleshoot `nelvko/clash-for-linux-install` on Linux hosts. Use when Codex needs to initialize Clash or Mihomo on a machine that may not already be installed, follow a daily-use SOP with `clashctl` and `clashsub`, inspect or edit `.env`, `resources/mixin.yaml`, or `resources/runtime.yaml`, manage subscriptions, Tun mode, Web UI secrets, upgrades, and uninstall, or quickly diagnose startup, port, service, subscription-conversion, or network-access problems. This skill vendors a trimmed upstream project copy under `scripts/upstream-project/` and should first try fetching the latest GitHub repository, then fall back to copying the bundled project files when GitHub access is slow or unavailable.
npx skillsauth add stvlynn/skills clashctl-linuxInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to initialize the project when it is missing, run the normal operator SOP when it is present, and shorten troubleshooting when something breaks.
whoami
echo "$SHELL"
uname -m
readlink /proc/1/exe
command -v clashctl || true
~/clashctl, but the real path comes from the installed .env.Always prefer the latest upstream repository first. Only fall back to the bundled copy under scripts/upstream-project/ when GitHub access is slow, blocked, or unavailable.
Prepare a working tree with:
rm -rf /tmp/clash-for-linux-install
git clone --depth 1 https://github.com/nelvko/clash-for-linux-install.git /tmp/clash-for-linux-install || {
mkdir -p /tmp/clash-for-linux-install
cp -R scripts/upstream-project/. /tmp/clash-for-linux-install/
}
cd /tmp/clash-for-linux-install
Then:
.env and change only the values that matter for this host.mihomo unless the user explicitly needs legacy clash.CLASH_CONFIG_URL in .env or pass the subscription URL directly to install.sh.bash install.sh.clashctl status, clashui, and clashsecret.If the fallback copy was used, call out that it is a trimmed vendored upstream copy and may lag behind the current GitHub head.
When an installation already exists:
.env first.resources/config.yamlresources/mixin.yamlresources/runtime.yamlresources/profiles.yamlruntime.yaml as generated output. Do not hand-edit it unless the user explicitly wants a temporary experiment.clashon: start the kernel and enable shell proxy variablesclashoff: stop the kernel and clear shell proxy variablesclashstatus: inspect statusclashlog: inspect logsclashproxy on|off: toggle only shell proxy variablesclashsub add '<url>'clashsub lsclashsub use <id>clashsub update [id]clashsub update --convert [id] only when validation or parser compatibility requires itclashsub logQuote any subscription URL that contains &, ?, or other shell-sensitive characters.
Understand the merge model before editing anything:
config.yaml is the active raw subscriptionmixin.yaml contains the highest-priority local overridesruntime.yaml is the merged runtime file actually passed to the kernelUse:
clashmixin -e to edit mixin safelyclashmixin -c to inspect the base subscriptionclashmixin -r to inspect the effective runtime configclashui prints the effective local and public Web UI endpointsclashsecret shows the current secretclashsecret <new_secret> rotates the secret and restarts the serviceclashtunclashtun onclashtun offRequire elevated privileges before changing Tun mode. Turn Tun off before uninstalling.
clashupgradeclashupgrade -vclashupgrade --releaseclashupgrade --alphabash uninstall.shUse this sequence:
.env.bin/ and resources/.resources/runtime.yaml instead of guessing ports or Web UI endpoints./var/log/<kernel>.log for many root installsresources/<kernel>.log for nohup or non-root installsresources/temp.yamlresources/temp.yaml.rawbin/subconverter/latest.logresources/profiles.logruntime.yaml or clashui.Start TUN listening errorunsupported kernel versionTun adapter listening atTUN listening ifaceinstall.sh or uninstall.sh.uninstall.sh can revoke shell hooks, service definitions, and cron entries cleanly.clashsub for subscriptionsclashmixin for custom rulesclashsecret for the Web UI tokenclashtun for Tun.env only for installation-wide defaults such as kernel choice, install path, GitHub proxy, or subscription user agent.scripts/upstream-project/
Trimmed vendored copy of the upstream project with the install scripts, command wrappers, init scripts, and required resources preserved. Use it as the fallback source for cp -R scripts/upstream-project/. /tmp/clash-for-linux-install/ when GitHub clone fails.Read references/project-map.md whenever you need the exact file layout, bundled fallback details, command cheat sheet, or failure-mode map.
tools
小红书搜索、发布、获取帖子详情。使用本地 MCP 服务器访问小红书内容,需要先登录。适用于搜索旅游攻略、美食推荐、获取帖子详情等场景。
tools
Manage Telegram sticker packs via tsticker CLI. Init, push, sync, download, and trace sticker packs. Use when user wants to create/update Telegram sticker packs, push stickers to Telegram, sync packs, or manage sticker collections. Integrates with create-sticker for end-to-end sticker generation → publish workflow.
tools
Reuse local Youtu-Tip GUI capabilities through a safe adapter CLI so OpenClaw/Codex-style agents can inspect desktop GUI state and perform guarded single-step actions on macOS.
development
Privacy-respecting web search powered by a local SearXNG instance. Use when searching the web, looking up information, researching topics, or needing quick answers. Supports multiple categories including general, images, videos, news, and more. Aggregates results from 70+ search engines without tracking.