Verify

From excatt/superclaude-plusplus · View interactive version

Verify is an AI agent skill from the GitHub repository excatt/superclaude-plusplus. Ensure code quality with systematic 6-phase verification loop. Use after feature completion, before PR creation, after refactoring, or for periodic quality checks. Keywords: verify, verification, check, validate, quality, build, lint, test, security, pr-ready.

How to use this skill

Skill file

Dynamic Context

Current working state:

!git status --short 2>/dev/null

Recent changes:

!git diff --stat 2>/dev/null | tail -5

Verification Loop Skill

Purpose

Ensure quality through systematic 6-phase verification after code changes and confirm PR-ready state.

Core Principle: Build failure β†’ Immediate stop β†’ Fix issue β†’ Re-verify

Activation Triggers

6-Phase Verification Pipeline

Phase 1: Build Verification πŸ”¨

Purpose: Confirm project compilation/build success

# JavaScript/TypeScript
npm run build || pnpm build || yarn build

# Python
python -m py_compile src/**/*.py

# Go
go build ./...

# Rust
cargo build

On Failure: 🚨 Immediate stop - Build error resolution is top priority


Phase 2: Type Checking πŸ“

Purpose: Verify type safety

# TypeScript
npx tsc --noEmit

# Python (with type hints)
pyright src/ || mypy src/

# Flow
npx flow check

Output: Type error count and locations


Phase 3: Linting πŸ”

Purpose: Detect code style and potential issues

# JavaScript/TypeScript
npm run lint || npx eslint src/

# Python
ruff check src/ || flake8 src/

# Go
golangci-lint run

# Rust
cargo clippy

Output: Lint violation count and severity


Phase 4: Testing πŸ§ͺ

Purpose: Confirm test passing and coverage

# JavaScript/TypeScript
npm test -- --coverage

# Python
pytest --cov=src --cov-report=term-missing

# Go
go test -cover ./...

# Rust
cargo test

Criteria:


Phase 5: Security Scanning πŸ›‘οΈ

Purpose: Check security vulnerabilities and sensitive information exposure

5.1 Secrets Detection:

# Check .env, credentials, API keys
grep -r "PRIVATE_KEY\|SECRET\|PASSWORD\|API_KEY" src/ --include="*.ts" --include="*.js" --include="*.py"

5.2 Debug Statement Detection:

# Check console.log, print, debugger
grep -rn "console\.log\|console\.debug\|debugger" src/ --include="*.ts" --include="*.tsx" --include="*.js"
grep -rn "print(" src/ --include="*.py" | grep -v "# noqa"

5.3 Dependency Vulnerabilities (optional):

npm audit --audit-level=high
pip-audit

Output: List of discovered security issues


Phase 6: Diff Review πŸ“‹

Purpose: Final review of changes

git diff --stat
git diff HEAD~1 --name-only

Review Items:


Verification Modes

Quick Mode (`/verify quick`)

Fast verification - Execute Build + Type Check only

Phase 1: Build βœ…
Phase 2: Types βœ…
⏱️ Complete: ~30 seconds

Full Mode (`/verify` or `/verify full`)

Complete 6-phase verification

Phase 1: Build βœ…
Phase 2: Types βœ…
Phase 3: Lint βœ…
Phase 4: Tests βœ… (Coverage: 85%)
Phase 5: Security βœ…
Phase 6: Diff βœ…
⏱️ Complete: ~2-5 minutes

Pre-PR Mode (`/verify pre-pr`)

Strict verification before PR submission (Enhanced security)

Phase 1-6: Full verification
+ Additional security scan
+ Dependency vulnerability check
+ Commit message review

Pre-Commit Mode (`/verify pre-commit`)

Quick verification before commit

Phase 1: Build βœ…
Phase 2: Types βœ…
Phase 3: Lint βœ…
Phase 5: Security (secrets only) βœ…

Report Format

Success Report

