Agent skill
verification-loop
Run verify → identify failures → fix → verify again until all checks pass. Iterative quality enforcement loop for reaching a clean state before committing or releasing.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/verification-loop-corbat-tech-coco
SKILL.md
Verification Loop
Iterative loop: run all checks → fix failures → repeat until clean.
Loop Structure
while (not all passing):
1. Run full verification suite
2. If all pass → DONE ✅
3. Identify the first/most critical failure
4. Fix it (minimal change)
5. Go to 1
Maximum iterations: 10 (if not clean after 10, report blockers and stop)
Step 1: Initial State
pnpm format:fix 2>&1
pnpm typecheck 2>&1 | head -30
pnpm lint 2>&1 | head -30
pnpm test 2>&1 | tail -20
Count failures per category to plan the fix order.
Step 2: Fix Priority Order
Fix in this order (each category may create/expose the next):
- Formatting — run
pnpm format:fixto auto-fix style issues before anything else - TypeScript import errors — missing
.jsextensions, wrong paths - TypeScript type errors — incorrect types, missing returns
- Lint errors — oxlint violations
- Test failures — logic errors, unhandled cases
Step 3: Fix One Category at a Time
TypeScript Errors
pnpm typecheck 2>&1
Fix each error, re-run, confirm count decreases.
Lint Errors
pnpm lint 2>&1
Fix each oxlint error. Common fixes:
no-explicit-any→ use proper type orunknownno-unused-vars→ remove or prefix with_prefer-const→ changelettoconst
Test Failures
pnpm test 2>&1
For each failing test:
- Read the failure message
- Read the test to understand expected behavior
- Read the implementation to find the bug
- Fix the implementation (not the test, unless test is wrong)
Step 4: Verify Clean
pnpm check
If output shows 0 errors across typecheck + lint + test → DONE.
Circuit Breaker
Stop and report to user if:
- Same error persists after 3 fix attempts
- Fix introduces more errors than it resolves
- Error requires architectural change (not a simple fix)
- Missing dependency needs
pnpm add
Final Report
## Verification Loop Complete
### Iterations: N
### Fixed
- TypeScript: N errors fixed
- Lint: N errors fixed
- Tests: N failures fixed
### Status
✅ pnpm check — ALL PASSING
Coverage: X%
### Remaining Issues (if any)
- [blocker requiring user decision]
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?