Skip to main content
subagent CX Codex

code-reviewer · worldflowai — Claude Code subagent: catch bugs, security flaws

The code-reviewer subagent reviews code changes for security vulnerabilities, bugs, performance problems, and style violations. Run it immediately after writing or modifying code to catch issues before they reach production.

MIT ★ 6,739 updated 2026-01-23

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add WorldFlowAI/everything-claude-code
/plugin install everything-claude-code@everything-claude-code
Open on GitHub

What code-reviewer does

code-reviewer inspects recent changes via git diff and checks them against a comprehensive list: security (hardcoded keys, SQL injection, XSS), code quality (oversized functions, deep nesting, missing error handling), performance (inefficient algorithms, N+1 queries), and best practices (variable naming, JSDoc, accessibility). Results are grouped by priority: critical issues must be fixed, warnings should be reviewed, and suggestions help improve the code. Each finding includes the file, line number, explanation, and a concrete fix example.

The subagent uses file reading and search tools and runs on Claude Opus. You can customize checks to match your project's standards through CLAUDE.md or skill files.

What it helps with

  • detect hardcoded API keys and credentials before commit
  • identify SQL injection and XSS vulnerabilities in new code
  • verify error handling and input validation
  • spot duplicate or unnecessarily complex logic
  • ensure adequate test coverage and documentation

Example prompts for the agent

  • Review my recent changes for security and quality issues
  • Run code-reviewer on the current branch
  • Find critical problems before merging this code

How to install code-reviewer

1Plugin marketplace

/plugin marketplace add WorldFlowAI/everything-claude-code
/plugin install everything-claude-code@everything-claude-code

2Manually: put the files in place

.claude/agents/code-reviewer.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about code-reviewer

How do I install code-reviewer in Claude Code?

Run /plugin marketplace add WorldFlowAI/everything-claude-code, then /plugin install everything-claude-code@everything-claude-code. Next, set up the agent via .claude/agents/code-reviewer.md.

What does code-reviewer do?

It analyzes your code changes for security issues (hardcoded secrets, injection attacks, XSS), quality problems (duplication, poor naming, large functions), performance gaps (inefficient algorithms), and style violations. It provides specific fixes for each issue.

Can I customize the review rules for my project?

Yes, add project-specific checks via CLAUDE.md or skill files. The subagent supports custom rules like the MANY SMALL FILES principle, emoji restrictions, immutability patterns, or checks for specific integrations.

Source text

code-reviewer.md · MIT
---
name: code-reviewer
description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code. MUST BE USED for all code changes.
tools: Read, Grep, Glob, Bash
model: opus
---

You are a senior code reviewer ensuring high standards of code quality and security.

When invoked:
1. Run git diff to see recent changes
2. Focus on modified files
3. Begin review immediately

Review checklist:
- Code is simple and readable
- Functions and variables are well-named
- No duplicated code
- Proper error handling
- No exposed secrets or API keys
- Input validation implemented
- Good test coverage
- Performance considerations addressed
- Time complexity of algorithms analyzed
- Licenses of integrated libraries checked

Provide feedback organized by priority:
- Critical issues (must fix)
- Warnings (should fix)
- Suggestions (consider improving)

Include specific examples of how to fix issues.

## Security Checks (CRITICAL)

- Hardcoded credentials (API keys, passwords, tokens)
- SQL injection risks (string concatenation in queries)
- XSS vulnerabilities (unescaped user input)
- Missing input validation
- Insecure dependencies (outdated, vulnerable)
- Path traversal risks (user-controlled file paths)
- CSRF vulnerabilities
- Authentication bypasses

## Code Quality (HIGH)

- Large functions (>50 lines)
- Large files (>800 lines)
- Deep nesting (>4 levels)
- Missing error handling (try/catch)
- console.log statements
- Mutation patterns
- Missing tests for new code

## Performance (MEDIUM)

- Inefficient algorithms (O(n²) when O(n log n) possible)
- Unnecessary re-renders in React
- Missing memoization
- Large bundle sizes
- Unoptimized images
- Missing caching
- N+1 queries

## Best Practices (MEDIUM)

- Emoji usage in code/comments
- TODO/FIXME without tickets
- Missing JSDoc for public APIs
- Accessibility issues (missing ARIA labels, poor contrast)
- Poor variable naming (x, tmp, data)
- Magic numbers without explanation
- Inconsistent formatting

## Review Output Format

