Token导航 LogoToken导航TokenDH.com
研究检索权限需确认github未标认证来源可访问clear审计未展示

verification-before-completion完成前的验证

Agent Skill

verification-before-completion 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

12,171

周安装

315

GitHub Stars

公开资料未说明

下载量

2,383
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:verification-before-completion(完成前的验证)
来源仓库:https://github.com/chunkytortoise/enterprisehub
仓库路径:skills/verification-before-completion
安装命令:
npx skills add chunkytortoise/enterprisehub --skill "verification-before-completion"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add chunkytortoise/enterprisehub --skill "verification-before-completion"

简介

用于查找、检索和筛选相关信息。verification-before-completion 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合在需要根据关键词或任务场景快速定位候选结果时使用。
  • 可结合来源仓库和原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态及是否会触发联网或命令执行。
  • 适用于 Codex、Claude、Cursor、Gemini CLI 等宿主环境。

SKILL.md

name
Verification Before Completion
description
This skill should be used when the user asks to "verify the implementation", "check before finishing", "quality gates", "pre-completion validation", "verify before deploy", or needs comprehensive quality validation before marking work as complete.
version
1.0.0

Verification Before Completion: Quality Gates

Overview

Verification Before Completion implements comprehensive quality gates to ensure work meets standards before being marked as complete. This systematic approach prevents issues from reaching production and maintains high code quality standards.

The 5-Gate Verification Process

Gate 1: FUNCTIONAL - Feature Works as Specified

Verify that the implementation meets all functional requirements.

Validation Criteria:

  • All acceptance criteria are met
  • Core functionality works in happy path scenarios
  • Edge cases are handled appropriately
  • Error conditions are managed gracefully

Verification Steps:

# Manual testing
./scripts/test-functionality.sh

# Automated testing
npm test
python -m pytest

# Integration testing
./scripts/integration-tests.sh

Gate 2: TECHNICAL - Code Quality and Architecture

Ensure code adheres to quality standards and architectural principles.

