Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add OpenMinis/MinisSkills --skill clash-controllergit clone --depth 1 https://github.com/OpenMinis/MinisSkillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/openminis/minisskills/clash-controller)<a href="https://agentmods.dev/skills/openminis/minisskills/clash-controller"><img src="https://agentmods.dev/badge/skills/openminis/minisskills/clash-controller/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/openminis/minisskills/clash-controller"><img src="https://agentmods.dev/badge/skills/openminis/minisskills/clash-controller.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00093 | $0.02024 |
| Opus 5.5 | $0.00037 | $0.00810 |
| Sonnet 5.5 | $0.00019 | $0.00405 |
| Haiku 4.5 | $0.00009 | $0.00202 |
Grade A, and why
Clash 控制器 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 14d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clash 控制器(Clash / mihomo RESTful API)
通过 clash-cli(封装 Clash RESTful API)在 Minis 内实时监控和控制 Clash / Mihomo。Clash 配置语法请参考官方文档,本文档只管运行态操作。
1. 入口授权(前提检查)
- Clash 必须正在运行(VPN / 代理开启),
external-controller才会监听端口。未启动时clash-cli报「连接失败」。 - 默认 API 地址
http://127.0.0.1:9090(本机 localhost)。 - secret 从环境变量
CLASH_SECRET读取;未设置则免认证直接访问。 - 入口检查:
clash-cli status能返回版本、模式、内存、策略组即通过。
clash-cli status
# mihomo 1.19.32 meta=True
# mode=rule mixed-port=7890 tun=True stack=gVisor
# 内存 31MB inuse=0KB
# 策略组 13 个:
# PROXY → AUTO
2. 状态检查
| 命令 | 说明 |
|---|---|
clash-cli status |
版本/模式/内存 + 所有策略组当前选择 |
clash-cli proxies |
列全部代理条目(含叶子节点与策略组) |
clash-cli proxies <组> |
查看某策略组当前选择、类型、成员列表 |
clash-cli traffic [秒] |
实时流量 SSE(默认 3 秒,显示瞬时速率+累计) |
clash-cli connections [N] |
活跃连接列表(host→策略组→命中规则→上下行),默认前 20 |
clash-cli configs |
当前运行配置(端口/tun/dns 等) |
clash-cli rules [N] |
规则列表(默认前 10) |
3. 常用任务
- 查当前选中节点:
clash-cli proxy get <组>(如PROXY) - 切换节点/策略:
clash-cli proxy set <组> <节点>(组内任意成员名,含 DIRECT)clash-cli proxy set PROXY DIRECT # 直连 clash-cli proxy set PROXY AUTO # 切回自动测速组 - 节点测速:
clash-cli test <节点名> [url] [timeout_ms];对组内全部节点测速clash-cli grouptest <组名> [url] [timeout_ms] - DNS 查询:
clash-cli dns query <域名> [type](走 mihomo 内部 DNS,返回 Answer 数组) - 日志:
clash-cli logs [秒数] [level](SSE,默认 3 秒) - 规则命中分析:mihomo 无
rule match端点,看每连接命中规则用clash-cli connections(最后一列显示匹配的规则名)
4. 影响边界(写操作)
- 写操作:
proxy set、conn close <id|all>、reload、PATCH/configs会改变运行状态,执行前先确认目标名存在(proxy get)。 conn close all会断开全部连接(SSH/下载会被打断)。reload重载配置可能导致短暂断线,配置改动应先备份再 reload。- 若配置文件含节点订阅密码等敏感信息,务必只备份到私有仓库,绝不推公共仓库。
5. 环境与安全注意事项
external-controller默认绑定127.0.0.1即可本地访问。- 勿改
0.0.0.0绑定(allow-lan: true且无 secret 时,局域网内可被访问,有风险)。如确需远程访问,务必设置 secret。 - 环境变量:
CLASH_API(默认http://127.0.0.1:9090)、CLASH_SECRET、CLASH_TIMEOUT(默认 8 秒)。 - 切换节点时节点名必须与策略组成员精确匹配(含空格/emoji/特殊字符,如「🇭🇰香港trojan1」)。
- 实测确认:mihomo 的
/traffic、/memory是裸 JSON 流(无data:前缀),/logs为标准 SSE,解析需兼容两种格式。
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 14d ago First seen · 132 lines · 93 tokens per session scan A 92d8d1357d81
Clash 控制器 is a skill published in the GitHub repository OpenMinis/MinisSkills (502 stars, last pushed 2d ago), licensed MIT. It adds 93 tokens to every session and 2,024 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-06.
Other skills, from other repositories
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…
next-cache-components-optimizer
Optimize the meaningful UI available immediately from a Next.js route on an initial load (hard navigation) or named client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route and entry point at a time; the shipped test then guards…