For each issue:
```
[CRITICAL] Hardcoded API key
File: src/api/client.ts:42
Issue: API key exposed in source code
Fix: Move to environment variable

const apiKey = "sk-abc123";  // ❌ Bad
const apiKey = process.env.API_KEY;  // ✓ Good
```

## Approval Criteria

- ✅ Approve: No CRITICAL or HIGH issues
- ⚠️ Warning: MEDIUM issues only (can merge with caution)
- ❌ Block: CRITICAL or HIGH issues found

## Project-Specific Guidelines (Example)

Add your project-specific checks here. Examples:
- Follow MANY SMALL FILES principle (200-400 lines typical)
- No emojis in codebase
- Use immutability patterns (spread operator)
- Verify database RLS policies
- Check AI integration error handling
- Validate cache fallback behavior

Customize based on your project's `CLAUDE.md` or skill files.

© Affaan Mustafa · MIT · WorldFlowAI/everything-claude-code

Similar subagents

All subagents for Code review and refactoring →

code-reviewer by other authors comes first.

code-reviewer official Anthropic code-reviewer reviews code changes against CLAUDE.md project rules and flags material defects. Run it before a commit or pull request. CX Codex 31,050installs code-reviewer official Anthropic The code-reviewer subagent checks code changes for bugs, security issues, and project-rule violations. Use it when a review should focus on findings that matter. CX Codex 31,050installs code-reviewer VoltAgent Community code-reviewer reviews code changes for bugs, security flaws and maintenance issues. Use it before merging complex work or auditing a project. CX Codex 31,050installs code-reviewer ChrisWiles code-reviewer — a subagent for Claude Code that checks newly written or modified code against project standards, TypeScript strict mode, and security patterns. CX Codex ★ 6,091repo stars code-reviewer VoltAgent code-reviewer — a subagent for comprehensive code review covering maintainability, design, and risk factors beyond correctness. Surfaces issues in error handling, data contracts, and state mutations that threaten production stability. CX Codex ★ 6,505repo stars gjalla-code-review gjalla gjalla-code-review reviews PRs and diffs before merge from the perspective of an architect, security analyst, and QA engineer. Groups findings by severity. CX Codex +1 865installs general-code-reviewer Giuseppe Trisciuoglio The general-code-reviewer subagent checks code changes for bugs, security flaws, and quality problems, reporting only findings with a confidence score of at least 80. CX Codex ★ 372repo stars adversarial-reviewer ekreloff The adversarial-reviewer skill reviews changes through Saboteur, New Hire, and Security Auditor personas. Use it before merging a PR or when Claude is too agreeable. CX Codex +1 813installs git-pr-reviewer OneWave-AI The git-pr-reviewer skill reads your branch diff and walks the changed files for bugs, security holes, performance and test gaps. Handy when you would rather not read the diff yourself. CX Codex +1 339installs code-review jwynia code-review is a Claude Code skill for finding defects and assessing code quality. It activates on requests to review code, check a PR, or evaluate changes systematically. CX Codex +1 505installs verify OrchestKit verify is a skill that checks whether work is ready to merge by running tests, security and type checks, then assigns a 0–10 score. CX Codex +1 210installs

From the same set29

The whole set →
agents Defines nine agents in ~/.claude/agents/ for different development tasks: planning, design, testing, code review, and more. Run them in parallel for independent work. CX Codex +1 ★ 6,739repo stars checkpoint Saves named Git checkpoints during a Claude Code workflow and compares changed files, test results, and test coverage against earlier marks. CX Codex +1 ★ 6,739repo stars learn The learn slash command turns reusable lessons from the current session into skills. Run it after a difficult fix, debugging session, or project-specific discovery. CX Codex +1 ★ 6,739repo stars setup-pm setup-pm — a command to configure which package manager (npm, pnpm, yarn, or bun) Claude Code uses in your project or globally. Use it when you want to enforce a specific manager across your workflow. CX Codex +1 ★ 6,739repo stars planner planner generates structured implementation plans and refactoring roadmaps for Claude Code projects. CX Codex ★ 6,739repo stars orchestrate orchestrate routes a complex task through a sequence of agents and combines their findings into a report. Choose a workflow for a feature, bug fix, refactor, or security review. CX Codex +1 ★ 6,739repo stars plan Command invokes a planner sub-agent that breaks down the task into phases, assesses risks, and waits for confirmation before touching any code. CX Codex +1 ★ 6,739repo stars architect An opus-powered subagent for designing scalable software architecture, analyzing technical trade-offs, and drafting Architecture Decision Records. CX Codex ★ 6,739repo stars

More in the catalog

Project sponsors

Companies that keep this analytics open