Token导航 LogoToken导航

Agent Skill · 研究检索

quality-gates(质量门)

用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。它适合让 Agent 规范任务边界、统一输出格式、拆分操作步骤或优化提示词可复用性。使用时需要保留真实业务约束,不要把示例当硬规则;涉及自动执行、外部工具或高风险操作时,应在提示词中明确确认步骤、权限边界和失败处理方式。

quality-gates 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 67,016。

总安装 256周安装 11GitHub Stars 6下载 90核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:quality-gates(质量门)
来源仓库:https://github.com/atman36/ai-vibe-prompts
仓库路径:skills/quality-gates
安装命令:
npx skills add https://github.com/atman36/ai-vibe-prompts --skill quality-gates
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/atman36/ai-vibe-prompts --skill quality-gates

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

quality-gates 设置多层级质量门禁,包括预提交快速检查和发布前全量验证。它集成 Vitest、Playwright 等工具链,设定覆盖率阈值和性能基准线硬性要求。任何未通过检查的代码都无法进入主分支,防止低质量代码污染生产环境。Level 2 及以上检查需在独立 runner 执行,避免拖慢日常开发流程。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/quality-gates

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/atman36/ai-vibe-prompts --skill quality-gates;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

quality-gates 怎么安装?

在终端执行 npx skills add https://github.com/atman36/ai-vibe-prompts --skill quality-gates。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

quality-gates 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

quality-gates 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

quality-gates 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

quality-gates 用的人多吗?

公开数据是累计安装 256 次,近一周安装 11 次,下载 90 次,GitHub 6 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

quality-gates 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
quality-gates

质量门 · 本页

2566需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Quality Gates Skill

Objective

Enforce code quality standards by running automated checks that must pass before code can be committed, merged, or deployed. Acts as a guardian ensuring consistent quality across the codebase.

When to Use This Skill

Auto-invoke when:

  • User completes feature implementation
  • Before creating commits or pull requests
  • User asks to "test", "validate", "check quality", or "verify"
  • Before deployment or release
  • After significant refactoring

Quality Gate Levels

Level 1: Pre-Commit Gates (Fast, < 30 seconds)

Essential checks that run before every commit.

Level 2: Pre-Push Gates (Moderate, < 2 minutes)

Comprehensive checks before pushing to remote.

Level 3: Pre-Deploy Gates (Thorough, < 5 minutes)

Complete validation before production deployment.

Gate Execution Workflow

Gate 1: Linting (JavaScript/TypeScript)

Purpose: Enforce code style and catch common errors

Tools: Bash, Read

Process:

  1. Detect linter by checking for:

- ESLint: .eslintrc*, eslint.config.* - Biome: biome.json - None: Skip this gate

  1. Read package.json to find lint script: "scripts": {"lint": "eslint.", "lint:fix": "eslint. --fix"}
  2. Execute linter: # Try to run lint script npm run lint # If fails, try direct commands npx eslint. || npx biome check.
  3. Parse results:

- Exit code 0: ✅ PASS - Exit code non-zero: ❌ FAIL - Extract error count and file locations

  1. Auto-fix attempt (if failures found): npm run lint:fix || npx eslint. --fix

Success Criteria: Zero linting errors (warnings acceptable)

Gate 2: Type Checking (TypeScript)

Purpose: Verify type safety and catch type errors

Tools: Bash, Read, Grep

Process:

  1. Detect TypeScript by checking for:

- tsconfig.json - TypeScript in dependencies

  1. Read tsconfig.json to check strictness:

- strict: true - noImplicitAny, strictNullChecks, etc.

  1. Execute type checker: # Try to run typecheck script npm run typecheck || npm run type-check # If no script, run directly npx tsc --noEmit
  2. Parse results:

- Exit code 0: ✅ PASS - Exit code non-zero: ❌ FAIL - Extract error count and locations

Success Criteria: Zero type errors

Gate 3: Unit & Integration Tests