Code Quality Checklist:

  • [ ] SOLID principles applied
  • [ ] DRY (Don't Repeat Yourself) violations addressed
  • [ ] Clear and descriptive naming
  • [ ] Proper error handling
  • [ ] No hardcoded values
  • [ ] Security best practices followed

Architecture Validation:

  • [ ] Follows established patterns
  • [ ] Proper separation of concerns
  • [ ] Maintainable and extensible design
  • [ ] Performance considerations addressed

Gate 3: TESTING - Comprehensive Test Coverage

Validate that all code paths are tested and tests are meaningful.

Coverage Requirements:

  • Lines: ≥80%
  • Branches: ≥80%
  • Functions: ≥90%
  • New code: 100%

Test Quality:

  • [ ] Unit tests for business logic
  • [ ] Integration tests for component interactions
  • [ ] Edge case testing
  • [ ] Error condition testing
  • [ ] Performance tests where applicable

Gate 4: SECURITY - Vulnerability Assessment

Ensure implementation is secure and follows security best practices.

Security Checklist:

  • [ ] Input validation implemented
  • [ ] SQL injection prevention
  • [ ] XSS protection applied
  • [ ] Authentication/authorization checked
  • [ ] Secrets management verified
  • [ ] Dependencies scanned for vulnerabilities

Gate 5: DEPLOYMENT - Production Readiness

Verify the code is ready for production deployment.

Deployment Readiness:

  • [ ] Environment configuration validated
  • [ ] Database migrations tested
  • [ ] Rollback procedures defined
  • [ ] Monitoring and logging implemented
  • [ ] Documentation updated
  • [ ] Change management followed

Automated Quality Gates

Pre-Commit Gates

#!/bin/bash
# .git/hooks/pre-commit

echo "Running pre-commit quality gates..."

# Gate 1: Code formatting
echo "🔍 Checking code formatting..."
if ! npx prettier --check .; then
    echo "❌ Code formatting failed"
    exit 1
fi

# Gate 2: Linting
echo "🔍 Running linter..."
if ! npx eslint src/ --max-warnings 0; then
    echo "❌ Linting failed"
    exit 1
fi

# Gate 3: Type checking
echo "🔍 Type checking..."
if ! npx tsc --noEmit; then
    echo "❌ Type checking failed"
    exit 1
fi

# Gate 4: Unit tests
echo "🔍 Running unit tests..."
if ! npm test; then
    echo "❌ Unit tests failed"
    exit 1
fi

echo "✅ All pre-commit gates passed!"

CI/CD Pipeline Gates

# .github/workflows/quality-gates.yml
name: Quality Gates

on: [push, pull_request]

jobs:
  quality-gates:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3

    # Gate 1: Dependencies
    - name: Install dependencies
      run: npm ci

    # Gate 2: Code quality
    - name: Run ESLint
      run: npx eslint src/ --max-warnings 0

    - name: Check formatting
      run: npx prettier --check .

    # Gate 3: Type safety
    - name: Type check
      run: npx tsc --noEmit

    # Gate 4: Testing
    - name: Run tests with coverage
      run: npm run test:coverage

    # Gate 5: Security scan
    - name: Run security audit
      run: npm audit --audit-level high

    # Gate 6: Build verification
    - name: Build application
      run: npm run build

Language-Specific Verification

Python Quality Gates

# scripts/python-quality-gates.py
import subprocess
import sys
from typing import List, Dict, Any

class PythonQualityGates:
    def __init__(self, src_dir: str = "src", test_dir: str = "tests"):
        self.src_dir = src_dir
        self.test_dir = test_dir
        self.results: Dict[str, Any] = {}

    def run_gate(self, name: str, command: List[str]) -> bool:
        """Run a quality gate command and record results"""
        print(f"🔍 Running {name}...")

        try:
            result = subprocess.run(
                command,
                capture_output=True,
                text=True,
                check=True
            )
            self.results[name] = {"status": "passed", "output": result.stdout}
            print(f"✅ {name} passed")
            return True
        except subprocess.CalledProcessError as e:
            self.results[name] = {
                "status": "failed",
                "output": e.stdout,
                "error": e.stderr
            }
            print(f"❌ {name} failed")
            print(e.stderr)
            return False

    def check_formatting(self) -> bool:
        """Verify code formatting with black"""
        return self.run_gate("Code Formatting", [
            "black", "--check", "--diff", self.src_dir, self.test_dir
        ])

    def check_imports(self) -> bool:
        """Verify import sorting with isort"""
        return self.run_gate("Import Sorting", [
            "isort", "--check-only", "--diff", self.src_dir, self.test_dir
        ])

    def check_linting(self) -> bool:
        """Run flake8 linting"""
        return self.run_gate("Linting", [
            "flake8", self.src_dir, self.test_dir
        ])

    def check_type_hints(self) -> bool:
        """Run mypy type checking"""
        return self.run_gate("Type Checking", [
            "mypy", self.src_dir
        ])

    def check_tests(self) -> bool:
        """Run tests with coverage"""
        return self.run_gate("Tests with Coverage", [
            "pytest", "--cov=" + self.src_dir, "--cov-report=term-missing",
            "--cov-fail-under=80", self.test_dir
        ])

    def check_security(self) -> bool:
        """Run security checks with bandit"""
        return self.run_gate("Security Scan", [
            "bandit", "-r", self.src_dir
        ])

    def run_all_gates(self) -> bool:
        """Run all quality gates"""
        gates = [
            self.check_formatting,
            self.check_imports,
            self.check_linting,
            self.check_type_hints,
            self.check_tests,
            self.check_security
        ]

        all_passed = True
        for gate in gates:
            if not gate():
                all_passed = False

        return all_passed

if __name__ == "__main__":
    gates = PythonQualityGates()

    if gates.run_all_gates():
        print("\n🎉 All quality gates passed!")
        sys.exit(0)
    else:
        print("\n💥 Some quality gates failed!")
        sys.exit(1)

TypeScript/JavaScript Quality Gates

// scripts/quality-gates.ts
import { execSync } from 'child_process';
import { existsSync } from 'fs';

interface GateResult {
  name: string;
  passed: boolean;
  output?: string;
  error?: string;
}

class TypeScriptQualityGates {
  private results: GateResult[] = [];

  private runCommand(name: string, command: string): boolean {
    console.log(`🔍 Running ${name}...`);

    try {
      const output = execSync(command, { encoding: 'utf-8' });
      this.results.push({
        name,
        passed: true,
        output
      });
      console.log(`✅ ${name} passed`);
      return true;
    } catch (error: any) {
      this.results.push({
        name,
        passed: false,
        error: error.message
      });
      console.log(`❌ ${name} failed`);
      console.log(error.message);
      return false;
    }
  }

  checkFormatting(): boolean {
    return this.runCommand(
      'Code Formatting',
      'npx prettier --check .'
    );
  }

  checkLinting(): boolean {
    return this.runCommand(
      'ESLint',
      'npx eslint src/ tests/ --max-warnings 0'
    );
  }

  checkTypeScript(): boolean {
    return this.runCommand(
      'TypeScript Compilation',
      'npx tsc --noEmit'
    );
  }

  checkTests(): boolean {
    return this.runCommand(
      'Jest Tests with Coverage',
      'npm test -- --coverage --watchAll=false'
    );
  }

  checkBuild(): boolean {
    return this.runCommand(
      'Production Build',
      'npm run build'
    );
  }

  checkSecurity(): boolean {
    return this.runCommand(
      'Security Audit',
      'npm audit --audit-level high'
    );
  }

  runAllGates(): boolean {
    const gates = [
      () => this.checkFormatting(),
      () => this.checkLinting(),
      () => this.checkTypeScript(),
      () => this.checkTests(),
      () => this.checkBuild(),
      () => this.checkSecurity()
    ];

    let allPassed = true;
    for (const gate of gates) {
      if (!gate()) {
        allPassed = false;
      }
    }

    return allPassed;
  }

  getResults(): GateResult[] {
    return this.results;
  }
}

// CLI execution
if (require.main === module) {
  const gates = new TypeScriptQualityGates();

  if (gates.runAllGates()) {
    console.log('\n🎉 All quality gates passed!');
    process.exit(0);
  } else {
    console.log('\n💥 Some quality gates failed!');
    process.exit(1);
  }
}

Quality Gate Checklists

Pre-Implementation Checklist

Requirements Validation:

  • [ ] Acceptance criteria are clear and testable
  • [ ] Edge cases identified
  • [ ] Performance requirements defined
  • [ ] Security considerations documented
  • [ ] Error handling strategy planned

During Implementation Checklist

Code Quality (Continuous):

  • [ ] Follow established coding standards
  • [ ] Write tests alongside implementation
  • [ ] Keep functions/methods small and focused
  • [ ] Use descriptive variable and function names
  • [ ] Handle errors appropriately

Pre-Commit Checklist

Local Validation:

  • [ ] Code compiles/runs without errors
  • [ ] All tests pass locally
  • [ ] Code formatting applied
  • [ ] No debugging code left in
  • [ ] Documentation updated

Pre-Review Checklist

Review Preparation:

  • [ ] Self-review completed
  • [ ] Meaningful commit messages
  • [ ] PR description explains changes
  • [ ] Screenshots/demos included if applicable
  • [ ] Breaking changes documented

Pre-Deployment Checklist

Production Readiness:

  • [ ] Feature flags configured
  • [ ] Database migrations tested
  • [ ] Environment variables updated
  • [ ] Monitoring alerts configured
  • [ ] Rollback plan defined

Verification Scripts

Comprehensive Quality Gate Script

#!/bin/bash
# scripts/verify-completion.sh

# Comprehensive verification script
set -e

PROJECT_TYPE=""
COVERAGE_THRESHOLD=80
SKIP_SECURITY=false
VERBOSE=false

# Detect project type
detect_project_type() {
    if [[ -f "package.json" ]]; then
        PROJECT_TYPE="javascript"
    elif [[ -f "pyproject.toml" || -f "requirements.txt" ]]; then
        PROJECT_TYPE="python"
    else
        echo "❌ Unknown project type"
        exit 1
    fi
}

# Run verification for JavaScript/TypeScript
verify_javascript() {
    echo "🔍 Verifying JavaScript/TypeScript project..."

    # Gate 1: Dependencies
    echo "Gate 1: Checking dependencies..."
    npm ci

    # Gate 2: Code quality
    echo "Gate 2: Code quality checks..."
    npx prettier --check .
    npx eslint src/ --max-warnings 0

    # Gate 3: Type checking
    echo "Gate 3: Type checking..."
    if [[ -f "tsconfig.json" ]]; then
        npx tsc --noEmit
    fi

    # Gate 4: Tests
    echo "Gate 4: Running tests..."
    npm test -- --coverage --watchAll=false

    # Gate 5: Build
    echo "Gate 5: Building..."
    npm run build

    # Gate 6: Security (optional)
    if [[ $SKIP_SECURITY == false ]]; then
        echo "Gate 6: Security audit..."
        npm audit --audit-level moderate
    fi
}

# Run verification for Python
verify_python() {
    echo "🔍 Verifying Python project..."

    # Gate 1: Dependencies
    echo "Gate 1: Installing dependencies..."
    pip install -r requirements.txt

    # Gate 2: Code quality
    echo "Gate 2: Code quality checks..."
    black --check src/ tests/
    isort --check-only src/ tests/
    flake8 src/ tests/

    # Gate 3: Type checking
    echo "Gate 3: Type checking..."
    mypy src/

    # Gate 4: Tests
    echo "Gate 4: Running tests..."
    pytest --cov=src --cov-report=term-missing --cov-fail-under=$COVERAGE_THRESHOLD

    # Gate 5: Security (optional)
    if [[ $SKIP_SECURITY == false ]]; then
        echo "Gate 5: Security scan..."
        bandit -r src/
    fi
}

# Main verification
main() {
    echo "🚀 Starting verification before completion..."
    echo "============================================"

    detect_project_type
    echo "Detected project type: $PROJECT_TYPE"

    case $PROJECT_TYPE in
        "javascript")
            verify_javascript
            ;;
        "python")
            verify_python
            ;;
        *)
            echo "❌ Unsupported project type: $PROJECT_TYPE"
            exit 1
            ;;
    esac

    echo ""
    echo "🎉 All verification gates passed!"
    echo "✅ Code is ready for review/deployment"
}

