Agent SkillsGalaxy-Dawn/claude-scholar › verification-loop

verification-loop

GitHub

提供代码提交前的全面验证流程,涵盖构建、类型检查、Lint、测试、安全扫描及差异审查,确保代码质量并生成报告。

skills/verification-loop/SKILL.md Galaxy-Dawn/claude-scholar

Trigger Scenarios

用户要求验证代码或运行验证 创建 PR 前进行质量检查 完成功能开发或重构后

Install

npx skills add Galaxy-Dawn/claude-scholar --skill verification-loop -g -y
More Options

Use without installing

npx skills use Galaxy-Dawn/claude-scholar@verification-loop

指定 Agent (Claude Code)

npx skills add Galaxy-Dawn/claude-scholar --skill verification-loop -a claude-code -g -y

安装 repo 全部 skill

npx skills add Galaxy-Dawn/claude-scholar --all -g -y

预览 repo 内 skill

npx skills add Galaxy-Dawn/claude-scholar --list

SKILL.md

Frontmatter
{
    "name": "verification-loop",
    "version": "1.0.0",
    "description": "This skill should be used when the user asks to \"verify code\", \"run verification\", \"check quality\", \"validate changes\", or before creating a PR. Provides comprehensive verification including build, type check, lint, tests, security scan, and diff review."
}

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

Choose the commands adaptively for the current project instead of running every example blindly. Use the stack-appropriate command from references/STACK-DETECTION.md when the repo does not match the default examples below.

Phase 1: Build Verification

# Python projects (uv)
uv build 2>&1 | tail -20
# OR
python -m build 2>&1 | tail -20

# Node.js projects
npm run build 2>&1 | tail -20
# OR
pnpm build 2>&1 | tail -20

If build fails, STOP and fix before continuing.

Phase 2: Type Check

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

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

Report all type errors. Fix critical ones 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

# Python projects
pytest --cov=src --cov-report=term-missing 2>&1 | tail -50

# Node.js projects
npm run test -- --coverage 2>&1 | tail -50

Report:

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

Phase 5: Security Scan

# Python: Check for secrets
grep -rn "sk-" --include="*.py" . 2>/dev/null | head -10
grep -rn "api_key" --include="*.py" . 2>/dev/null | head -10
pip-audit

# Node.js: 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 debug statements
grep -rn "print(" --include="*.py" src/ 2>/dev/null | head -10
grep -rn "console.log" --include="*.ts" --include="*.tsx" src/ 2>/dev/null | head -10

Phase 6: Diff Review

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

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:

Set a mental checkpoint:
- After completing each function
- After finishing a component
- Before moving to next task

Run: /verify

Integration with Hooks

This skill complements PostToolUse hooks but provides deeper verification. Hooks catch issues immediately; this skill provides comprehensive review.

Reference Files

Load only what is needed:

  • references/STACK-DETECTION.md - how to choose the right verification command set for the current repo
  • references/REPORT-TEMPLATE.md - report structure for final verification output
  • examples/example-verification-report.md - example final report

Version History

  • 2f7766f Current 2026-07-25 09:10

Same Skill Collection

skills/agent-identifier/SKILL.md
skills/architecture-design/SKILL.md
skills/bug-detective/SKILL.md
skills/citation-verification/SKILL.md
skills/code-review-excellence/SKILL.md
skills/command-development/SKILL.md
skills/daily-coding/SKILL.md
skills/daily-paper-generator/SKILL.md
skills/doc-coauthoring/SKILL.md
skills/expression-skill/SKILL.md
skills/frontend-design/SKILL.md
skills/git-workflow/SKILL.md
skills/kaggle-learner/SKILL.md
skills/latex-conference-template-organizer/SKILL.md
skills/mcp-integration/SKILL.md
skills/ml-paper-writing/SKILL.md
skills/nature-polishing/SKILL.md
skills/nature-response/SKILL.md
skills/nature-writing/SKILL.md
skills/obsidian-kb-artifacts/SKILL.md
skills/obsidian-literature-workflow/SKILL.md
skills/obsidian-project-kb-core/SKILL.md
skills/obsidian-source-ingestion/SKILL.md
skills/paper-self-review/SKILL.md
skills/planning-with-files/SKILL.md
skills/plugin-structure/SKILL.md
skills/post-acceptance/SKILL.md
skills/publication-chart-skill/SKILL.md
skills/research-ideation/SKILL.md
skills/results-analysis/SKILL.md
skills/results-report/SKILL.md
skills/review-response/SKILL.md
skills/skill-development/SKILL.md
skills/skill-improver/SKILL.md
skills/skill-quality-reviewer/SKILL.md
skills/ui-ux-pro-max/SKILL.md
skills/uv-package-manager/SKILL.md
skills/web-design-reviewer/SKILL.md
skills/webapp-testing/SKILL.md
skills/zotero-obsidian-bridge/SKILL.md
skills/hook-development/SKILL.md
skills/nature-data/SKILL.md
skills/writing-anti-ai/SKILL.md
skills/defuddle/SKILL.md

Metadata

Files
0
Version
2f7766f
Hash
08b1c7de
Indexed
2026-07-25 09:10

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 06:57
浙ICP备14020137号-1 $Гость$