Agent skill
verification-loop
Rigorous protocol for verifying code correctness before considering a task complete.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/verification-loop-atlasrox-super-fiesta
SKILL.md
✅ Verification Loop Protocol
Goal: Ensure zero regressions and 100% functional correctness for every change.
📝 The Instruction
When to run: After writing code, but BEFORE asking the user for review.
Protocol Steps:
-
Define Success State:
- What exactly should happen if this works? (e.g., "The API returns 200 OK with JSON X").
- What should not happen? (e.g., "The server should not crash on null input").
-
Reproduction / Test Creation:
- Case A (Bug Fix): Create a minimal reproduction script that fails before your fix and passes after.
- Case B (New Feature): Write a unit/integration test covering the happy path AND one edge case.
-
Execute & Observe:
- Run the test using
run_command. - CRITICAL: Do not assume it passed. Read the output closely.
- If it failed, analyze the error, fix the code, and GOTO Step 2.
- Run the test using
-
Regression Check:
- Run related existing tests (e.g.,
npm test tests/related-file.js). - If you broke something, FIX IT.
- Run related existing tests (e.g.,
-
Self-Correction:
- "Did I leave any
console.log?" - "Did I leave any TODOs?"
- "Is the code style consistent?" (Check
rules/coding-style.md).
- "Did I leave any
-
Final Output:
- Only when all checks pass, report to the user:
- "Verification Passed: [Test Name]✅"
🔍 Troubleshooting
- "Tests are flaky": Investigate concurrency or shared state. Fix the test, don't ignore it.
- "I can't run tests": Create a small standalone script (e.g.,
verify-fix.js) and run that withnode.
Trust, but verify.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?