Borrowing it
Nothing to install: this file belongs to shirenchuang/agentbro. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shirenchuang/agentbro/main/.claude/commands/add-agent.mdgit clone --depth 1 https://github.com/shirenchuang/agentbroWrote 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/shirenchuang/agentbro/add-agent)<a href="https://agentmods.dev/commands/shirenchuang/agentbro/add-agent"><img src="https://agentmods.dev/badge/commands/shirenchuang/agentbro/add-agent/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/commands/shirenchuang/agentbro/add-agent"><img src="https://agentmods.dev/badge/commands/shirenchuang/agentbro/add-agent.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.00019 | $0.00672 |
| Opus 5.5 | $0.00008 | $0.00269 |
| Sonnet 5.5 | $0.00004 | $0.00134 |
| Haiku 4.5 | $0.00002 | $0.00067 |
Grade A, and why
add-agent 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 1mo 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.
What it actually says
要新增的 Agent: $ARGUMENTS
按下面的步骤执行,每一步做完简短汇报再做下一步。不要并行,不要跳步。
1. 摸清需求
先问用户(用 AskUserQuestion):
- 该 Agent 的 CLI 命令名是什么(用于
which检测)? - Hook 配置格式是 JSON / YAML / TOML / 自定义?
- 配置文件相对路径(相对用户 home,比如
.foo/config.toml)? - 希望支持哪些事件(SessionStart / ToolUse / Notification …)?
2. 读参考实现
并行读这三个文件,建立模板印象:
src-tauri/src/agents/traits.rs—— trait 定义src-tauri/src/agents/kimi.rs—— 最简 TOML 实现 + 测试模板src-tauri/src/agents/profiles.rs—— 第 642 行起的kimi_profile()模板
3. 写适配器
在 src-tauri/src/agents/<agent-name>.rs 写新文件,模板基于 kimi.rs。只有 parse_event 里的事件名映射 和 is_installed 检测 是 Agent 特异的。
4. 注册
修改 src-tauri/src/agents/mod.rs:
- 顶部加
pub mod <agent_name>; all_adapters()(第 214 行附近) 加Box::new(<agent_name>::<Name>Adapter::new())impl_default_adapter!宏(第 255 行附近)加<agent_name>::<Name>Adapter
修改 src-tauri/src/agents/profiles.rs:
- 加
pub fn <name>_profile() -> AgentIntegrationProfile { ... } - 在
profile_for_agent()的 match 里加"<name>" => Some(<name>_profile()),
5. 写测试
在新文件底部加 #[cfg(test)] mod tests,至少覆盖:
SessionStart路由PreToolUse/PostToolUse路由- 一个失败/错误事件路由
6. 提示用户人工补的部分
输出一段清单告诉用户:
- 在
src/components/notch/AgentIcon.tsx(或对应映射处)补 icon - 在
src/i18n/locales/{en,zh,ja,ko,tr}.json五份文件都补展示名 - 在
README.md和README.en.md的"支持的 Agent"表加一行
(这些涉及视觉素材和措辞,建议人工而非 AI 完成。)
7. 收尾
运行 /check。全绿后回报最终改动文件清单。
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.
- 1mo ago First seen · 60 lines · 19 tokens per session scan A b35eac9f4403
add-agent is a command published in the GitHub repository shirenchuang/agentbro (165 stars, last pushed 27d ago), licensed Apache-2.0. It adds 19 tokens to every session and 672 once invoked, about $0.0001 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-08-30.
Other commands, from other repositories
grok_init
Discover, verify, and persist the local HTTP proxy used by Grok Build Supervisor.
latch-compact
Manually trigger a latch compaction for the current session.
unlatch
Confirmed toggle for latch Unlatched mode.
latch-gate
Manual gate (LLM go/no-go judgement) on a coding/build request.
latch-budget-approve
Unlock the rest of today for unlimited latch LLM invocations in this project.
latch-decay
Apply weekly decay + promote staging nodes that cleared the refcount bar.