0
Build a verification-loop skill that must run tests before done
Create a skill that forces a red→green verification loop so Claude cannot claim done without running the suite.
The problem
Claude sometimes stops after code changes without proving tests pass, leaving broken main.
The hack
Add a `/verify` skill that states: run targeted tests, fix failures, re-run, and only then summarize.
Why it works
Anthropic has highlighted verification loops with skills as a reliability pattern for agentic coding.
Setup
1. Create `.claude/skills/verify/SKILL.md` with mandatory test commands for your stack. 2. Require Claude to paste failing output before fixes. 3. Invoke `/verify` at the end of every non-trivial task. 4. Optionally add a Stop/PostToolUse hook later if you need a hard gate.
Prompt
/verifyAdditional details
Put the exact test command in the skill so Claude does not invent a wrong one.
Discussion
No comments yet. Be the first to say whether this worked for you.