# Parse command line arguments
while [[ $# -gt 0 ]]; do
    case $1 in
        --skip-security)
            SKIP_SECURITY=true
            shift
            ;;
        --coverage-threshold)
            COVERAGE_THRESHOLD="$2"
            shift 2
            ;;
        --verbose)
            VERBOSE=true
            shift
            ;;
        *)
            echo "Unknown option: $1"
            exit 1
            ;;
    esac
done

# Run main function
main

Integration with Development Workflow

Git Hooks Integration

# Setup verification as pre-push hook
ln -s ../../scripts/verify-completion.sh .git/hooks/pre-push
chmod +x .git/hooks/pre-push

IDE Integration

VS Code Settings:

{
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true,
        "source.organizeImports": true
    },
    "editor.formatOnSave": true,
    "typescript.preferences.includePackageJsonAutoImports": "off",
    "eslint.run": "onSave",
    "python.linting.enabled": true,
    "python.linting.pylintEnabled": true,
    "python.formatting.provider": "black"
}

Continuous Integration

# Quality gates in CI
- name: Quality Gates
  run: |
    ./scripts/verify-completion.sh

- name: Upload Coverage
  uses: codecov/codecov-action@v3
  with:
    file: ./coverage.xml
    fail_ci_if_error: true

Common Quality Issues

