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 agentmods add commands/druide67/asiai/detect.zhgit clone --depth 1 https://github.com/druide67/asiaiWrote 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/commands/druide67/asiai/detect.zh)<a href="https://agentmods.dev/commands/druide67/asiai/detect.zh"><img src="https://agentmods.dev/badge/commands/druide67/asiai/detect.zh.svg" alt="Measured on agentmods" 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 | $0.00030 | $0.00597 |
| Opus 5 | $0.00015 | $0.00298 |
| Sonnet 5 | $0.00006 | $0.00119 |
| Haiku 4.5 | $0.00003 | $0.00060 |
Grade A, and why
detect.zh 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 5d 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.
This is a copy
100% identical to detect.ja — 50 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
What it actually says
asiai detect
使用 3 层级联自动检测推理引擎。
用法
asiai detect # 自动检测(3 层级联)
asiai detect --url http://host:port # 仅扫描指定 URL
输出
Detected engines:
● ollama 0.17.4
URL: http://localhost:11434
● lmstudio 0.4.5
URL: http://localhost:1234
Running: 1 model(s)
- qwen3.5-35b-a3b MLX
● omlx 0.9.2
URL: http://localhost:8800
工作原理:3 层检测
asiai 使用三层检测级联,从最快到最彻底:
第 1 层:配置(最快,~100ms)
读取 ~/.config/asiai/engines.json——之前运行中发现的引擎。无需重新扫描即可找到非标准端口的引擎(如 oMLX 在 8800)。
第 2 层:端口扫描(~200ms)
扫描默认端口加扩展范围:
| 端口 | 引擎 |
|---|---|
| 11434 | Ollama |
| 1234 | LM Studio |
| 8080 | mlx-lm 或 llama.cpp |
| 8000-8009 | oMLX 或 vllm-mlx |
| 52415 | Exo |
第 3 层:进程检测(兜底)
使用 ps 和 lsof 查找监听任意端口的引擎进程。能发现运行在完全意外端口上的引擎。
自动持久化
第 2 层或第 3 层发现的引擎自动保存到配置文件(第 1 层),加快下次检测。自动发现的条目在 7 天不活跃后清理。
多个引擎共享端口时(如 mlx-lm 和 llama.cpp 共用 8080),asiai 使用 API 端点探测来识别正确的引擎。
显式 URL
使用 --url 时仅扫描指定 URL。不读写配置——适用于一次性检查。
asiai detect --url http://192.0.2.10:11434,http://localhost:8800
另见
- config — 管理持久化引擎配置
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.
- 5d ago First seen · 74 lines · 30 tokens per session scan A 189f596dd71f
detect.zh is a command published in the GitHub repository druide67/asiai (11 stars, last pushed 5d ago), licensed Apache-2.0. It adds 30 tokens to every session and 597 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to detect.ja, differing in 50 lines, and is treated as a copy.
Other commands, from other repositories
perfup
Autonomous performance optimization: research, PoC, benchmark, implement, review, PR.
integrate-pipeline
Integrate a new document parsing pipeline into ParseBench: $ARGUMENTS.
netllm-connect
Wire Cursor, Claude Code, Codex, or Honcho to the local netllm router.
netllm-setup
First-time netllm install from this repo (uv sync, init, discover, verify).
netllm-swarm
Configure multi-machine LAN mesh for netllm (mDNS, peers, gateway).
/opsx-explore
Enter explore mode - think through ideas, investigate problems, clarify requirements.