ql-review

A two-stage code review process that first checks whether the implementation matches its requirements and then checks code quality.

In plain words
What is it for?
Use it after implementation or before merging to review recent changes against a project specification and then assess their quality.
Why use it?
It stops reviewers from spending time polishing code that does not satisfy the requested behavior.

Skill for Claude CodeCodex

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/andyzengmath/quantum-loop/ql-review
Any agent
npx skills add andyzengmath/quantum-loop --skill ql-review
Clone the repo
git clone --depth 1 https://github.com/andyzengmath/quantum-loop

Made for: Claude Code, Codex.

Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,627 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.00062 $0.01627
Opus 5 $0.00031 $0.00813
Sonnet 5 $0.00012 $0.00325
Haiku 4.5 $0.00006 $0.00163

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

Security

Grade A, and why

ql-review 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 2d 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.

skills/ql-review/SKILL.md · 184 lines

How it starts

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

Quantum-Loop: Review

You orchestrate a two-stage code review. Stage 1 (spec compliance) MUST pass before Stage 2 (code quality) begins. This order is absolute.

Why Two Stages?

Code that doesn't match the spec is waste -- no matter how well-written. Checking spec compliance first prevents spending review effort on code that needs to be rewritten anyway.

Usage Modes

Mode 1: Within /quantum-loop:execute (automated)

Called automatically by the execution loop after a story's quality checks pass. Receives story context from quantum.json.

Mode 2: Standalone (user-invoked)

User invokes /quantum-loop:review directly to review recent changes.

Standalone Workflow

Step 1: Determine Review Scope

If the user specifies a story ID, use it. Otherwise:

  1. Check for quantum.json -- if exists, identify the most recent in_progress story
  2. If no quantum.json, use the current branch's diff from main/master:
    git merge-base HEAD main
    

Determine BASE_SHA and HEAD_SHA for the review range.

Step 2: Identify the Spec

  1. If quantum.json exists: read the PRD path and story acceptance criteria
  2. If no quantum.json: ask the user what requirements this code should meet
  3. If no spec exists at all: skip Stage 1, proceed directly to Stage 2 with a warning

Step 3: Stage 1 -- Spec Compliance Review

Dispatch the spec-reviewer agent with:

  • STORY_ID
  • PRD_PATH
  • BASE_SHA
  • HEAD_SHA

Wait for the review result.

If Stage 1 PASSES:

  • Log result to quantum.json (if available)
  • Proceed to Stage 2

If Stage 1 FAILS:

  • Present the issues to the user (or to the execution loop)
  • List every unsatisfied acceptance criterion with evidence
  • Do NOT proceed to Stage 2
  • If within /quantum-loop:execute: return failure with issues list

Step 4: Stage 2 -- Code Quality Review

Only reached if Stage 1 passed.

Dispatch the quality-reviewer agent with:

  • STORY_ID
  • BASE_SHA
  • HEAD_SHA
  • DESCRIPTION (brief summary of what was implemented)

Read the full file on GitHub · 184 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. 2d ago First seen · 184 lines · 62 tokens per session scan A 150a380eb8dd

Subscribe to this mod's changes

ql-review is a skill published in the GitHub repository andyzengmath/quantum-loop (24 stars, last pushed 2mo ago), licensed MIT. It adds 62 tokens to every session and 1,627 once invoked, about $0.0003 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