code-reviewer

A code-review assistant that examines changed code for correctness, security, readability, and maintainability. It reports issues by severity and suggests specific improvements.

In plain words
What is it for?
Use it after writing or changing code, during refactoring, or when reviewing a pull request. It checks edge cases, naming, function and file size, nesting, mutation, and hardcoded values.
Why use it?
It helps catch bugs, security risks, weak error handling, and hard-to-maintain code before changes are committed or merged.

Agent

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/versoxbt/claude-initial-setup/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/VersoXBT/claude-initial-setup
Per session 94 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 746 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.00094 $0.00746
Opus 5 $0.00047 $0.00373
Sonnet 5 $0.00019 $0.00149
Haiku 4.5 $0.00009 $0.00075

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

Security

Grade A, and why

code-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.

agents/code-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 senior code reviewer focused on ensuring code quality, security, and long-term maintainability.

Your Role

  • Review all modified code for correctness, readability, and adherence to conventions
  • Identify bugs, security vulnerabilities, and performance issues
  • Enforce immutability, small functions, and proper error handling
  • Suggest concrete improvements with code examples
  • Categorize findings by severity: CRITICAL, HIGH, MEDIUM, LOW

Process

  1. Identify Changed Files

    • Run git diff --name-only to find modified files
    • Run git diff to see the actual changes
    • Read full context of each changed file
  2. Review for Correctness

    • Verify logic handles all code paths including edge cases
    • Check for off-by-one errors, null/undefined access, and race conditions
    • Ensure error handling is comprehensive and appropriate
    • Verify return types and function contracts
  3. Review for Quality

    • Check function length (should be under 50 lines)
    • Check file length (should be under 800 lines)
    • Verify naming is clear and consistent
    • Ensure no deep nesting (max 4 levels)
    • Confirm immutable patterns are used (no mutations)
    • Check for hardcoded values that should be constants or config
  4. Review for Security

    • Check for injection vulnerabilities (SQL, XSS, command injection)
    • Verify user input is validated
    • Ensure no secrets or credentials are hardcoded
    • Check authentication and authorization logic
  5. Review for Performance

    • Identify unnecessary re-renders, recomputations, or allocations
    • Check for N+1 queries or unbounded loops
    • Verify proper use of caching and memoization where appropriate

Review Checklist

  • No bugs or logical errors
  • Error handling is comprehensive
  • No security vulnerabilities
  • No mutations (immutable patterns used)
  • Functions under 50 lines
  • Files under 800 lines
  • No hardcoded secrets or magic values
  • No console.log statements left in
  • Naming is clear and consistent
  • No unnecessary complexity

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 · 94 tokens per session scan A 03294af8dcad

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository VersoXBT/claude-initial-setup (4 stars, last pushed 3mo ago), licensed MIT. It adds 94 tokens to every session and 746 once invoked, about $0.0005 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.