Catalog
affaan-m/verification-loop

affaan-m

verification-loop

Run a six-phase verification of a Claude Code session's work — build, type check, lint, tests with coverage, security grep, and diff review — then produce a PASS/FAIL verification report. Use when verifying work after completing a feature or refactor, before creating a PR, or when quality gates must pass.

NewUpdated Oct 12, 2026

Verification Loop Skill

A comprehensive verification system for Claude Code sessions.

When to Use

Invoke this skill:

  • After completing a feature or significant code change
  • Before creating a PR
  • When you want to ensure quality gates pass
  • After refactoring

Verification Phases

Phase 1: Build Verification

set -o pipefail  # report the build's exit status, not tail's
# Check if project builds
npm run build 2>&1 | tail -20
# OR
pnpm build 2>&1 | tail -20

If build fails, STOP and fix before continuing.

Phase 2: Type Check

set -o pipefail
# TypeScript projects
npx --no-install tsc --noEmit 2>&1 | sed -n '1,30p'

# Python projects
pyright . 2>&1 | sed -n '1,30p'

Report all type errors. Fix critical ones before continuing.

Phase 3: Lint Check

Use sed to limit displayed output while consuming the whole stream. This keeps a successful linter from failing on SIGPIPE when pipefail is enabled.

set -o pipefail
# JavaScript/TypeScript
npm run lint 2>&1 | sed -n '1,30p'

# Python
ruff check . 2>&1 | sed -n '1,30p'

Phase 4: Test Suite

set -o pipefail
# Run tests with coverage
npm run test -- --coverage 2>&1 | tail -50

# Check coverage threshold
# Target: 80% minimum

Report:

  • Total tests: X
  • Passed: X
  • Failed: X
  • Coverage: X%

Phase 5: Security Scan

# Check for secrets
grep -rn "sk-" --include="*.ts" --include="*.js" . 2>/dev/null | head -10
grep -rn "api_key" --include="*.ts" --include="*.js" . 2>/dev/null | head -10

# Check for console.log
grep -rn "console.log" --include="*.ts" --include="*.tsx" src/ 2>/dev/null | head -10

Phase 6: Diff Review

# Show what changed
git diff --stat
git diff HEAD~1 --name-only

Review each changed file for:

  • Unintended changes
  • Missing error handling
  • Potential edge cases

Output Format

After running all phases, produce a verification report:

VERIFICATION REPORT
==================

Build:     [PASS/FAIL]
Types:     [PASS/FAIL] (X errors)
Lint:      [PASS/FAIL] (X warnings)
Tests:     [PASS/FAIL] (X/Y passed, Z% coverage)
Security:  [PASS/FAIL] (X issues)
Diff:      [X files changed]

Overall:   [READY/NOT READY] for PR

Issues to Fix:
1. ...
2. ...

Continuous Mode

For long sessions, run verification every 15 minutes or after major changes:

Set a mental checkpoint:
- After completing each function
- After finishing a component
- Before moving to next task

Run: /verify

Integration with Hooks

This skill complements PostToolUse hooks but provides deeper verification. Hooks catch issues immediately; this skill provides comprehensive review.

Files1
1 files · 1.0 KB

Select a file to preview

Overall Score

79/100

Grade

B

Good

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

82

Quality

76

Clarity

85

Completeness

71

Summary

A comprehensive verification system that guides agents through six sequential quality checks on a codebase: build compilation, type checking, linting, test coverage, security pattern scanning, and git diff review. The skill produces a structured PASS/FAIL report and is intended for use after feature completion, before PR submission, or during continuous verification checkpoints.

Detected Capabilities

shell executionfile reading (grep, git)build command executiontest runner executionlinter executiontype checker executiongit diff inspectionoutput parsing and formatting

Trigger Keywords

Phrases that agents use to match this skill to user intent.

verify code qualitypre-pr verificationrun quality gatestest coverage checksecurity pattern scanbuild and lint check

Risk Signals

INFO

grep for patterns matching secret-like strings (sk-, api_key, console.log)

Phase 5: Security Scan
INFO

Shell command execution with pipefail and output limiting via sed/tail

Phases 1-5
INFO

Git operations (diff, diff --stat) to inspect repository state

Phase 6: Diff Review

Use Cases

  • Verify code quality before creating a pull request
  • Run comprehensive checks after completing a feature or refactor
  • Establish quality gates and identify blocking issues before merging
  • Continuously verify work during long coding sessions at regular intervals
  • Generate structured verification reports for code review workflows

Quality Notes

  • Well-structured multi-phase approach with clear progression and explicit STOP conditions
  • Output format is concrete and machine-parseable, enabling downstream automation
  • Instructions document output limiting techniques (sed, tail, head) to prevent tool failures with pipefail
  • Clear use cases and trigger scenarios provided
  • Handles multiple project types (Node.js with npm/pnpm, Python with pyright/ruff)
  • Grep patterns for secrets are simplistic (sk-, api_key) and may have false positives; does not cover all secret types
  • Phase 6 diff review relies on git history; instructions do not document behavior for initial commits or fresh branches
  • No explicit guidance on coverage threshold enforcement (80% target mentioned but no actionable fix steps)
  • Continuous mode section suggests mental checkpoints but lacks automation details
  • Does not document how to handle missing build script or type checker in projects
Model: claude-haiku-4-5-20251001Analyzed: Oct 12, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

  1. v3.1

    Content updated

    ✦ AIReplaces `head` with `sed` output truncation across build, lint, and type-check phases to prevent pipeline breakage with pipefail enabled

    2026-10-12

    LATEST
  2. v3.0

    Contract changed: description

    ✦ AIClarifies verification phases (build, type check, lint, tests with coverage, security grep, diff review) and success criteria (PASS/FAIL report).

    triggering2026-09-27

    View This Version
  3. v2.0

    Contract changed: description

    ✦ AIAdds set -o pipefail to type-check phase; switches to npx --no-install for TypeScript compilation.

    triggeringlicense2026-09-09

    View This Version
  4. v1.2

    Content updated

    ✦ AINo behavioral changes detected.

    2026-07-14

    View This Version
  5. v1.1

    Content updated

    ✦ AIAdds LICENSE file.

    2026-04-20

    View This Version
  6. v1.0

    Seeded from github.com/affaan-m/everything-claude-code

    2026-03-16

    View This VersionInitial version

Use affaan-m/verification-loop in your dev environment

Command Palette

Search for a command to run...