Skip to content
Back to skills

Code Quality Gate

ASecurity

Enforces automated quality checks before every deploy. Prevents production failures through a 5-stage Quality Gate System (Pre-Commit, PR-Check, Preview, E2E, Production). Activate on code changes, deployments, PR reviews, build failures.

  • 6 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 7, 2026
data-aijavascripttypescriptjavabashnodedebugginggitperformance

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned February 12, 2026

npx -y skills add freitasp1/claude-code-skills --skill code-quality-gate --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Quality Gate?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Quality Gate
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/freitasp1-code-quality-gate/badge)](https://www.skillsdirectory.com/skills/freitasp1-code-quality-gate)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-quality-gate
description: Enforces automated quality checks before every deploy. Prevents production failures through a 5-stage Quality Gate System (Pre-Commit, PR-Check, Preview, E2E, Production). Activate on code changes, deployments, PR reviews, build failures.
---

# Code Quality Gate

This skill prevents production failures through a 5-stage Quality Gate System.

## The 5 Quality Gates

1. **Pre-Commit (local):** TypeScript, Lint, Format - blocks commit on errors
2. **PR-Check (GitHub Actions):** Unit Tests, Build - blocks merge on errors
3. **Preview Deploy:** Vercel/Netlify Preview URL for visual review
4. **E2E Tests:** Playwright against Preview, Lighthouse performance audit
5. **Production Deploy:** Only when ALL gates pass

## Critical Rules

- **CRITICAL:** NEVER use `continue-on-error: true` for TypeScript checks in GitHub Actions!
- Husky Setup: `npm install -D husky lint-staged && npx husky init`
- Rollback: `vercel rollback`

## Example: Pre-Commit Hook (.husky/pre-commit)

```bash
#!/bin/sh
npx lint-staged
npx tsc --noEmit
```

## Example: lint-staged.config.js

```javascript
module.exports = {
  '*.{ts,tsx}': ['eslint --fix', 'prettier --write'],
  '*.{json,md}': ['prettier --write'],
};
```

## Example: GitHub Actions Workflow

```yaml
name: Quality Gate
on: [push, pull_request]

jobs:
  quality:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'

      - run: npm ci

      # Gate 1: TypeScript (NEVER skip!)
      - name: TypeScript Check
        run: npx tsc --noEmit

      # Gate 2: Linting
      - name: ESLint
        run: npm run lint

      # Gate 3: Unit Tests
      - name: Unit Tests
        run: npm run test

      # Gate 4: Build
      - name: Build
        run: npm run build
```

## When to Activate

- Code changes that touch production code
- Deployment requests
- PR reviews
- Build failures (for debugging)

## Real-World Impact

At [fabrikIQ.com](https://app.fabrikiq.com), this quality gate system caught:
- 2 TypeScript errors that would have caused runtime crashes
- 1 missing environment variable in the deploy
- 3 performance regressions before they hit production

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.