Home
cd ../playbooks
Academic ResearchBeginner

Quality Gates System

Implement a scoring system (0-100) that blocks commits below threshold. 80+ to commit, 90+ for PR, 95+ for excellence. Prevents shipping subpar work.

5 minutes
By communitySource
#quality#scoring#gates#thresholds#code-review#standards

Claude writes code fast but sometimes ships sloppy work — missing tests, unclear variable names, no error handling. Without quality gates, speed comes at the cost of maintainability. A scoring system that blocks subpar commits turns Claude into a disciplined engineer.

Who it's for: developers wanting to enforce quality standards on AI-generated code, tech leads setting minimum quality bars for Claude Code output, teams using Claude for production code that needs to meet standards, engineering managers establishing automated quality checks, solo developers who want guardrails on their own AI-assisted output

Example

"Set up quality gates for Claude's code output" → Scoring system evaluating readability, test coverage, error handling, documentation, and naming conventions — 80+ required to commit, 90+ for PR creation, with specific feedback on how to improve each dimension

CLAUDE.md Template

New here? 3-minute setup guide → | Already set up? Copy the template below.

Or install from your terminal:
npx ccplaybooks add quality-gates-system
# Quality Gates

## Scoring Thresholds

| Score | Threshold | Meaning | Action Allowed |
|-------|-----------|---------|----------------|
| 95+   | Excellence | Exceptional quality | Deploy to production |
| 90+   | PR Ready  | Ready for review/deployment | Create PR, merge |
| 80+   | Commit    | Safe to save progress | Git commit allowed |
| 60-79 | Needs Work | Has issues | Must fix before committing |
| <60   | Blocked   | Critical problems | Stop and address |

Get new playbooks like this one

One email a week with new Claude Code workflows. Free, like everything here.

No spam. Unsubscribe anytime.

README.md

What This Does

This playbook establishes a quality scoring system where every piece of work gets a 0-100 score. Scores below 80 block commits. Scores 90+ are deployment-ready. This creates a clear, objective standard for "done" and prevents the gradual drift toward shipping unfinished work.

Prerequisites

  • Claude Code installed and configured
  • A project where you want quality standards enforced

Quality Score: XX/100

Deductions:

  • (-10) Missing error handling in submitForm()
  • (-5) Inconsistent naming: userId vs user_id
  • (-2) Typo in comment line 45

Verification:

  • Build: Passed
  • Tests: 47/47 passed
  • Lint: No errors
  • Manual test: Form submits correctly

Verdict: [COMMIT OK | FIX REQUIRED | BLOCKED]


## Waiver Process

For scores between 60-79, user can waive with explicit approval:
1. Claude presents the issues
2. User says "Waive and commit with known issues"
3. Claude commits with a note documenting waived issues
4. Issues must be addressed in follow-up PR

## Project-Specific Deductions

Add your own scoring rules here:
- (-15) API endpoint without authentication
- (-10) Database query without parameterization
- (-10) Hardcoded secrets or credentials
- (-5) Console.log left in production code

Step-by-Step Setup

Step 1: Add to your CLAUDE.md

Add the quality gates section to your project's CLAUDE.md.

Step 2: Customize deductions

Add project-specific deductions for issues that matter in your codebase:

  • Frontend: Accessibility, responsive design, bundle size
  • Backend: SQL injection, auth checks, rate limiting
  • Data: Schema validation, null handling, precision

Step 3: Test the system

Ask Claude to score existing code:

Score the authentication module against our quality gates

Example Usage

User:

"Add password reset functionality. Let me know the quality score when done."

Claude (after implementation):

Quality Score: 87/100

Deductions:

  • (-10) Missing rate limiting on reset endpoint
  • (-3) No logging of reset attempts

Verification:

  • Build: Passed
  • Tests: 12/12 passed
  • Lint: No errors
  • Manual test: Reset email received, link works

Verdict: COMMIT OK

Score of 87 allows commit. For PR readiness (90+), recommend adding rate limiting.

User:

"Add rate limiting, then re-score"

Claude (after fix):

Quality Score: 94/100

Deductions:

  • (-3) No logging of reset attempts
  • (-3) Reset email template could use branding

Verdict: PR READY

Score of 94 is excellent. Ready to create PR.

Tips

  • Start strict, relax later: Easier to lower standards than raise them. Start with strict deductions.
  • Document waivers: When you waive issues, track them. They're tech debt now.
  • Team calibration: If working with others, align on what constitutes -10 vs -5 issues.
  • Celebrate excellence: A 95+ score is genuinely excellent. Don't score inflate.

Troubleshooting

Problem: Scores feel arbitrary

Solution: Add more specific deduction rules to your CLAUDE.md. The more concrete, the more consistent.

Problem: Too many things blocking at 80

Solution: Review your deductions. Maybe some -10 issues should be -5. Or fix the underlying quality issues in your codebase.

Problem: Always scoring exactly 85 or 90

Solution: Claude might be anchoring to "safe" scores. Ask for detailed deduction breakdown and verify each item.

$Related Playbooks

Academic Research

Scholarly Writing Refiner

Polish academic English at the sentence level — a five-dimension review (grammar, word choice, voice, coherence, sentence structure) with concrete before/after tables for colloquial-to-academic substitutions, active/passive voice selection by scenario, transition-signal words by logical relationship, and section-specific tense and structure conventions for the Abstract and Introduction.

5 minutes
Beginner
Academic Research

Scientific Adaptyv

Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental validation including binding assays, expression testing, thermostability measurements, enzyme activity assays, or protein ...

10 minutes
Intermediate
Academic Research

Scientific Alphafold Database

Access AlphaFold 200M+ AI-predicted protein structures. Retrieve structures by UniProt ID, download PDB/mmCIF files, analyze confidence metrics (pLDDT, PAE), for drug discovery and structural biology.

10 minutes
Intermediate
Academic Research

Scientific Anndata

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; f...

10 minutes
Intermediate
Academic Research

Scientific Arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships a...

10 minutes
Intermediate
Academic Research

Scientific Benchling Integration

Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.

10 minutes
Intermediate
Academic Research

Scientific Bindingdb Database

Query BindingDB for measured drug-target binding affinities (Ki, Kd, IC50, EC50). Search by target (UniProt ID), compound (SMILES/name), or pathogen. Essential for drug discovery, lead optimization, polypharmacology analysis, and structure-activit...

5 minutes
Beginner
Academic Research

Scientific Biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation...

10 minutes
Intermediate
Academic Research

Scientific Biorxiv Database

Efficient database search tool for bioRxiv preprint server. Use this skill when searching for life sciences preprints by keywords, authors, date ranges, or categories, retrieving paper metadata, downloading PDFs, or conducting literature reviews.

5 minutes
Beginner
Academic Research

Scientific Bioservices

Unified Python interface to 40+ bioinformatics services. Use when querying multiple databases (UniProt, KEGG, ChEMBL, Reactome) in a single workflow with consistent API. Best for cross-database analysis, ID mapping across services. For quick singl...

10 minutes
Intermediate
Academic Research

Scientific Brenda Database

Access BRENDA enzyme database via SOAP API. Retrieve kinetic parameters (Km, kcat), reaction equations, organism data, and substrate-specific enzyme information for biochemical research and metabolic pathway analysis.

5 minutes
Beginner
Academic Research

Scientific Cbioportal Database

Query cBioPortal for cancer genomics data including somatic mutations, copy number alterations, gene expression, and survival data across hundreds of cancer studies. Essential for cancer target validation, oncogene/tumor suppressor analysis, and p...

5 minutes
Beginner

Browse all Academic Research playbooks →