ClaudeHack
0.000

Build a verification-loop skill that must run tests before done

Testing / Debugging·14 hours ago·verified 14 hours ago·medium·~15 min setup·verified

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

/verify

Additional details

Put the exact test command in the skill so Claude does not invent a wrong one.

Source

anthropic·View original →·by Anthropic

Does this still work?

0 said it works · 0 said it's broken

Discussion

No comments yet. Be the first to say whether this worked for you.