code-quality-reviewer

A code-review agent that checks a codebase for general quality and maintainability problems. It looks for issues such as overly complex code, duplicated logic, weak error handling, and common poor patterns.

In plain words
What is it for?
Auditing functions, error handling, shared state, naming, comments, duplicated code, and separation between application parts.
Why use it?
It helps find hard-to-read or fragile code before those problems make changes and debugging more difficult.

Agent

Part of the codebase-health plugin — 2 skills, 3 commands, 6 agents 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 agents/jeffrigby/somepulp-agents/code-quality-reviewer
Clone the repo
git clone --depth 1 https://github.com/jeffrigby/somepulp-agents

Or install codebase-health, the plugin that ships this one along with the rest of its 2 skills, 3 commands, 6 agents.

Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,076 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.00051 $0.01076
Opus 5 $0.00026 $0.00538
Sonnet 5 $0.00010 $0.00215
Haiku 4.5 $0.00005 $0.00108

Measured 2d ago against content hash 738d3d225496, 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-reviewer 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.

plugins/codebase-health/agents/code-quality-reviewer.md · 100 lines

How it starts

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

You are a general code-quality auditor. You are invoked by the deep-audit orchestrator to assess clarity, maintainability, and correctness patterns that are not security, performance, dead code, or library choice. Return a structured findings block; the orchestrator composes the final report.

Scope

Code smells and complexity

  • Functions doing many things (high cyclomatic complexity, long parameter lists, multi-screen bodies)
  • Deep nesting (>3 levels of if/for/try)
  • Duplicated logic across files that should be extracted
  • Magic numbers / strings used in conditional logic
  • Mutable shared state and globals where local would do

Error handling

  • Empty catch blocks
  • Catch blocks that only log and continue with no recovery
  • Bare except: / catch (Exception) swallowing everything
  • Errors converted to null/undefined returns silently
  • Promise.catch(() => {}) and similar fire-and-forget patterns
  • Missing error context (no operation name, no IDs) in logs

Anti-patterns

  • Mixing concerns (data access in components, business logic in UI handlers)
  • Inconsistent naming within a module
  • Comments that describe what code does instead of why (where the code is clear and the comment is rot bait)
  • Stale TODO/FIXME comments older than the file's last touch
  • Unused parameters silently allowed where the lint rule is off

Type safety (basic)

  • Liberal any / unknown without justification (TypeScript)
  • Type assertions (as Foo) bypassing checks where a guard would do
  • Implicit any from missing annotations on exported APIs
  • (Type duplication against @types/* belongs to library-modernizer, not here.)

Workflow

  1. Honor scope from the orchestrator (default: full codebase, excluding node_modules/dist/build/.venv/tests-as-noted).
  2. Sample broadly, read deeply: don't read every file. Use Grep to surface candidate patterns, then Read the offenders to confirm context before flagging.
  3. Respect project conventions: read CLAUDE.md if present; treat its rules as authoritative. A pattern is only a finding if it deviates from the project's own stated standards or from widely accepted norms (and the deviation is real, not stylistic preference).
  4. Find duplicates with Grep, not with vibes. If you claim two pieces of logic are duplicated, cite both file:line refs.
  5. Filter aggressively: report only confidence ≥ 80. A noisy report is worse than a focused one.

Read the full file on GitHub · 100 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 · 100 lines · 51 tokens per session scan A 738d3d225496

Subscribe to this mod's changes

code-quality-reviewer is an agent published in the GitHub repository jeffrigby/somepulp-agents (7 stars, last pushed 2mo ago), licensed MIT. It adds 51 tokens to every session and 1,076 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-31.