Code Smells to Check

Long Methods:

# ❌ Too long and complex
def process_user_data(user_data):
    # 50+ lines of complex logic
    pass

# ✅ Broken down into smaller functions
def process_user_data(user_data):
    validated_data = validate_user_data(user_data)
    normalized_data = normalize_user_data(validated_data)
    return save_user_data(normalized_data)

Magic Numbers:

// ❌ Magic numbers
if (user.age > 18 && user.score > 85) {
    return true;
}

// ✅ Named constants
const MINIMUM_AGE = 18;
const PASSING_SCORE = 85;

if (user.age > MINIMUM_AGE && user.score > PASSING_SCORE) {
    return true;
}

Performance Red Flags

N+1 Queries:

# ❌ N+1 query problem
users = User.objects.all()
for user in users:
    print(user.profile.bio)  # Separate query for each user

# ✅ Optimized with select_related
users = User.objects.select_related('profile').all()
for user in users:
    print(user.profile.bio)  # Single query

Additional Resources

Reference Files

For detailed verification patterns and checklists, consult:

  • references/quality-standards.md - Detailed quality standards and metrics
  • references/security-checklist.md - Comprehensive security validation checklist
  • references/performance-benchmarks.md - Performance testing and validation

Example Files

Working verification examples in examples/:

  • examples/python-verification.py - Complete Python verification workflow
  • examples/javascript-verification.js - JavaScript/TypeScript verification
  • examples/ci-cd-pipeline.yml - CI/CD verification pipeline

Scripts

Verification utility scripts in scripts/:

  • scripts/verify-completion.sh - Comprehensive verification script
  • scripts/quality-report.py - Quality metrics reporting
  • scripts/security-scan.sh - Security validation automation

Success Metrics

Quality Metrics

  • Code coverage percentage
  • Linting violations count
  • Security vulnerabilities found
  • Test pass/fail ratio
  • Build success rate

Process Metrics

  • Time to complete verification
  • Number of verification failures
  • Issues caught before production
  • Developer satisfaction with process

Use this systematic verification approach to ensure all work meets quality standards before completion, reducing production issues and maintaining high code quality.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

windsurf

28.34%
按下载量换算675

OpenCode

25.36%
按下载量换算604

Codex

18.2%
按下载量换算434

Claude Code

12.85%
按下载量换算306

Antigravity

7.64%
按下载量换算182

Gemini CLI

3.17%
按下载量换算76

安全审计

暂无安全审计结果可展示。

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills