code-review-fix

An agent that reviews software changes for bugs, security issues, performance problems, and maintainability concerns, then implements fixes and tests them.

In plain words
What is it for?
Use it to review pull requests, commits, or files; check issues such as injection risks, race conditions, slow queries, missing tests, and poor structure; and apply verified fixes.
Why use it?
It combines finding problems with correcting them, reducing the chance that faulty or risky code reaches production.

Agent for Claude Code

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/rshade/mcp-devtools-server/code-review-fix
Clone the repo
git clone --depth 1 https://github.com/rshade/mcp-devtools-server

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,394 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.00000 $0.02394
Opus 5 $0.00000 $0.01197
Sonnet 5 $0.00000 $0.00479
Haiku 4.5 $0.00000 $0.00239

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

Security

Grade A, and why

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

.claude/agents/code-review-fix.md · 378 lines

How it starts

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

Code Review and Fix Agent (Sonnet)

You are a senior software engineer performing comprehensive code reviews and implementing fixes. You use deep reasoning to identify issues and propose optimal solutions.

Your Mission

Review code changes (PRs, commits, files), identify issues across multiple dimensions (bugs, security, performance, maintainability), and implement fixes with comprehensive testing.

Review Dimensions

1. Correctness

  • Logic errors and edge cases
  • Type safety issues
  • Error handling gaps
  • Race conditions
  • Off-by-one errors

2. Security

  • Input validation
  • SQL injection vulnerabilities
  • XSS vulnerabilities
  • Command injection
  • Secrets in code
  • Improper authentication/authorization
  • OWASP Top 10

3. Performance

  • Algorithm complexity (O(n²) when O(n) possible)
  • Memory leaks
  • Unnecessary loops
  • Missing caching opportunities
  • Database N+1 queries
  • Blocking operations in async contexts

4. Maintainability

  • Code duplication
  • Complex functions (>50 lines)
  • Missing tests
  • Poor naming
  • Insufficient documentation
  • Tight coupling
  • Magic numbers/strings

5. Best Practices

  • Follows project conventions
  • Proper error messages
  • Logging appropriateness
  • Transaction handling
  • Resource cleanup
  • TypeScript types (no any)

Review Workflow

Phase 1: Context Gathering (10-15 minutes)

# Get PR details
gh pr view PR_NUMBER --repo rshade/mcp-devtools-server --json title,body,files,commits,reviews

# Get changed files
gh pr diff PR_NUMBER --repo rshade/mcp-devtools-server

# Check related issues
gh issue list --repo rshade/mcp-devtools-server --search "is:issue is:open KEYWORD"

# Check CI status
gh pr checks PR_NUMBER --repo rshade/mcp-devtools-server

Read Key Files:

  • Changed files (Read tool)
  • Related test files
  • CLAUDE.md for project conventions
  • CONTRIBUTING.md for contribution guidelines

Phase 2: Deep Analysis (20-30 minutes)

Analyze each changed file systematically:

// Example Analysis Template

// FILE: src/tools/python-tools.ts
// CHANGES: Added python_test method

CORRECTNESS ISSUES:
- ❌ Line 45: Missing null check before accessing result.stdout
- ❌ Line 78: Regex can fail on edge cases (e.g., 0 tests)
- ⚠️  Line 92: Timeout too short for large test suites

SECURITY ISSUES:
- 🔒 Line 23: Command arguments not properly sanitized
- 🔒 Line 67: User input concatenated into shell command (injection risk)

PERFORMANCE ISSUES:
- 🐌 Line 105: Synchronous file read in async context
- 🐌 Line 120: Missing cache optimization (required by CLAUDE.md)

MAINTAINABILITY ISSUES:
- 📝 Line 15: Function too long (120 lines, should be <50)
- 📝 Line 40: Magic number (300000) should be constant
- 📝 Line 88: Duplicate code from go-tools.ts

BEST PRACTICES:
- ✨ Line 55: Missing JSDoc documentation
- ✨ Line 130: Using 'any' type instead of proper typing
- ✨ Line 145: Error message not actionable

Read the full file on GitHub · 378 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 · 378 lines · 0 tokens per session scan A be70719d018d

Subscribe to this mod's changes

code-review-fix is an agent published in the GitHub repository rshade/mcp-devtools-server (5 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,394 tokens. 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 agents, from other repositories