AgentSkillsCN

verify

在完成某项功能或重大代码变更后,运用此技能验证代码的质量与合规性。

SKILL.md
--- frontmatter
name: verify
description:
  Use this skill to verify code quality and conformance after completing a
  feature or signifiant code change

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: Run checks

bash
# For bun / typescript projects
bun run check 2>&1 | tail -20

# Projects with a Makefile
make check

If checks fail, STOP and fix before continuing.

Phase 2: Security Scan

bash
# 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 3: Diff Review

bash
# 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:

code
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:

markdown
Set a mental checkpoint:

- After completing each function
- After finishing a component
- Before moving to next task

Run: /verify