AgentSkillsCN

verification-loop

面向 Go 项目的全方位验证体系,在功能开发完成后或创建 Pull Request 前运行,确保顺利通过质量关口。

SKILL.md
--- frontmatter
name: verification-loop
description: Go 프로젝트를 위한 포괄적인 검증 시스템. 기능 완료 후 또는 PR 생성 전에 실행하여 품질 게이트 통과 확인

Verification Loop

Comprehensive verification system for ensuring code quality before commits and PRs.

When to Activate

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

Verification Phases

Phase 1: Build Verification

bash
go build ./...

If build fails, STOP and fix before continuing.

Phase 2: Vet Check

bash
go vet ./...

Report all vet warnings. Fix before continuing.

Phase 3: Test Suite

bash
go test -race -cover ./...

Report:

  • Total tests
  • Passed / Failed
  • Coverage percentage
  • Race conditions detected

Phase 4: Security Scan

bash
# Check for hardcoded secrets
grep -rn "password\|secret\|api_key\|token" --include="*.go" .

# Check for debug prints
grep -rn "fmt.Println\|log.Print" --include="*.go" .

Phase 5: Diff Review

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

Review each changed file for:

  • Unintended changes
  • Missing error handling
  • Potential edge cases

Output Format

code
VERIFICATION REPORT
==================

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

Overall:   [READY/NOT READY] for PR

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

Continuous Mode

Run verification after:

  • Completing each function
  • Finishing a component
  • Before moving to next task