╔══════════════════════════════════════════════════════╗
β•‘              🎯 VERIFICATION REPORT                  β•‘
╠══════════════════════════════════════════════════════╣
β•‘ Phase 1: Build        βœ… OK                          β•‘
β•‘ Phase 2: Type Check   βœ… OK                          β•‘
β•‘ Phase 3: Lint         βœ… OK (0 issues)               β•‘
β•‘ Phase 4: Tests        βœ… OK (47/47 passed, 85% cov)  β•‘
β•‘ Phase 5: Security     βœ… OK (0 issues)               β•‘
β•‘ Phase 6: Diff Review  βœ… OK (3 files changed)        β•‘
╠══════════════════════════════════════════════════════╣
β•‘ πŸ“Š Total Issues: 0                                   β•‘
β•‘ πŸš€ PR Ready: YES                                     β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Failure Report

╔══════════════════════════════════════════════════════╗
β•‘              🎯 VERIFICATION REPORT                  β•‘
╠══════════════════════════════════════════════════════╣
β•‘ Phase 1: Build        βœ… OK                          β•‘
β•‘ Phase 2: Type Check   ❌ FAIL (3 errors)             β•‘
β•‘   β†’ src/api/user.ts:45 - Type 'string' not assignableβ•‘
β•‘   β†’ src/utils/format.ts:12 - Missing return type     β•‘
β•‘   β†’ src/components/Card.tsx:78 - Property missing    β•‘
β•‘ Phase 3: Lint         ⚠️ WARN (2 warnings)           β•‘
β•‘ Phase 4: Tests        ⏸️ SKIPPED (blocked by Phase 2)β•‘
β•‘ Phase 5: Security     ⏸️ SKIPPED                     β•‘
β•‘ Phase 6: Diff Review  ⏸️ SKIPPED                     β•‘
╠══════════════════════════════════════════════════════╣
β•‘ πŸ“Š Total Issues: 5                                   β•‘
β•‘ πŸš€ PR Ready: NO                                      β•‘
β•‘                                                      β•‘
β•‘ πŸ”§ Suggested Fixes:                                  β•‘
β•‘ 1. Fix type errors in src/api/user.ts:45            β•‘
β•‘ 2. Add return type to formatDate function           β•‘
β•‘ 3. Add missing 'onClick' prop to Card component     β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Periodic Verification Strategy

Mental Checkpoints

Session Integration

Start work
    β”‚
    β”œβ”€β†’ Feature implementation
    β”‚       β”‚
    β”‚       └─→ [15min elapsed] β†’ /verify quick
    β”‚
    β”œβ”€β†’ Component completion
    β”‚       β”‚
    β”‚       └─→ /verify
    β”‚
    β”œβ”€β†’ Feature completion
    β”‚       β”‚
    β”‚       └─→ /verify full
    β”‚
    └─→ PR preparation
            β”‚
            └─→ /verify pre-pr

Integration with Other Skills

With `/checkpoint`

/checkpoint create "before-refactor"
... refactoring work ...
/verify full
/checkpoint verify "before-refactor"  # Compare changes

With `/feature-planner`

Auto-execute /verify at each Phase Quality Gate


Auto-Fix Suggestions

Suggest automatic fixes on verification failure:

| Issue Type | Suggested Fix |

|------------|---------------|

| Type Error | Add/modify type annotation |

| Lint Error | npm run lint -- --fix or ruff --fix |

| Missing Test | Suggest test case creation |

| console.log | Remove line or replace with logger |

| Security Issue | Suggest moving to environment variables |


Configuration

Project-specific configuration (.claude/verify.config.json):

{
  "coverageThreshold": 80,
  "skipPhases": [],
  "customCommands": {
    "build": "pnpm build",
    "test": "pnpm test:ci",
    "lint": "pnpm lint"
  },
  "securityPatterns": [
    "API_KEY",
    "SECRET",
    "PASSWORD",
    "PRIVATE_KEY"
  ],
  "ignoreFiles": [
    "**/*.test.ts",
    "**/*.spec.ts",
    "**/fixtures/**"
  ]
}

Quick Reference

| Command | Description |

|---------|-------------|

| /verify | Full 6-phase verification |

| /verify quick | Verify Build + Type only |

| /verify pre-pr | Strict verification before PR |

| /verify pre-commit | Quick verification before commit |

| /verify --fix | Fix auto-fixable issues |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.