Purpose: Verify code functionality and prevent regressions

Tools: Bash, Read, Grep

Process:

  1. Detect test framework:

- Vitest: vitest.config.*, vitest in dependencies - Jest: jest.config.*, jest in dependencies - Native test: --test flag with Node.js 20+

  1. Count test files: # Use Grep to find test files find. -name "*.test.*" -o -name "*.spec.*" | wc -l
  2. Execute tests: # Run unit tests (fast) npm run test || npm run test:unit # Or direct command npx vitest run || npx jest --ci
  3. Parse results:

- Total tests run - Passed / Failed / Skipped - Coverage percentage (if available)

  1. Coverage check (if configured): npm run test:coverage # Check if meets threshold (e.g., 80%)

Success Criteria:

  • All tests pass (100%)
  • Coverage ≥ configured threshold (if set)

Gate 4: Build Verification

Purpose: Ensure code compiles and builds without errors

Tools: Bash

Process:

  1. Detect build system:

- Next.js: next build - Vite: vite build - Webpack: webpack --mode production - TypeScript: tsc

  1. Execute build: npm run build
  2. Check build artifacts:

- Verify output directory exists: dist/, build/, .next/ - Check for build errors in logs

  1. Clean up (optional): # Remove build artifacts to save space rm -rf dist/ build/.next/

Success Criteria: Build completes with exit code 0

Gate 5: Security Audit

Purpose: Identify known vulnerabilities in dependencies

Tools: Bash, Read

Process:

  1. Run npm/pnpm audit: npm audit --json || pnpm audit --json
  2. Parse audit results:

- Critical vulnerabilities: 0 - High vulnerabilities: 0 - Moderate vulnerabilities: < threshold - Low vulnerabilities: informational

  1. Check for specific vulnerabilities:

- Prototype pollution - Remote code execution (RCE) - SQL injection - Cross-site scripting (XSS)

  1. Suggest fixes: npm audit fix # or npm audit fix --force # (if safe)

Success Criteria:

  • Zero critical/high vulnerabilities
  • Moderate vulnerabilities acknowledged or fixed

Gate 6: Code Complexity Analysis (Optional)

Purpose: Flag overly complex code that may need refactoring

Tools: Grep, Bash

Process:

  1. Detect code complexity tools:

- eslint-plugin-complexity - SonarQube - CodeClimate

  1. Basic complexity checks: # Find files with excessive lines find src -name "*.{ts,tsx,js,jsx}" -exec wc -l {} \; | awk '$1 > 500' # Find deeply nested code (>5 levels) grep -rn "^[[:space:]]\{20,\}" src/ # Count TODO/FIXME grep -rn "TODO\|FIXME\|HACK" src/ | wc -l

Success Criteria:

  • No files > 500 lines (warning only)
  • No nesting > 5 levels (warning only)

Gate 7: Git Pre-Commit Checks

Purpose: Ensure commit quality and prevent sensitive data leaks

Tools: Bash, Grep

Process:

  1. Check for sensitive data: # Search for API keys, secrets, tokens git diff --cached | grep -i "api[_-]key\|secret\|password\|token" # Check for.env files being committed git diff --cached --name-only | grep "\.env$"
  2. Validate commit message (if Conventional Commits):

- Format: type(scope): description - Types: feat, fix, docs, style, refactor, test, chore

  1. Check file sizes: # Flag files > 1MB git diff --cached --name-only | xargs ls -lh | awk '$5 > 1000000'

Success Criteria:

  • No secrets in diff
  • No.env files
  • No large files (> 1MB)

Execution Strategy

Sequential Execution (Default)

Run gates in order, stop on first failure:

Lint → TypeCheck → Test → Build → Audit

Parallel Execution (Fast Mode)

Run independent gates simultaneously:

[Lint + TypeCheck + Test] → Build → Audit

Selective Execution

Run only relevant gates based on changes:

  • .ts/.tsx files changed → TypeCheck
  • Dependencies updated → Audit
  • Test files changed → Tests only

