quality-gates
提交前运行质量检查
Également disponible depuis: Barnhardt-Enterprises-Inc,ArieGoldkin
手动代码质量检查会减慢开发速度并让 bug 溜走。此技能会在每次提交或部署之前自动运行 linting、类型检查、测试和安全审计。
Télécharger le ZIP du skill
Importer dans Claude
Allez dans Paramètres → Capacités → Skills → Importer un skill
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ûrThis 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.
Facteurs de risque
⚙️ Commandes externes (5)
Score de qualité
Ce que vous pouvez construire
提交前质量检查
在每次提交前运行自动化检查,及早发现问题并保持一致的代码质量。
部署前验证
在部署到生产环境前验证构建成功、安全合规和测试覆盖率。
质量标准执行
定义并执行团队范围的质量门禁,所有贡献者在合并前必须通过。
Essayez ces prompts
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 警告任由其积累,产生噪音掩盖真正的问题