agentleFS
iwritec0deiwritec0de/app-dev/skills/quality-gate/SKILL.md

quality-gate

Skill3 starsChanged 7 months agoMITView on GitHub

This skill should be used when the user asks to "run a quality gate", "check code quality", "run lint checks", "run pre-push security scan", "check for dead code", or mentions "quality gate", "quality check", "lint check", "run checks", "code quality", "pre-push scan", "security scan". Provides automated JavaScript/TypeScript code quality enforcement including type checking, linting, formatting, dead code detection, type coverage, circular dependency detection, tests, and security scanning before git push.

  • Commits and pushes

42 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use deploy.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • VercelSkill

    deploy

    Deploy applications to Vercel. Use when the user says "deploy", "deploy to Vercel", "push to production", "deploy my app", or "go live".

    Also in 3 projects that use this

The file

Files
SKILL.md

Quality Gate

Automated quality enforcement with two hooks:

Stop Hook — Code Quality

Fires on every session stop. Runs JavaScript/TypeScript checks on changed files:

CheckToolSeverity
Typestsc --noEmitBLOCK
LinteslintBLOCK on errors, WARN on warnings
Formatprettier --checkWARN
TestsjestBLOCK
Dead codeknip (unused exports, deps, files)WARN
Type coveragetype-coverage (>80% threshold)WARN
Circular depsmadge --circularWARN
TODO/FIXMEgrep scannerWARN

Behavior:

  • Missing required tools (tsc, eslint, prettier, jest) = FAIL with install command
  • Missing optional tools (knip, type-coverage, madge) = WARN with install suggestion
  • Retry limiter: allows stop after 3 consecutive failures

PreToolUse Hook — Security Scan

Intercepts git push commands. Runs 4 scanners in sequence:

  1. semgrep — SAST scan on changed files with --config=auto
    • Critical/High findings = BLOCK push
    • Medium findings = WARN
    • Claude should auto-fix findings before retrying
  2. gitleaks — scans commits being pushed for leaked secrets
    • Any secret found = BLOCK push
  3. trivy — filesystem vulnerability, secret, and misconfig scan
    • Critical vulns = BLOCK push
    • High vulns = WARN
  4. SonarQube (optional) — checks quality gate status if configured
    • Requires SONARQUBE_URL and SONARQUBE_TOKEN env vars, plus sonar-project.properties
    • Skipped silently if SONARQUBE_TOKEN is not set
    • Failed quality gate = BLOCK push

Configuration

Env VarDefaultPurpose
CLAUDE_QUALITY_GATE1Enable/disable quality gate
CLAUDE_QUALITY_GATE_MAX_RETRIES3Max retry attempts before allowing stop
SONARQUBE_URLhttps://sonarqube.internalSonarQube server URL
SONARQUBE_TOKEN(none)SonarQube auth token
CLAUDE_NOTIFY_DISCORD0Send Discord notifications
DISCORD_WEBHOOK_URL(none)Discord webhook for notifications

Commands

  • /quality run — Run checks manually
  • /quality status — View gate status and recent results
  • /quality config — See active checks and tool availability

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.