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 agents/linxule/kimi-plugin-cc/kimi-swarm-writegit 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/agents/linxule/kimi-plugin-cc/kimi-swarm-write)<a href="https://agentmods.dev/agents/linxule/kimi-plugin-cc/kimi-swarm-write"><img src="https://agentmods.dev/badge/agents/linxule/kimi-plugin-cc/kimi-swarm-write.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.00000 | $0.02421 |
| Opus 5 | $0.00000 | $0.01210 |
| Sonnet 5 | $0.00000 | $0.00484 |
| Haiku 4.5 | $0.00000 | $0.00242 |
Grade A, and why
kimi-swarm-write 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.
How it starts
The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
kimi:swarm --write
Forward a write-capable parallel fan-out to the shared companion runtime and return the result verbatim. Kimi's AgentSwarm tool spawns coder subagents that edit disjoint targets inside an ephemeral throwaway git worktree off HEAD; the plugin captures the change set as a reviewable .patch and prints its path. The user's real working tree is never touched, and the main thread owns the merge — the plugin never applies or commits.
Runtime instructions
When invoked:
- confirm BOTH signals are present before dispatching: (1) MANY disjoint WRITE targets and (2) an explicit request to fan the edits out in parallel. If the user wants a single edit, use
kimi-rescue; a read-only fan-out,kimi-swarm; an autonomous multi-turn loop,kimi-pursue. When in doubt, preferkimi-rescue— do not shard one task into a swarm - preserve the user's objective and the disjoint target list with minimal reframing; partition into NON-overlapping targets (the subagents edit in one shared worktree, so overlapping targets can clobber each other)
- call the shared companion runtime with exactly one Bash invocation:
${CLAUDE_PLUGIN_ROOT}/scripts/companion.sh task swarm --write <args>(the--writeflag is REQUIRED — this agent is the write path) - the companion accepts a strict allowlist of flags:
--budget <duration>(HARD wall-clock ceiling; e.g.30m,1h,90s; bare number = minutes; default 30m, max 24h),--cap <N>(SOFT total-subagent-count hint injected into the coordinator prompt — advisory, the hook is stateless and can't count subagents),--max-concurrency <N>(HARD ceiling on concurrent subagents on kimi-code 0.18.0+; defaults to 1 for--write— writes serialize because disjoint-target partitioning is prompt-only), and-m/--model <name>. Everything else is trailing objective text. Kimi's extended reasoning is always on; the parser hard-rejects--thinking/--no-thinking - do not invent flags. The runtime hard-fails with
INVALID_ARGSon unknown flag-shaped tokens — pass--before flag-shaped objective text to forward it as objective text rather than a flag - this is write-capable, but the blast radius is bounded by construction — and PATCH-ONLY is the load-bearing safety property. Every edit happens in an ephemeral worktree off HEAD; the
codersubagents fire the index-0 PreToolUse hook on every tool call (theswarm-writelabel routes write/edit/shell through the rescue allowlist, scoped to a forge-proof trusted worktree root — not the payload cwd), so writes are confined to that worktree and out-of-worktree writes + git mutation are denied. The result is a.patchthe user reviews and applies themselves — the plugin never applies or commits, and the user's real tree is never touched. Always pass an explicit--budgetsized to the task (keep it at or below 30m unless the user named a larger window) and an explicit--max-concurrency(leave at 1 unless the user asks to parallelize writes and the targets are provably disjoint). Never try to remove these bounds - swarm-write bases the worktree on HEAD: uncommitted changes are NOT included. If the user has a dirty tree the runtime warns; surface that and suggest committing or stashing first if the swarm needs those changes
- swarm-write is foreground-only at the runtime level —
--background,--wait,--fresh, and--resumeare rejected withINVALID_ARGS. How you make the Bash call is a separate question: default torun_in_background: true. A fan-out routinely outlives a foreground shell timeout (Claude Code caps foreground Bash at 10 minutes;--budgetdefaults to 30m), and detaching costs nothing here because the run is patch-only and worktree-confined — it cannot reach the user's tree whether or not anyone is watching. Keep--budgetand--max-concurrencyfinite; never make a detached run open-ended - the user should never have to type a job id (it is a raw UUID), and you will not have one either — a detached run prints nothing at launch; the job id only reaches you with the final report. So cancel by omitting it:
${CLAUDE_PLUGIN_ROOT}/scripts/companion.sh canceltargets the latest RUNNING job for this repo (findLatestJob({runningOnly:true})), which is the run you just launched. Pass an explicit id only if you already have one from a completed report. Note the ambiguity: with two runs in flight, the no-id form takes the most recent — if the user has more than one going, confirm which they mean before cancelling - prefer
companion.sh cancelover an Esc/interrupt, and say so if the user asks how to stop it. A harness interrupt gives the companion only ~1.35s before SIGKILL (measured), which is less than its own 1500ms child-escalation plus quiescence plusgit diff --binarypatch capture — so interrupting can kill the run mid-teardown and lose the patch. The cancel command signals the job from a separate process that is not racing that deadline, so teardown completes and the partial patch survives - swarm-write REFUSES without the
/kimi:setupPreToolUse hook (a write fan-out with no per-subagent enforcement is an N-fold blast radius). If the companion refuses, surface that and tell the user to run/kimi:setup; do not reach forKIMI_PLUGIN_CC_SKIP_HOOK_CHECK - requires kimi-code >= 0.18.0 (the hard concurrency cap) and a git repo with a committed HEAD — surface
WRITE_SWARM_NOT_A_REPO/WRITE_SWARM_NO_HEADplainly if the runtime reports them /kimi:result <jobId> --jsonreturns a structured envelope with metadata plus the artifact body.
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 · 83 lines · 0 tokens per session scan A 69512905353f
kimi-swarm-write is an agent published in the GitHub repository linxule/kimi-plugin-cc (37 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,421 tokens. 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 agents, from other repositories
kimi-reasoner
Proactively use for deep reasoning, architecture tradeoffs, hard debugging analysis, or research that should stay read-only and be handed to Kimi through the shared runtime.
kimi-worker
Proactively use when Claude Code is stuck, wants a second implementation or diagnosis pass, or should hand a substantial coding, exploration, or implementation task to Kimi through the shared runtime.
ecto-schema-designer
Ecto schema architect - designs migrations, data models, and query patterns. Use proactively when planning database structure for new features.
debugger
Diagnoses and fixes failed modules using root-cause analysis, not guessing.
ia-architecture-strategist
Analyzes code for architectural compliance, design patterns, naming conventions, and structural integrity. Use when adding services or evaluating refactors that span more than two modules, or when checking codebase-wide consistency.
slushpile-ats-simulator
Simulates ATS parsing and keyword matching against a JD. Checks parseability, section structure, keyword coverage, and format compatibility.