donewhen-extract

donewhen-extract is a skill for Claude Code from XRenSiu/claude-code-forge. It costs 307 tokens per session (5,503 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 ai-dlc plugin — 30 skills, 5 agents shipped together

Good fit Use it when an issue lacks clear acceptance criteria, to define observable outcomes for a feature, bug fix, or other single delivery.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xrensiu/claude-code-forge/donewhen-extract
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.

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 ai-dlc, the plugin that ships this one along with the rest of its 30 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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for donewhen-extract

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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 5,503 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.05503
Opus 5.5 $0.00123 $0.02201
Sonnet 5.5 $0.00061 $0.01101
Haiku 4.5 $0.00031 $0.00550

Measured 1mo ago against content hash c81eef2a8785, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/convert_v1_to_v2.py, scripts/divergence.py, scripts/validate_done_when_v2.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/ai-dlc/skills/donewhen-extract/SKILL.md · 276 lines

How it starts

The opening of the file, as written. The whole thing — 276 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.

术语映射(在 AI-DLC 里怎么读这份文件)

本 skill 引自 qanat 仓库,正文保留其领域词汇;在 AI-DLC 里按下表读:

原文 AI-DLC 里的对应物
Territory(领地) 一个 bounded context / 模块:dos.yaml 的 bounded_contexts.current_context;issue 的 Depends on DOS 所属上下文
Run(一次执行) 一次 issue → PR 的交付,即 .aidlc/<slug>/ 一个 slug
Contract / Contract 模板 done_when.yaml(v2,以 AC 为单位);模板 = 同类需求复用的 AC 骨架
R001(评估者与执行者隔离) AI-DLC 的信息隔离:实现子 agent 看不到评审判据;验收在独立会话
R002(闸门资产只能人签) AI-DLC 的 G2(判据冻结 lock_done_when.py sign --by <人>)与 G3(例外复核)
变更提案 / G2 签字(AI-DLC) / change proposal / G2 signing (AI-DLC) / NEEDS_HUMAN assets/change_proposal.md 变更提案 + G2/G3 人签;账本 ledger.md 记 propose
verify_g1 / review_g2(qanat 的机器闸 / 评审闸) AI-DLC L7 的 A 档机械验收 / C 档判断验收——注意与 AI-DLC 的 G1(世界裁决)、G2(判据冻结)不是同一对门
MemoryAsset(eval_case / rubric_version / failure_memory) 归档目录 specs/<slug>/ 里的测试集 / 评判 rubric;failure_memory = ledger.md 的 fail 行 + escape-defects.md
daemon / 运行时 本地测试与 CI;/ai-dlc 的 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 · 276 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. 1mo ago Changed c81eef2a8785
  2. 1mo ago Changed · +6 lines 0fbc2daae7c7
  3. 1mo ago Changed db6582c5ee18
  4. 1mo ago Changed · +14 lines f0146d80ceac
  5. 1mo ago Changed · +24 lines 4667037b4056
  6. 1mo ago 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 1mo ago), licensed MIT. It adds 307 tokens to every session and 5,503 once invoked, about $0.0012 per session on Opus 5.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.