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/dwarvesf/dwarves-kit/draft-agentgit clone --depth 1 https://github.com/dwarvesf/dwarves-kitWhat 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.00053 | $0.01368 |
| Opus 5 | $0.00026 | $0.00684 |
| Sonnet 5 | $0.00011 | $0.00274 |
| Haiku 4.5 | $0.00005 | $0.00137 |
Grade A, and why
draft-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 2d 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 — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dispatch the meta-agent to generate a new subagent definition (or a mega-goal sub-goal file) from a description, then INSTALL it by default so it is runnable at runtime. Installing is local: the agent goes live in your ~/.claude/agents/ on the next session and lands in the repo working tree; it only reaches teammates if you commit + merge it (that stays PR-gated). --draft keeps the old behavior: stop at a staged draft, install nothing.
A sub-goal file (Mode B) is NOT installable (it is project content, not an agent); for Mode B this command always behaves as --draft and just writes the file to the goals staging path.
Usage
$ARGUMENTS is the description, optionally prefixed with --draft and/or a mode:
/kit:draft-agent agent: <one-line role>, generate + INSTALL a subagent (default)./kit:draft-agent --draft agent: <one-line role>, generate a staged draft only, no install./kit:draft-agent subgoal: <one-line unit of work>, draft a mega-goal sub-goal file (never installed)./kit:draft-agent <description>, no mode prefix: the meta-agent infers the mode and says which it picked.
Steps
-
Parse
--draft(if present), the mode (or let the agent infer it), and the description from$ARGUMENTS. -
Dispatch ONE
meta-agentsubagent. Give it the mode, the description, and a staging write-path (defaultdrafts/at the repo root; create it if missing). It writes the artifact there with the DRAFT marker on line 1 and returns a bounded summary (mode, path, name/tools/model or the sub-goalDone =). -
If
--draft, or the mode issubgoal: show the summary, open the staged file for review, and STOP. Nothing is installed. -
Otherwise (default, mode
agent): INSTALL it so it is dispatchable. Do this as the main agent (you have the tools the subagent does not):- Read the staged draft. Strip the first-line DRAFT marker.
- Write it to
agents/<name>.md(the repo source of truth), where<name>is the frontmattername:. Stamp provenance (SPEC-108): add agenerated-by: draft-agent <YYYY-MM-DD> <one-line context>line to the frontmatter (aftermodel:) so a generated agent is distinguishable from a hand-written one forever, and metric 11 (SPEC-073) can count its runtime catches. Keep<context>COLON-FREE (an unquoted YAML scalar breaks on:); use commas. Only draft-agent-generated agents carry this key; never add it to a hand-written agent. - Roster sync (REQUIRED ,
test-meta.shfails closed otherwise): add a| \` | ... |row todocs/MANUAL.md's agent table (the bulk; rootMANUAL.mdis a thin stub, SPEC-185), a row to thedocs/architecture.md"Command and agent V-phase inventory" table, and (only if you also added a command) theREADME.md` command rows. Match the existing row formats. - Run
bash tests/test-meta.sh. It MUST pass (it lints the new agent's frontmatter + the cross-refs). If it fails, fix the roster rows until green; do not leave a half-installed agent. - Activate it for runtime:
cp agents/<name>.md ~/.claude/agents/<name>.md(the dir Claude Code scans at session start). It is dispatchable on your next session / reload, not mid-conversation (CC discovers agents at startup). - Print, loudly: the agent
name, its granted tools andmodel, "live next session", and "undo:rm ~/.claude/agents/<name>.md(+ revert the repo rows)". The granted tools are the one thing to eyeball, since default-install skips the read-before-live gate. - Effectiveness-validate the new/changed agent (SPEC-088, diff-keyed). Dispatch the
agent-effectivenessvalidator on the agent def you just wrote (agents/<name>.md) -- and ONLY it, this is the diff-keyed trigger: the agent-author phase is the one point a new/changed agent def enters the repo, so validating here keys on the change, not every agent every run. It judges four lenses (tools minimal-yet-sufficient, description fires right, instructions unambiguous, tier fits) and returnsVERDICT: PASS | FLAGGED | UNVALIDATED. Advisory + ship-visible, never a mid-flight block (ADR-0024): surface the verdict; aFLAGGEDorUNVALIDATEDresult is a signal to revise the draft, not an auto-uninstall. This mirrors how/kit:docsdispatchesdoc-verifierat its Step 4.5.
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.
- 2d ago First seen · 45 lines · 53 tokens per session scan A a5ced9ae3f53
draft-agent is a command published in the GitHub repository dwarvesf/dwarves-kit (11 stars, last pushed 2d ago), licensed MIT. It adds 53 tokens to every session and 1,368 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
OPSX: Archive
Archive a completed change in the experimental workflow.
OPSX: Explore
Enter explore mode - think through ideas, investigate problems, clarify requirements.
OPSX: Sync
Sync delta specs from a change to main specs.
OPSX: Propose
Propose a new change - create it and generate all artifacts in one step.
OPSX: Apply
Implement tasks from an OpenSpec change (Experimental).
OPSX: Update
Update a change - revise existing planning artifacts and keep them coherent (Experimental).