Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

quality-gates质量门

Agent Skill

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

总安装

539

周安装

22

GitHub Stars

8

下载量

172
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/phrazzld/claude-config --skill quality-gates

简介

用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 支持基于关键词、任务场景或来源线索进行信息检索与筛选。
  • 可通过 npx skills add 命令从 GitHub 仓库安装使用。
  • 安装前需确认权限范围、维护状态及是否触发联网或文件操作。
  • quality-gates 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

/quality-gates

Ensure this project has complete quality infrastructure. Audit, fix, verify.

What This Does

Examines the project's quality gates, identifies gaps, implements fixes, and verifies everything works. Every run does all of this—no partial modes.

Process

1. Audit

Spawn the infrastructure-guardian agent to do a comprehensive audit. It knows what to check.

Also run this quick assessment:

[ -f "lefthook.yml" ] && echo "✓ Lefthook" || echo "✗ Lefthook"
[ -f "vitest.config.ts" ] || [ -f "vitest.config.js" ] && echo "✓ Vitest" || echo "✗ Vitest"
[ -f ".github/workflows/ci.yml" ] && echo "✓ CI workflow" || echo "✗ CI workflow"
[ -f "commitlint.config.js" ] || [ -f "commitlint.config.cjs" ] && echo "✓ Commitlint" || echo "✗ Commitlint"
grep -q "coverage" package.json && echo "✓ Coverage script" || echo "✗ Coverage script"

For test quality specifically, spawn test-strategy-architect if tests exist but quality is uncertain.

2. Plan

Based on audit findings, identify all gaps. Prioritize:

Must have (every project):

  • Lefthook with pre-commit hooks (lint, format, typecheck on staged files)
  • Lefthook pre-push hooks (test, build)
  • Vitest configured with coverage
  • GitHub Actions CI (lint, typecheck, test, build on every PR)
  • Branch protection on main

Should have (production apps):

  • Conventional commits via commitlint
  • Coverage reporting in PRs
  • E2E tests for critical flows
  • Security audit in CI

3. Execute

Fix every gap identified. Delegate implementation to Codex where appropriate.

Installing Lefthook:

pnpm add -D lefthook
pnpm lefthook install

Then create lefthook.yml per references/lefthook-config.md.

Installing Vitest:

pnpm add -D vitest @vitest/coverage-v8

Then create config per references/vitest-config.md.

Creating CI workflow: Create .github/workflows/ci.yml per references/github-actions.md.

Setting up commitlint:

pnpm add -D @commitlint/cli @commitlint/config-conventional

Add commit-msg hook to lefthook.yml.

Branch protection: Guide user through GitHub settings or use gh api if they want automation.

4. Verify

Prove it works. Don't just check files exist—actually run the gates.

# Test pre-commit hook
echo "test" >> /tmp/test-file && git add /tmp/test-file
pnpm lefthook run pre-commit

# Test CI locally (if act installed)
act -j quality-checks --dryrun

# Test vitest runs
pnpm test --run

# Verify commitlint
echo "bad commit message" | pnpm commitlint
# Should fail

echo "feat: valid message" | pnpm commitlint
# Should pass

Report verification results. If anything fails, fix it before declaring done.

Tool Choices

Lefthook over Husky. Go binary, faster, parallel execution, simpler YAML config, combines Husky + lint-staged.

Vitest over Jest. Faster, native ESM, built-in coverage with v8, great TypeScript support.

vitest-coverage-report-action over Codecov. Zero external service, shows coverage diff in PRs, links to uncovered lines.

These are strong recommendations, not mandates. If the project already has working alternatives, don't churn—improve what exists.

Coverage Philosophy

Coverage is a diagnostic tool, not a goal.

  • 60% meaningful coverage beats 95% testing implementation details
  • Patch coverage: 80%+ for new code
  • Critical paths (payment, auth): 90%+
  • Overall: Track but don't block

Anti-Patterns

  • Husky → Prefer Lefthook
  • Arbitrary coverage targets → Use coverage as diagnostic
  • Testing implementation details → Test behavior
  • Heavy mocking → Prefer integration tests
  • Skipping hooks routinely → Fix the root cause
  • NEVER lower a quality gate to pass CI — Coverage thresholds, lint rules, type strictness, security gates are load-bearing walls. When a gate fails, write code to meet it (more tests, better code, actual fixes). Never move the goalpost. If the threshold is genuinely wrong, escalate to the user — don't "fix" it autonomously.
  • CI only on main → Test every PR

References

Detailed configs in references/:

  • lefthook-config.md — Hook configurations
  • github-actions.md — CI workflows
  • vitest-config.md — Test configuration
  • branch-protection.md — GitHub settings

Philosophy

This codebase will outlive you. Every shortcut becomes someone else's burden. The patterns you establish will be copied. The corners you cut will be cut again.

Quality gates exist to fight entropy—to ensure the codebase stays better than you found it.

What You Get

When complete:

  • Lefthook pre-commit: lint, format, typecheck (fast, staged files only)
  • Lefthook pre-push: test, build (comprehensive)
  • Vitest with coverage configured
  • GitHub Actions CI running on every PR
  • Branch protection requiring CI to pass
  • Commitlint enforcing conventional commits
  • Verified end-to-end

User can:

  • Commit code and see hooks run automatically
  • Push and see tests run before push completes
  • Open a PR and see CI results
  • See coverage diff in PR comments
  • Trust that main is always green

Testing Standards Reference

See references/testing-standards.md for detailed guidance on:

  • Vitest configuration
  • Coverage philosophy (test boundaries, not lines)
  • Unit vs integration vs E2E testing
  • Git hooks setup with simple-git-hooks
  • CI/CD with GitHub Actions

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

展示第三方安全扫描或审计结果

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

平台分布

Codex

39.39%
按下载量换算68

Claude

27.75%
按下载量换算48

Cursor

20.38%
按下载量换算35

Gemini CLI

10.37%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/phrazzld/claude-config --skill quality-gates 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills