AgentSkillsCN

verification

通过脚本化验证,并结合置信度评分,评估代码质量、运行静态分析与类型检查,或在代码完成前对其变更进行验证。

SKILL.md
--- frontmatter
name: verification
description: Script-based verification with confidence scoring. Use when verifying code quality, running linting/type checking, or validating code changes before completion.

Verification Skill

Run scripts → Score objectively → No opinions.

Quick Reference

  • Templates: See templates.md for reporting verification results

Core Rule

NEVER approve without running scripts. Exit codes are truth.


Scripts (Mandatory)

bash
# Run ALL before scoring
.claude/scripts/verification/test.sh      # 40% weight
.claude/scripts/verification/build.sh     # 20% weight
.claude/scripts/verification/lint.sh      # 20% weight
.claude/scripts/verification/typecheck.sh # 20% weight

Score Calculation

code
Score = (test×0.4) + (build×0.2) + (lint×0.2) + (typecheck×0.2)
Where: pass=100, fail=0
Total ScoreDecision
≥90%APPROVE
<90%REJECT with gaps

Verification Steps

  1. Read PLAN.md criteria
  2. Run each script, capture exit code + output
  3. Map criteria to script results
  4. Calculate weighted score
  5. Format response (APPROVE or REJECT)

Script Result Recording

ScriptExitWeightScore
test.sh0/140%0/40
build.sh0/120%0/20
lint.sh0/120%0/20
typecheck.sh0/120%0/20
Total-100%X%

Gap Analysis (For Rejections)

Each gap must include:

code
Gap: [Title]
- Script: Which failed
- Output: Relevant error
- Agent: Who should fix
- Fix: Specific instruction

Iteration Handling

IterationTone
1Detailed, educational
2Direct, focused on remaining
3 (final)Force decision

At iteration 3: Either "Deliver with caveats" OR "Escalate to user"


Anti-Patterns

Don'tDo
"Looks good to me"Run scripts, show exit codes
Approve to end loopScore based on evidence
Vague feedbackSpecific file:line fixes