code-quality-loop

An iterative code-review and fix process that repeats until the code is clean or no further progress is possible.

In plain words
What is it for?
Use it on uncommitted code changes to review correctness, style, error handling, comments, types, tests, and code structure.
Why use it?
It reduces the need to coordinate separate review and repair passes and checks whether fixes actually resolve the findings.

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

Made for: Claude Code, Codex.

Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,475 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.00040 $0.05475
Opus 5 $0.00020 $0.02738
Sonnet 5 $0.00008 $0.01095
Haiku 4.5 $0.00004 $0.00547

Measured yesterday against content hash 0e21cb370df7, 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-loop 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 yesterday.

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/code-quality-loop/SKILL.md · 552 lines

How it starts

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

Code Quality Loop

Automated code review cycle: review -> fix -> re-review until clean. Focuses on code-level quality (correctness, style, error handling, tests).

Overview

Pre-loop:  language-specific agents -> fix (once per detected language)
Loop R1:   code-reviewer + silent-failure-hunter + comment-analyzer + type-design-analyzer -> triage -> fix
Loop R2+:  code-reviewer + silent-failure-hunter -> triage -> fix -> repeat
Finalize:  reorganize (if applicable) -> code-simplifier agent -> build -> test consolidation -> pr-test-analyzer

Arguments

$ARGUMENTS: Optional flags and max round count.

  • Max rounds: /code-quality-loop 3 — limit to 3 rounds (default: 5)
  • Skip reorganize: /code-quality-loop --skip-reorganize — skip the Reorganize step in Finalize
  • Force reorganize: /code-quality-loop --reorganize — always run Reorganize regardless of change size
  • Combined: /code-quality-loop 3 --skip-reorganize

If neither --skip-reorganize nor --reorganize is specified, the Orchestrator decides automatically based on change scope (see Finalize Step 1).

Initialization

  1. Scope: Always reviews git diff (unstaged changes), consistent with all internal review tools. Run git diff --name-only --diff-filter=d to identify changed files. If no changes found, abort with message "No changes to review."

  2. Language detection: Detect languages from changed files:

    { git diff --name-only --diff-filter=d HEAD; git ls-files --others --exclude-standard; } | grep '\.' | sed 's/.*\.\([^.]*\)$/\1/' | sort -u
    

    Map file extensions to language-specific agents:

    • .go -> go-reviewer
    • .rs -> rust-reviewer
    • .py -> python-reviewer
    • .ts, .tsx, .js, .jsx, .html, .vue, .svelte -> frontend-security-reviewer

    Record the set of applicable language agents as language_agents.

  3. Load design context (optional): Look for a design document in the project (e.g., openspec/changes/*/design.md, docs/design.md, or similar). If multiple exist, use the most recently modified one. If found, read it. This is the fix boundary constraint -- applies to all fix actions throughout this command (loop fixes, simplify, etc.). Do not deviate from design intent unless a design-level defect is found (security vulnerability, race condition, obvious logic error). If no design document is found, skip this constraint -- all fixes are allowed.

Read the full file on GitHub · 552 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. yesterday First seen · 552 lines · 40 tokens per session scan A 0e21cb370df7

Subscribe to this mod's changes

code-quality-loop is a skill published in the GitHub repository NYTC69/review-loop (3 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 40 tokens to every session and 5,475 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

codex-adversarial-review-lite

Codex Adversarial Review - Lite: user-invoked audit workflow for Claude Code users who want Codex CLI to independently review AI-generated code, plans, test expectations, and scope before fixes are applied. Cross-platform (Windows, macOS, Linux, WSL). Use only when the user explicitly invokes audit or selftest.

razaumair2203-ux/codex-adversarial-review-lite · 76 tokens

codex-handoff

Three-phase collaboration workflow between Claude Code (planner/decision-maker) and Codex CLI (implementer/reviewer) via the codex-plugin-cc plugin. Use whenever a coding task involves multiple files, new modules, cross-cutting refactors, business logic changes, or anything that warrants a written spec and a review…

ParaGenie/claude-codex-handoff · 175 tokens

brain-docs

Set up and maintain a "project brain" — a brain/ folder holding three living documents (decisions.md, flow.md, todo.md) that give a project persistent memory across chat sessions. Use this skill whenever the user wants a decision log, architecture/flow notes, project memory, living documentation, or notes that survive…

IAbhishekJhaI/brain · 162 tokens

codex-handoff

Three-phase collaboration workflow between Claude Code (planner/decision-maker) and Codex CLI (implementer/reviewer) via the codex-plugin-cc plugin. Use whenever a coding task involves multiple files, new modules, cross-cutting refactors, business logic changes, or anything that warrants a written spec and a review…

ParaGenie/claude-codex-handoff · 175 tokens

moai-ref-ui-polish

UI polish and interface-completion reference: the small visual details — concentric border radius, optical alignment, shadow-vs-border, motion easing, typography smoothing, tabular numbers, icon stroke weight, hit areas — that separate polished interfaces from generic ones. Agent-extending skill that amplifies…

modu-ai/moai-adk · 98 tokens

trellis-brainstorm

Guides collaborative requirements discovery before implementation. Creates task directory, seeds PRD, asks high-value questions one at a time, researches technical choices, and converges on MVP scope. Use when requirements are unclear, there are multiple valid approaches, or the user describes a new feature or complex…

mindfold-ai/Trellis · 65 tokens