Output Format

# Quality Gate Results

## Summary
✅ 5/7 Gates Passed | ❌ 2/7 Gates Failed

## Gate Details

### ✅ Gate 1: Linting
- **Status**: PASS
- **Duration**: 3.2s
- **Details**: 0 errors, 2 warnings

### ❌ Gate 2: Type Checking
- **Status**: FAIL
- **Duration**: 5.1s
- **Errors**: 3 type errors found
  - `src/components/Button.tsx:15` - Property 'onClick' is missing
  - `src/utils/api.ts:42` - Type 'string' is not assignable to type 'number'
  - `src/hooks/useAuth.ts:8` - Cannot find name 'User'

### ✅ Gate 3: Tests
- **Status**: PASS
- **Duration**: 12.4s
- **Tests**: 124 passed, 0 failed, 2 skipped
- **Coverage**: 87% (target: 80%)

### ⏭️ Gate 4: Build
- **Status**: SKIPPED (previous gate failed)

### ⏭️ Gate 5: Security Audit
- **Status**: SKIPPED (previous gate failed)

## Action Required
Fix the 3 type errors in Gate 2 before proceeding.

## Recommendations
1. Run `npm run typecheck` locally to see full error details
2. Consider adding pre-commit hooks to catch these earlier
3. Current code coverage (87%) exceeds target - excellent work!

Integration with Git Hooks

Setup Husky + lint-staged (Recommended)

Check if installed:

test -d .husky && echo "Husky installed" || echo "Husky not found"

Suggest installation if missing:

npm install --save-dev husky lint-staged
npx husky init

Configure.husky/pre-commit:

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# Run quality gates
npm run lint
npm run typecheck
npm run test

Alternative: git commit -m with manual checks

If no hooks, prompt user:

⚠️  No pre-commit hooks detected.
Would you like me to run quality gates before committing? (Recommended)

Progressive Quality Gates

Level 1: Essential (Always Run)

  • Linting
  • Type checking

Level 2: Standard (Pre-Push)

  • Essential +
  • Unit tests
  • Security audit

Level 3: Comprehensive (Pre-Deploy)

  • Standard +
  • Integration tests
  • E2E tests
  • Build verification
  • Performance tests

Error Recovery

Auto-Fix Capability

  • Lint errors: Run eslint --fix or biome check --apply
  • Format errors: Run prettier --write
  • Security vulnerabilities: Run npm audit fix

Manual Fix Required

  • Type errors
  • Test failures
  • Build errors

Bypass (Use with Caution)

# Skip hooks for emergency fixes only
git commit --no-verify -m "emergency: fix critical bug"

Best Practices

  1. Fail Fast: Stop at first critical failure to save time
  2. Clear Feedback: Always show which gate failed and why
  3. Actionable: Provide exact commands to fix issues
  4. Configurable: Respect project's quality thresholds
  5. Performance: Cache results when possible
  6. Incremental: Only check changed files when appropriate

Configuration

Read from package.json

{
  "qualityGates": {
    "coverage": {
      "minimum": 80,
      "enabled": true
    },
    "audit": {
      "level": "moderate",
      "enabled": true
    },
    "complexity": {
      "maxLines": 500,
      "maxDepth": 5
    }
  }
}

Default Settings

If no config found, use sensible defaults:

  • Coverage minimum: 70%
  • Audit level: high/critical only
  • Max file lines: 500
  • Max nesting: 5 levels

Integration with Other Skills

  • codebase-analysis - Use to detect available quality tools
  • git-workflow - Integrate with commit/push process
  • ci-cd-setup - Configure gates for CI pipeline

Version History

  • 1.0.0 (2025-01-03): Initial skill with 7 quality gates and progressive execution

平台分布

Codex

33.18%
按下载量换算30

Claude

32.8%
按下载量换算30

Cursor

20.47%
按下载量换算18

Gemini CLI

9.5%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

继续浏览同类 Skills