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 skills/xrensiu/claude-code-forge/donewhen-extractnpx skills add XRenSiu/claude-code-forge --skill donewhen-extractgit clone --depth 1 https://github.com/XRenSiu/claude-code-forgeWrote 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/skills/xrensiu/claude-code-forge/donewhen-extract)<a href="https://agentmods.dev/skills/xrensiu/claude-code-forge/donewhen-extract"><img src="https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/donewhen-extract.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.1 | $0.00307 | $0.04457 |
| Opus 5 | $0.00153 | $0.02228 |
| Sonnet 5 | $0.00061 | $0.00891 |
| Haiku 4.5 | $0.00031 | $0.00446 |
Grade A, and why
donewhen-extract 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 yesterday.
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 — 232 lines — stays where its author put it; the contents beside it link to each section on GitHub.
donewhen-extract
Recover one Run's 本次验收 acceptance conditions — the done_when predicates this specific
execution must achieve to be judged done, distinct from a Territory's 常驻不变量 resident invariants
(every Run must always hold). This skill describes the world those predicates live in, the
criteria that separate a falsifiable one from boilerplate, the primitive that makes the
Given/When/Then shape mechanical, and the gates a draft must clear before a Contract is signed.
It prescribes no step order — the engine sequences the work; what follows are the gaps to
fill and the gates that must hold, in any order.
术语映射(在 sdlc 里怎么读这份文件)
本 skill 引自 qanat 仓库,正文保留其领域词汇;在 sdlc 里按下表读:
| 原文 | sdlc 里的对应物 |
|---|---|
| Territory(领地) | 一个 bounded context / 模块:dos.yaml 的 bounded_contexts.current_context;issue 的 Depends on DOS 所属上下文 |
| Run(一次执行) | 一次 issue → PR 的交付,即 .sdlc/<slug>/ 一个 slug |
| Contract / Contract 模板 | done_when.yaml(v2,以 AC 为单位);模板 = 同类需求复用的 AC 骨架 |
| R001(评估者与执行者隔离) | sdlc 的信息隔离:实现子 agent 看不到评审判据;验收在独立会话 |
| R002(闸门资产只能人签) | sdlc 的 G2(判据冻结 lock_done_when.py sign --by <人>)与 G3(例外复核) |
| 变更提案 / G2 签字(sdlc) / change proposal / G2 signing (sdlc) / NEEDS_HUMAN | assets/change_proposal.md 变更提案 + G2/G3 人签;账本 ledger.md 记 propose |
verify_g1 / review_g2(qanat 的机器闸 / 评审闸) |
sdlc L7 的 A 档机械验收 / C 档判断验收——注意与 sdlc 的 G1(世界裁决)、G2(判据冻结)不是同一对门 |
| MemoryAsset(eval_case / rubric_version / failure_memory) | 归档目录 specs/<slug>/ 里的测试集 / 评判 rubric;failure_memory = ledger.md 的 fail 行 + escape-defects.md |
| daemon / 运行时 | 本地测试与 CI;/sdlc 的 acceptance 阶段 |
calibration.resolved 事件 |
G3 记录里"标准不清"的改判(g3_record.md) |
The gap (why the engine can't just paraphrase the Issue)
A composite of three atoms: Judgment (what counts as a falsifiable 本次验收), Capability (the adjective→threshold rewrite + the happy/unhappy pairing + the exit contradiction/coverage checks), Control (done_when rides a Contract template — a gate asset only a human signs, R002).
What ships with it
16 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- assets/decisions_template.md 1.3 KB
- assets/done_when_card.yaml 3.7 KB
- eval/fixtures/card_bad_vague.yaml 1.4 KB
- eval/fixtures/card_good.yaml 1.4 KB
- eval/fixtures/v2_bad_file_existence.yaml 1.4 KB
- eval/fixtures/v2_bad_v1shape.yaml 1.4 KB
- eval/fixtures/v2_good.yaml 1.4 KB
- eval/gate.json 3.5 KB
- eval/report.md 2.4 KB
- references/anti_patterns.md 3.3 KB
- references/contradiction-coverage.md 3.6 KB
- references/done-when-v2-schema.yaml 3.8 KB
- references/given-when-then.md 5.1 KB
- scripts/convert_v1_to_v2.py 3.9 KB runs code
- scripts/validate_done_when_v2.py 8.1 KB runs code
- scripts/verify_done_when.py 8.5 KB runs code
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.
- yesterday First seen · 232 lines · 307 tokens per session scan A f74734911bfc
donewhen-extract is a skill published in the GitHub repository XRenSiu/claude-code-forge (2 stars, last pushed yesterday), licensed MIT. It adds 307 tokens to every session and 4,457 once invoked, about $0.0015 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-09-05.
Other skills, from other repositories
engram-testing-coverage
TDD and coverage standards for Engram. Trigger: When implementing behavior changes in any package.
nw-fp-clojure
Clojure language-specific patterns, data-first modeling, REPL-driven development, and spec.
strict-tdd
Strict RED->GREEN->REFACTOR test-driven development with enforcement. Never write production code before a failing test. Atomic commits per TDD cycle.
conductor-implement
Execute tasks from a track's implementation plan following TDD workflow.
tdd
This skill should be used when the user wants to implement features or fix bugs using test-driven development. Enforces the RED-GREEN-REFACTOR cycle with vertical slicing, context isolation between test writing and implementation, human checkpoints, and auto-test feedback loops. Uses multi-agent orchestration with the…
mobiai-mobile-tdd
You MUST use this before writing any implementation code for a mobile feature, bug fix, refactor, or behavior change. Tests come before implementation — no exceptions.