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/linxule/kimi-plugin-cc/swarmgit clone --depth 1 https://github.com/linxule/kimi-plugin-ccWrote 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/linxule/kimi-plugin-cc/swarm)<a href="https://agentmods.dev/commands/linxule/kimi-plugin-cc/swarm"><img src="https://agentmods.dev/badge/commands/linxule/kimi-plugin-cc/swarm.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.00064 | $0.01049 |
| Opus 5 | $0.00032 | $0.00524 |
| Sonnet 5 | $0.00013 | $0.00210 |
| Haiku 4.5 | $0.00006 | $0.00105 |
Grade A, and why
swarm 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 4d 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
Run the companion with any user-supplied flags appended after task swarm:
${CLAUDE_PLUGIN_ROOT}/scripts/companion.sh task swarm <args>
/kimi:swarm is a parallel fan-out: Kimi uses the AgentSwarm tool to fan the work out across subagents (one per file/module/question), then consolidates into one markdown report. By default it is read-only, enforced by the same PreToolUse hook as /kimi:review — the hook runs under the swarm label (read-only tool set plus AgentSwarm), and every spawned subagent inherits that label and fires the same hook (policy index 0), so a subagent's write/edit/shell call is denied exactly like a single-turn review's.
--write turns it into a write-capable fan-out: the coordinator and coder subagents run inside an ephemeral throwaway git worktree off your HEAD, edit disjoint targets there, and the result is captured as a reviewable patch (written to a .patch file whose path is printed in the report). Writes are confined to that worktree by the swarm-write hook label (rescue-grade allowlist, scoped to a forge-proof trusted worktree root — not the payload cwd); git mutation and out-of-worktree writes are denied; the plugin never applies or commits — you own the merge. Your real working tree is never touched.
Supported flags:
--write— fan out EDITS (not just review). Requires kimi-code >= 0.18.0, a git repo with a committed HEAD, and the PreToolUse hook. Bases the worktree on HEAD: uncommitted changes are NOT included (you'll get a warning) — commit or stash first if the swarm needs them.--writeis also reachable via the model-invocablekimi-swarm-writesubagent, with strict triggering (many disjoint write targets AND explicit fan-out intent); auto-dispatch widens no write surface and keeps every bound, and the slash command itself stays human-only.--budget <duration>— HARD wall-clock ceiling (e.g.30m,1h,90s; bare number = minutes). Default 30m. The always-on bound on cost/runaway.--cap <N>— SOFT cap on TOTAL subagent count: injected into the prompt as a model instruction. Advisory, not hook-enforced (the hook is stateless and can't count subagents), so the model may exceed it. Bounds lifetime total, not peak parallelism.--max-concurrency <N>— HARD ceiling on how many subagents run AT ONCE, on kimi-code 0.18.0+ (exported asKIMI_CODE_AGENT_SWARM_MAX_CONCURRENCY; older binaries ignore it). Defaults to 4 for read, 1 for--write(writes serialize by default since disjoint-target partitioning is prompt-only) — pass a value to widen or throttle. Distinct from--cap: concurrency (simultaneous) ≠ total count (lifetime).-m,--model <name>
Prototype limitations:
- No
--backgroundflag — the runtime has no detached-worker mode for swarm. That is separate from how the caller runs the shell command: for--write(30m default budget vs a 10-minute foreground Bash cap) detaching the call is expected; for a read-only fan-out the default stays foreground and detaching is a per-request choice.--budgetand--max-concurrencystay finite either way, and budget expiry still captures the patch/report. To stop a run, just say so — the stop path iscompanion.sh cancelwith no id (it targets the latest running job for this repo). For--write, prefer that over Esc: an interrupt can kill the run mid-teardown and lose the captured patch. - Read-only swarm requires kimi-code >= 0.12.0 (the
AgentSwarmtool);--writerequires >= 0.18.0 (the hard concurrency cap). Both refuse without the/kimi:setupPreToolUse hook (a fan-out with no enforcement is an N-fold blast radius).
Return the companion stdout verbatim.
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.
- 4d ago First seen · 29 lines · 64 tokens per session scan A 85b36b2c6799
swarm is a command published in the GitHub repository linxule/kimi-plugin-cc (37 stars, last pushed 5d ago), licensed Apache-2.0. It adds 64 tokens to every session and 1,049 once invoked, about $0.0003 per session on Opus 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
edison.list
This obsolete slash command is disabled for this repository.
papi-audit
Audit the latest changes in this branch for bugs and compliance with the project's conventions defined in CLAUDE.md.
test
You are filling in a test finding for this session. Read the docs/ directory for any test schema or guidelines first.
review
委派模型对本地 git 改动做代码审查。只读不改文件。--adversarial 切对抗式设计审查;可用 -- 指定模型.
workflow
把批量委派编排成 dynamic workflow——N 个 item 各派一个委派模型子进程并行处理。适合 50 个文件各转一次、N 个模块各审一次等同构批量。.
ask
委派模型回答/分析/审/咨询。只读不改文件(Read/Grep/Glob + Bash(git:))。主 Claude 会智能补 --with-context、选模型。.