skills/atman36/quality-gates/SKILL.md
Run comprehensive quality checks including linting, type checking, tests, and security audits before commits or deployments
npx skillsauth add aiskillstore/marketplace quality-gatesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
Auto-invoke when:
Essential checks that run before every commit.
Comprehensive checks before pushing to remote.
Complete validation before production deployment.
Purpose: Enforce code style and catch common errors
Tools: Bash, Read
Process:
Detect linter by checking for:
.eslintrc*, eslint.config.*biome.jsonRead 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:
Auto-fix attempt (if failures found):
npm run lint:fix || npx eslint . --fix
Success Criteria: Zero linting errors (warnings acceptable)
Purpose: Verify type safety and catch type errors
Tools: Bash, Read, Grep
Process:
Detect TypeScript by checking for:
tsconfig.jsonRead 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 --noEmit
Parse results:
Success Criteria: Zero type errors
Purpose: Verify code functionality and prevent regressions
Tools: Bash, Read, Grep
Process:
Detect test framework:
vitest.config.*, vitest in dependenciesjest.config.*, jest in dependencies--test flag with Node.js 20+Count test files:
# Use Grep to find test files
find . -name "*.test.*" -o -name "*.spec.*" | wc -l
Execute tests:
# Run unit tests (fast)
npm run test || npm run test:unit
# Or direct command
npx vitest run || npx jest --ci
Parse results:
Coverage check (if configured):
npm run test:coverage
# Check if meets threshold (e.g., 80%)
Success Criteria:
Purpose: Ensure code compiles and builds without errors
Tools: Bash
Process:
Detect build system:
next buildvite buildwebpack --mode productiontscExecute build:
npm run build
Check build artifacts:
dist/, build/, .next/Clean up (optional):
# Remove build artifacts to save space
rm -rf dist/ build/ .next/
Success Criteria: Build completes with exit code 0
Purpose: Identify known vulnerabilities in dependencies
Tools: Bash, Read
Process:
Run npm/pnpm audit:
npm audit --json || pnpm audit --json
Parse audit results:
Check for specific vulnerabilities:
Suggest fixes:
npm audit fix
# or
npm audit fix --force # (if safe)
Success Criteria:
Purpose: Flag overly complex code that may need refactoring
Tools: Grep, Bash
Process:
Detect code complexity tools:
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:
Purpose: Ensure commit quality and prevent sensitive data leaks
Tools: Bash, Grep
Process:
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$"
Validate commit message (if Conventional Commits):
type(scope): descriptionCheck file sizes:
# Flag files > 1MB
git diff --cached --name-only | xargs ls -lh | awk '$5 > 1000000'
Success Criteria:
Run gates in order, stop on first failure:
Lint → TypeCheck → Test → Build → Audit
Run independent gates simultaneously:
[Lint + TypeCheck + Test] → Build → Audit
Run only relevant gates based on changes:
.ts/.tsx files changed → TypeCheck# 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!
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
If no hooks, prompt user:
⚠️ No pre-commit hooks detected.
Would you like me to run quality gates before committing? (Recommended)
eslint --fix or biome check --applyprettier --writenpm audit fix# Skip hooks for emergency fixes only
git commit --no-verify -m "emergency: fix critical bug"
{
"qualityGates": {
"coverage": {
"minimum": 80,
"enabled": true
},
"audit": {
"level": "moderate",
"enabled": true
},
"complexity": {
"maxLines": 500,
"maxDepth": 5
}
}
}
If no config found, use sensible defaults:
codebase-analysis - Use to detect available quality toolsgit-workflow - Integrate with commit/push processci-cd-setup - Configure gates for CI pipelinedevelopment
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.