QC Quality Gate

VerifiedSafe

Quality gate that runs five parallel AI reviewers on every code diff against main. Each agent checks a specific dimension (code review, simplification, consistency, robustness, scope) and all must pass before commit. Helps catch issues early and enforce codebase standards.

Sby Skills Guide Bot
DevelopmentIntermediate
1506/2/2026
Claude Code
#code-review#quality-gate#automated-review#git-diff#parallel-agents

Recommended for

Our review

Runs five parallel AI agents to review code changes against quality criteria, requiring all to pass before commit.

Strengths

  • Comprehensive multi-perspective review (code style, simplicity, consistency, robustness, scope)
  • Parallel execution for efficiency
  • Clear pass/fail verdicts with issue lists

Limitations

  • Requires a git diff against main
  • Dependent on model quality (sonnet/haiku)
  • Large diffs may need file-by-file processing
  • Cannot enforce fixes automatically
When to use it

Use before committing changes to ensure code quality and catch issues early.

When not to use it

Do not use for initial drafts or exploratory work where perfection is not expected.

Security analysis

Safe
Quality score92/100

The skill only uses safe Bash commands (git diff, git diff --name-only) and reads files for context. No destructive or exfiltrating actions. No obfuscation or disabling of safety. It spawns internal review agents via Task, which is legitimate for a quality gate.

No concerns found

Examples

Run QC on current changes
/qc
Run quality gate with task description
/qc "Adding user authentication feature"
Run QC on a specific diff against main
Run quality gate on the current branch compared to main.

name: qc description: Quality gate. 5 parallel agents review changes. All must pass. allowed-tools: Task, Bash, Read, Grep, Glob

QC Gate

Setup

DIFF=$(git diff main)
FILES=$(git diff main --name-only)
TASK="{task description or 'general changes'}"

Read 1-2 unmodified files from same directories for pattern context.

Agents

Spawn all 5 in parallel. All output raw JSON only, no markdown.

1: Code Review (sonnet)

DIFF: ${DIFF}

- Descriptive naming?
- Errors caught with useful messages?
- No hardcoded values, commented code, debug statements?
- No TODO without ticket ref?
- No obvious bugs?
- No useless comments?

{"pass": bool, "issues": [...]}

2: Simplification (sonnet)

DIFF: ${DIFF}

- Is this overcomplicated? Can I solve the same problem in a simpler manner?
- Can I reduce indirection?
- Can I reduce surface area?
- Premature abstraction? Premature Optimization? YAGNI violations?
- Dead code?
- Three similar lines > one abstraction

{"pass": bool, "issues": [...]}

3: Consistency (sonnet)

DIFF: ${DIFF}
PATTERNS: ${PATTERN_FILES}

- Matches existing codebase patterns?
- Proper types, no any, no unsafe casts?
- Idiomatic error handling?
- Changes internally consistent?
- Is logic isolated and composable?
- Are there existing tests if neccesary?

{"pass": bool, "issues": [...]}

4: Robustness (sonnet)

TASK: ${TASK}
DIFF: ${DIFF}

- Actually solves the problem?
- Edge cases: empty, null, zero, negative, boundaries, concurrency?
- Regression risk: changed signatures, shared state, removed exports?
- Maintains API contracts?

{"pass": bool, "issues": [...]}

5: Scope (haiku)

TASK: ${TASK}
FILES: ${FILES}
DIFF: ${DIFF}

- Solved the problem or just the symptom?
- Changes unrelated to task?
- Unnecessary refactoring?

{"pass": bool, "issues": [...]}

Results

| Check | Verdict | Issues | |-------|---------|--------| | Code Review | ✓/✗ | ... | | Simplification | ✓/✗ | ... | | Consistency | ✓/✗ | ... | | Robustness | ✓/✗ | ... | | Scope | ✓/✗ | ... |

ALL PASS: Ready to commit.

ANY FAIL: List issues, fix them, run /qc again.

Same issue 3x: Escalate to user.

Notes

  • Invalid JSON? Retry once. Still broken? Mark fail.
  • Large diffs (>500 lines): run simplification file-by-file.
Related skills