donewhen-extract

donewhen-extract is a skill for Claude Code from XRenSiu/claude-code-forge. It costs 307 tokens per session (4,457 once invoked), scanned A, original, MIT.

An acceptance-criteria extraction workflow turns a vague issue or run into specific conditions for deciding whether that one delivery is done. It uses Given/When/Then-style statements, where a starting situation, an action, and an observable result form a testable condition.

In plain words
What is it for?
Use it when an issue lacks clear acceptance criteria, to define observable outcomes for a feature, bug fix, or other single delivery.
Why use it?
A sentence such as “the request was fulfilled” cannot be reliably tested and may lead to boilerplate criteria. This workflow separates delivery-specific checks from rules that must always hold and prepares the draft for human sign-off.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the sdlc plugin — 14 skills, 5 agents shipped together

Install

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.

agentmods
npx agentmods add skills/xrensiu/claude-code-forge/donewhen-extract
Any agent
npx skills add XRenSiu/claude-code-forge --skill donewhen-extract
Clone the repo
git clone --depth 1 https://github.com/XRenSiu/claude-code-forge

Made for: Claude Code.

Or install sdlc, the plugin that ships this one along with the rest of its 14 skills, 5 agents.

Wrote 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.

agentmods badge for donewhen-extract

README.md
[![agentmods](https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/donewhen-extract.svg)](https://agentmods.dev/skills/xrensiu/claude-code-forge/donewhen-extract)
Your own site
<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>
Per session 307 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,457 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured yesterday against content hash f74734911bfc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/convert_v1_to_v2.py, scripts/validate_done_when_v2.py, scripts/verify_done_when.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/sdlc/skills/donewhen-extract/SKILL.md · 232 lines

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.yamlbounded_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).

Read the full file on GitHub · 232 lines

Changes

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.

  1. yesterday First seen · 232 lines · 307 tokens per session scan A f74734911bfc

Subscribe to this mod's changes

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.