quality-gates
БесплатноБез исполняемых скриптовНе проверенRun comprehensive quality checks including linting, type checking, tests, and security audits before commits or deployments
Об этом скилле
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:
Detect linter by checking for:
- ESLint:
.eslintrc*,eslint.config.* - Biome:
biome.json - None: Skip this gate
- ESLint:
Read package.json to find lint script:
"scripts": { "lint": "eslint .", "lint:fix": "eslint . --fix" }Execute linter:
# Try to run lint script npm run lint # If fails, try direct commands npx eslint . || npx biome check .Parse results:
- Exit code 0: ✅ PASS
- Exit code non-zero: ❌ FAIL
- Extract error count and file locations
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:
Detect TypeScript by checking for:
tsconfig.json- TypeScript in dependencies
Read tsconfig.json to check strictness:
strict: truenoImplicitAny,strictNullChecks, etc.
Execute type checker:
# Try to run typecheck script npm run typecheck || npm run type-check # If no script, run directly npx tsc --noEmitParse 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:
Detect test framework:
- Vitest:
vitest.config.*,vitestin dependencies - Jest:
jest.config.*,jestin dependencies - Native test:
--testflag with Node.js 20+
- Vitest:
Count test files:
# Use Grep to find test files find . -name "*.test.*" -o -name "*.spec.*" | wc -lExecute tests:
# Run unit tests (fast) npm run test || npm run test:unit # Or direct command npx vitest run || npx jest --ciParse results:
- Total tests run
- Passed / Failed / Skipped
- Coverage percentage (if available)
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:
Detect build system:
- Next.js:
next build - Vite:
vite build - Webpack:
webpack --mode production - TypeScript:
tsc
- Next.js:
Execute build:
npm run buildCheck build artifacts:
- Verify output directory exists:
dist/,build/,.next/ - Check for build errors in logs
- Verify output directory exists:
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:
Run npm/pnpm audit:
npm audit --json || pnpm audit --jsonParse audit results:
- Critical vulnerabilities: 0
- High vulnerabilities: 0
- Moderate vulnerabilities: < threshold
- Low vulnerabilities: informational
Check for specific vulnerabilities:
- Prototype pollution
- Remote code execution (RCE)
- SQL injection
- Cross-site scripting (XSS)
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:
- Detect code complexity tools:
- eslint-plugin-complexity
- SonarQube
- CodeCl
Установить quality-gates в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл quality-gates?
Run comprehensive quality checks including linting, type checking, tests, and security audits before commits or deployments
Как установить скилл quality-gates?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл quality-gates запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic