Compétences quality-gates
🛡️

quality-gates

Sûr ⚙️ Commandes externes

提交前运行质量检查

Également disponible depuis: Barnhardt-Enterprises-Inc,ArieGoldkin

手动代码质量检查会减慢开发速度并让 bug 溜走。此技能会在每次提交或部署之前自动运行 linting、类型检查、测试和安全审计。

Prend en charge: Claude Codex Code(CC)
⚠️ 68 Médiocre
1

Télécharger le ZIP du skill

2

Importer dans Claude

Allez dans Paramètres → Capacités → Skills → Importer un skill

3

Activez et commencez à utiliser

Tester

Utilisation de "quality-gates". Run quality gates before my commit

Résultat attendu:

  • Quality Gate Results: 5/6 Passed
  • Lint: PASS (0 errors, 2 warnings)
  • Type Check: PASS (0 errors)
  • Tests: PASS (124 passed, 0 failed, 87% coverage)
  • Build: PASS (build completed successfully)
  • Security Audit: PASS (no critical vulnerabilities)
  • Secrets Check: PASS (no secrets detected in staged files)
  • Ready to commit!

Utilisation de "quality-gates". Run security audit on my dependencies

Résultat attendu:

  • Security Audit Results: 3 vulnerabilities found
  • Critical: 0 | High: 1 | Moderate: 2
  • High: Prototype pollution in lodash < 4.17.21
  • Run 'npm audit fix' to resolve
  • Recommendation: Update lodash to latest version

Audit de sécurité

Sûr
v5 • 1/16/2026

This is a documentation-only skill file (SKILL.md) that defines quality assurance workflows. All command executions are standard development tools (npm, eslint, vitest) running locally. The heuristic finding is a false positive - this skill DEFENDS against credential leaks by checking git diffs for secrets, not exfiltrating credentials. No malicious intent present.

2
Fichiers analysés
662
Lignes analysées
1
résultats
5
Total des audits

Score de qualité

38
Architecture
100
Maintenabilité
85
Contenu
20
Communauté
100
Sécurité
83
Conformité aux spécifications

Ce que vous pouvez construire

提交前质量检查

在每次提交前运行自动化检查,及早发现问题并保持一致的代码质量。

部署前验证

在部署到生产环境前验证构建成功、安全合规和测试覆盖率。

质量标准执行

定义并执行团队范围的质量门禁,所有贡献者在合并前必须通过。

Essayez ces prompts

快速 lint 检查
Run quality gates for linting only on the changed files in this commit.
完整提交前检查
Run all pre-commit quality gates including linting, type checking, and tests.
安全审计
Run security audit to check for vulnerabilities in dependencies and suggest fixes.
部署前验证
Run comprehensive pre-deploy quality gates: lint, typecheck, tests, build verification, and security audit.

Bonnes pratiques

  • 在 package.json 中配置质量门禁,包含 lint、typecheck 和 test 脚本以实现一致执行
  • 使用 Husky 或类似的 git hook 来防止意外绕过质量门禁
  • 设置现实的覆盖率阈值,既能鼓励改进又不会阻塞开发

Éviter

  • 为了快速修复而跳过质量门禁,最终积累成技术债务
  • 设置过高的覆盖率阈值,导致开发者为了指标而写测试
  • 忽略 lint 警告任由其积累,产生噪音掩盖真正的问题

Foire aux questions

此技能支持哪些工具?
支持 ESLint、Biome 进行 linting;tsc 用于 TypeScript;Vitest、Jest 和 Node.js 原生测试;npm/pnpm audit 用于安全检查。
质量门禁需要多长时间?
提交前门禁在 30 秒内完成。推送前门禁最多 2 分钟。部署前门禁最多 5 分钟。
我可以为紧急修复跳过门禁吗?
可以,使用 git commit --no-verify 来绕过 hook,但这仅用于紧急情况。
我的代码会被发送到外部服务吗?
不会。所有检查都使用您已安装的工具在本地运行。npm audit 可能会检查远程漏洞数据库。
如果门禁失败会发生什么?
门禁按顺序运行,遇到第一个失败时停止。此技能提供具体的文件位置和修复命令来解决问题。
这与 Husky 有什么不同?
Husky 将现有脚本作为 git hook 运行。此技能编排要运行的门禁,并提供智能反馈和修复建议。

Détails du développeur

Structure de fichiers

📄 SKILL.md