code-quality-gates

code-quality-gates is a skill for Claude Code, Codex from changoo89/claude-pilot. It costs 26 tokens per session (716 once invoked), scanned A, original, MIT.

A set of checks that runs before and after code changes to enforce documentation, formatting, type-safety, and audit rules. Type checking looks for mismatches in how code values are used.

In plain words
What is it for?
It is for checking documentation actions, formatting JavaScript, TypeScript, JSON, CSS, and Python files, running TypeScript checks, and auditing console.log usage.
Why use it?
It catches formatting problems, type errors, and unwanted logging before work is considered complete.

Skill for Claude CodeCodex

Part of the claude-pilot plugin — 32 skills, 11 commands, 14 agents, 2 MCP servers shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/changoo89/claude-pilot/code-quality-gates
Any agent
npx skills add changoo89/claude-pilot --skill code-quality-gates
Clone the repo
git clone --depth 1 https://github.com/changoo89/claude-pilot

Made for: Claude Code, Codex.

Or install claude-pilot, the plugin that ships this one along with the rest of its 32 skills, 11 commands, 14 agents, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-quality-gates

README.md
[![agentmods](https://agentmods.dev/badge/skills/changoo89/claude-pilot/code-quality-gates.svg)](https://agentmods.dev/skills/changoo89/claude-pilot/code-quality-gates)
Your own site
<a href="https://agentmods.dev/skills/changoo89/claude-pilot/code-quality-gates"><img src="https://agentmods.dev/badge/skills/changoo89/claude-pilot/code-quality-gates.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 716 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00026 $0.00716
Opus 5 $0.00013 $0.00358
Sonnet 5 $0.00005 $0.00143
Haiku 4.5 $0.00003 $0.00072

Measured 5d ago against content hash f2fe09ac06cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-quality-gates scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/code-quality-gates/SKILL.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SKILL: Code Quality Gates

Purpose: Automated quality checks before/after code changes (PreToolUse, PostToolUse, Stop hooks converted to skill logic) Target: All agents making code changes


Quick Start

When to Use This Skill

  • Before creating any .md files (documentation gate)
  • After writing code (formatting, type check)
  • Before completing work (final audit)

Quick Reference

# PreToolUse: Block .md creation
[[ "$file" == *.md ]] && echo "Use Write tool for .md" && return 1

# PostToolUse: Auto-format + type check
prettier --write "$file" && npx tsc --noEmit

# Stop: Console.log audit
grep -rn "console.log" src/ || true

Quality Gates

Gate 1: Documentation (PreToolUse)

Purpose: Block .md file creation via Bash

Apply: Before Bash commands

echo "$command" | grep -qiE '\.md' && echo "Use Write tool for .md" && return 1

Gate 2: Formatting (PostToolUse)

Purpose: Auto-format after code changes

Apply: After Edit/Write

format_code() {
  case "${1##*.}" in
    js|ts|tsx|json|css|md) prettier --write "$1" ;;
    py) black "$1" ;;
  esac
}

Gate 3: Type Safety (PostToolUse)

Purpose: Verify TypeScript type correctness

Apply: After .ts file changes

[ -f tsconfig.json ] && npx tsc --noEmit

Gate 4: Console Audit (Stop)

Purpose: Flag console.log before completion

Apply: Before work completion

find src -name "*.ts" -o -name "*.js" | xargs grep -n "console.log"

Integration Points

Hook Function Agent Trigger
PreToolUse Documentation gate All Before Bash
PostToolUse Formatting Coder After Edit/Write
PostToolUse Type check Coder After .ts changes
Stop Console audit Coder Before completion

Verification

# Test all gates
echo "# Test" > test.md  # Should warn
echo "const x=1;" > test.js && prettier --write test.js  # Should format
echo "const x: string = 1;" > test.ts && npx tsc --noEmit  # Should error
grep -rn "console.log" src/  # Should find logs

Read the full file on GitHub · 111 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 111 lines · 26 tokens per session scan A f2fe09ac06cd

Subscribe to this mod's changes

code-quality-gates is a skill published in the GitHub repository changoo89/claude-pilot (20 stars, last pushed 6mo ago), licensed MIT. It adds 26 tokens to every session and 716 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

harness-diet

Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to reference files, convert rules to path-scoped or skill-triggered loading, and verify zero governance loss with deterministic preservation checks. Use on "harness…

sangrokjung/claude-forge · 140 tokens

continuous-learning-v2

Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.

sangrokjung/claude-forge · 33 tokens

OCR Review-to-Approval Loop

Drive a PR to an approved code review by looping OCR's multi-agent review and address steps. Runs /ocr:review then /ocr:address repeatedly until the review verdict is APPROVE, then one final /ocr:address for leftover suggestions, posting every review and every address round to the GitHub PR as comments. Use when the…

spencermarx/open-code-review · 178 tokens

ai-ml-development

AI and machine learning development with PyTorch, TensorFlow, and LLM integration. Use when building ML models, training pipelines, fine-tuning LLMs, or implementing AI features.

travisjneuman/.claude · 43 tokens

case-interview-practice

Interactive consulting case interview practice with structured frameworks, feedback mechanisms, and progressive difficulty. Use when preparing for management consulting interviews, case competitions, or business problem-solving exercises.

travisjneuman/.claude · 39 tokens

i18n-localization

Internationalization and localization for global applications. Use when adding multi-language support, handling regional formats, or preparing apps for global markets.

travisjneuman/.claude · 32 tokens