obra/superpowers · skills/verification-before-completion/SKILL.md
verification-before-completion
“A short, strict rule that makes your agent show real test output before it says "done." Worth having.”
What it does
A discipline skill: before the agent claims work is fixed, passing or complete, it must run the command that proves it, read the output, and report what that output shows. No commands of its own, just a gate.
- When the agent uses it
- Right before the agent says work is complete, fixed or passing, or before it commits or opens a PR.
- Who it is for
- Anyone tired of agents saying "should pass now"; skip it if your agent already reliably runs tests and quotes results.
- What it costs
- 94 lines, about 972 tokens once the agent loads it.
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
What it tells the agent to do
- Identify the command whose output would prove the claim.
- Run that command fresh and in full, not a partial or earlier run.
- Read the full output, check the exit code and count failures.
- If the output confirms the claim, state it with the evidence; if not, state the actual status.
- For regression tests, revert the fix and confirm the test fails, then restore it and confirm it passes.
- For delegated agents, check the VCS diff instead of trusting their success report.
- For requirements, re-read the plan, make a checklist, and verify each item.
Lines worth reading
Straight from the file, with why each one matters.
line 3Use when about to claim work is complete, fixed, or passing
A trigger tied to a moment rather than a topic. It fires on the agent's own urge to declare victory, which is when it matters.
line 35Skip any step = lying, not verifying
Blunt framing. It works because it removes the comfortable middle ground of "mostly checked.
line 84Revert fix → Run (MUST FAIL) → Restore → Run (pass)
The useful trick here: a regression test only counts once you've watched it fail without the fix.
line 47VCS diff shows changes
Telling: subagent success reports aren't trusted either. Check the diff, not the claim.
line 70Exhaustion ≠ excuse
Rationalizations written as if the model gets tired at 5pm. Funny, and it pre-empts excuses before they appear.
Watch out for
- Low
The red-green step tells the agent to revert a fix. Done carelessly on uncommitted work (e.g. a checkout), the fix could be lost.
line 84Revert fix → Run (MUST FAIL) → Restore → Run (pass)
The scorecard
- TriggerSays when to use it9/10
Names the moment and the words: complete, fixed, passing, committing, PRs.
- FocusOne clear job9/10
One job: no success claim without fresh evidence.
- LeanLight to load8/10
About 120 lines, but red flags, excuses and "when to apply" repeat each other.
- ConcreteSteps you can follow7/10
Clear gate and claim-to-evidence table, but no help finding the right command.
- SafeSafe to run9/10
No network, secrets or destructive commands. Only the revert step needs care.
What it does well
- The table pairing each claim with the evidence it needs, and what doesn't count, is specific and easy to check against.
- Covers subagent reports and requirement checklists, not just tests, which is where false "done" often hides.
- The red-green revert check for regression tests is a real technique most agents skip.
How it could be better
Say how to find the verification command
The gate begins with "what command proves this claim?" but gives the agent no place to look.
AddTo find the command, check in order: <project README test section>, package.json scripts / Makefile / pyproject, then the CI config (<e.g. .github/workflows/*.yml>). Use the same command CI runs.
Make the revert step non-destructive
Reverting a fix to watch the test fail can throw away uncommitted work if done with checkout or reset.
AddTo revert the fix temporarily, use `git stash push <changed files>` and later `git stash pop`, or commit first. Never use `git checkout --` or `git reset --hard` on uncommitted changes.
Show the shape of an evidence-backed report
Saying "state claim WITH evidence" is less useful than a template the agent can copy into its reply.
AddReport like this: Ran: `<command>` Result: <exit code>, <N passed / M failed> Status: <claim, or the actual state and what remains>
Merge the overlapping lists
Red Flags, Rationalization Prevention and When To Apply say much of the same thing, and every line stays in context.
Add## Red flags (stop and verify) - Words like "should", "probably", "Done!" before running anything - About to commit, push, open a PR, or move to the next task - Trusting a subagent's report or a partial check
Kin reviews against Anthropic’s Extend Claude with skills and agentskills.io’s the Agent Skills standard. It reads SKILL.md only, so a script beside it can still do things the file does not say.