SuperAPI AI Directory

verification-loop

Coding & development

View repository

Updated 10-16 04:45

About this skill

Verification Loop Skill

A comprehensive verification system for Claude Code sessions.

When to use

Invoke this skill in the following scenarios:

  • After completing feature development or major code changes
  • Before creating a pull request (PR)
  • When you want to ensure passing quality gates
  • After refactoring

Verification phases

Phase 1: Build Verification

# 检查项目是否构建成功
npm run build 2>&1 | tail -20
# 或者
pnpm build 2>&1 | tail -20

If the build fails, pleasestopand fix it before continuing.

Phase 2: Type Checking

# TypeScript 项目
npx tsc --noEmit 2>&1 | head -30

# Python 项目
pyright . 2>&1 | head -30

Report all type errors. Fix critical errors before continuing.

Phase 3: Lint Check

# JavaScript/TypeScript
npm run lint 2>&1 | head -30

# Python
ruff check . 2>&1 | head -30

Phase 4: Test Suite

# 运行带覆盖率的测试
npm run test -- --coverage 2>&1 | tail -50

# 检查覆盖率阈值
# 目标:最低 80%

Report:

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

Phase 5: Security Scan

# 检查密钥/机密
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

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

Phase 6: Diff Review

# 显示变更内容
git diff --stat
git diff HEAD~1 --name-only

Review each changed file:

  • Unintended changes
  • Missing error handling
  • Potential edge cases

Output format

After running all phases, generate a verification report:

验证报告(VERIFICATION REPORT)
==================

构建 (Build):     [通过/失败]
类型 (Types):     [通过/失败] (X 个错误)
Lint:            [通过/失败] (X 个警告)
测试 (Tests):     [通过/失败] (X/Y 通过, Z% 覆盖率)
安全 (Security):  [通过/失败] (X 个问题)
变更 (Diff):      [X 个文件已变更]

总体评价:   [已就绪/未就绪] 提交 PR

待修复问题:
1. ...
2. ...

Continuous mode

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

设定心智检查点:
- 完成每个函数后
- 完成一个组件后
- 在进入下一个任务前

运行:/verify

Integration with Hooks

This skill is PostToolUse a complement to Hooks, but provides more in-depth verification. Hooks catch issues immediately; this skill provides a comprehensive review.