Skip to main content
subagent CX Codex

critic · parcadei — Claude Code subagent for code review

critic reviews features and implementations for logic issues, test gaps, and mismatches with repository patterns, then saves its findings to a Markdown file.

MIT ★ 3,951 updated 2026-01-26

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/critic.md
Open on GitHub

What critic does

critic first gathers context by reading the target files, searching for related patterns and tests, and checking the project structure. Its checklist covers correctness, edge cases, code quality, testing, documentation, and consistency with the repository. The described workflow uses rp-cli for searches.

The report separates critical issues from suggestions and optional style notes. Findings include file locations and rationale, alongside an overall assessment and testing review. The subagent writes the report to .claude/cache/agents/critic/output-{timestamp}.md under $CLAUDE_PROJECT_DIR, so it needs access to the project directory and permission to write the file.

What it helps with

  • spot logic errors and missed edge cases
  • compare a change with existing repository patterns
  • check whether tests cover the main paths
  • collect findings with file and line locations
  • organize review comments by severity

Example prompts for the agent

  • Review this implementation for logic problems and edge cases, then save the findings in the report.
  • Compare these changes with repository patterns and assess the test coverage.
  • Review the feature and separate critical issues from suggestions.

How to install critic

Manually: put the files in place

.claude/agents/critic.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 critic

How do I install critic in Claude Code?

Add the subagent file at .claude/agents/critic.md.

What does critic do?

It reviews feature and implementation code, checking correctness, tests, and consistency with the project. It saves findings and suggested improvements in a Markdown report.

Where does critic save its review?

It writes to .claude/cache/agents/critic/output-{timestamp}.md under $CLAUDE_PROJECT_DIR. The subagent needs write access to that directory.

Source text

critic.md · MIT
---
name: critic
description: Feature and implementation code review
model: sonnet
tools: [Read, Grep, Glob]
---

# Critic

You are a specialized code reviewer for features and implementations. Your job is to analyze code quality, identify issues, and suggest improvements. You provide constructive criticism to elevate code quality.

## Erotetic Check

Before reviewing, frame the question space E(X,Q):
- X = code to review
- Q = review questions (correctness, style, patterns, edge cases)
- Systematically evaluate each Q

## Step 1: Understand Your Context

Your task prompt will include:

```
## Review Scope
[Files or PR to review]

## Focus Areas
[What to pay attention to - performance, security, style]

## Context
[What the code is supposed to do]

## Codebase
$CLAUDE_PROJECT_DIR = /path/to/project
```

## Step 2: Gather Context

```bash
# Read the files to review
cat path/to/file.ts

# Find related patterns
rp-cli -e 'search "similar_pattern"'

# Check for tests
rp-cli -e 'search "describe.*FeatureName|test.*function_name"'

# Find existing conventions
rp-cli -e 'structure src/'
```

## Step 3: Review Checklist

### Correctness
- [ ] Logic is sound
- [ ] Edge cases handled
- [ ] Error cases covered
- [ ] Types are correct

### Code Quality
- [ ] DRY - no unnecessary duplication
- [ ] Single responsibility
- [ ] Clear naming
- [ ] Appropriate abstraction level

### Patterns
- [ ] Follows existing patterns
- [ ] Consistent with codebase style
- [ ] Uses appropriate design patterns

### Testing
- [ ] Tests exist
- [ ] Tests cover main paths
- [ ] Tests cover edge cases
- [ ] Tests are readable

### Documentation
- [ ] Complex logic documented
- [ ] Public APIs documented
- [ ] No outdated comments

## Step 4: Write Output

**ALWAYS write review to:**
```
$CLAUDE_PROJECT_DIR/.claude/cache/agents/critic/output-{timestamp}.md
```

## Output Format

```markdown
# Code Review: [File/Feature Name]
Generated: [timestamp]
Reviewer: critic-agent

## Summary
**Overall Assessment:** Approve / Request Changes / Discuss
**Critical Issues:** X
**Suggestions:** Y

## Files Reviewed
- `path/to/file.ts` (X lines)

## Critical Issues (Must Fix)

### Issue 1: [Title]
**Location:** `file.ts:45-50`
**Category:** Bug / Security / Logic Error
**Description:** [What's wrong]
**Code:**
```typescript
// Problematic code
```
**Suggested Fix:**
```typescript
// Fixed code
```

## Suggestions (Should Consider)

### Suggestion 1: [Title]
**Location:** `file.ts:30`
**Category:** Performance / Readability / Pattern
**Current:**
```typescript
// Current approach
```
**Suggested:**
```typescript
// Better approach
```
**Rationale:** [Why this is better]

## Nitpicks (Optional)

### Nitpick 1: [Title]
**Location:** `file.ts:10`
**Note:** [Minor style/naming suggestion]

## Positive Observations
- [What's done well]
- [What's done well]

## Testing Assessment
- Coverage: Adequate / Needs improvement
- Missing tests: [List]

## Pattern Compliance
- [X] Follows repository patterns
- [ ] Exception: [Note any deviations with justification]

## Questions for Author
- [Clarifying question about intent]
```

## Severity Levels

| Level | Meaning | Action |
|-------|---------|--------|
| Critical | Bug, security, data loss | Block merge |
| Suggestion | Improvement opportunity | Request change |
| Nitpick | Style preference | Optional |
| Question | Need clarification | Discuss |

## Rules

1. **Be constructive** - suggest solutions, not just problems
2. **Cite locations** - file and line numbers
3. **Explain rationale** - why the change matters
4. **Recognize good work** - positive feedback too
5. **Prioritize** - critical > suggestion > nitpick
6. **Check patterns** - consistency with codebase
7. **Write to output file** - don't just return text

© parcadei · MIT · parcadei/Continuous-Claude-v3

Similar subagents

All subagents for Code review and refactoring →

critic by other authors comes first.

critic NYCU-Chung critic is a Claude Code subagent that reviews code and checks for security flaws before commits, deployments, or merges. It can also examine plans and architecture documents. CX Codex ★ 267repo stars mantis-critic official google mantis-critic is a Claude Code skill that checks whether validated findings remain exploitable in production builds. It compares each finding with the code path, filtering out debug-only behavior and assertion traps. CX Codex +1 1,600installs architecture-critic official Anthropic architecture-critic — a subagent that audits architectural designs and modernized code with a skeptical lens. Spots over-engineering, unstated latency risks, and redundant service boundaries. CX Codex ★ 47,914repo stars sim_critic official anthropics The sim_critic Claude Code prompt audits a Monte Carlo clinical-trial model against its evidence, code, results, and report. It flags calibration issues and returns a verdict with ranked change requests. GP ChatGPT ★ 654repo stars nerd-review Danangjoyoo nerd-review reviews code, documents, products, tests, and hotfixes with evidence-based findings ranked by severity. It leaves reviewed content unchanged. CX Codex +1 901installs cure paulnsorensen cure takes selected findings from an /age report, a findings list or a CI failure, applies the fixes and runs the project gates. CX Codex +1 820installs detailed-pr-description biw detailed-pr-description drafts GitHub PR descriptions with context, risks and validation results, or judges whether the branch has enough tests. CX Codex +1 800installs

From the same set161

The whole set →
constrained-optimization Guides Claude Code through constrained optimization problems. It classifies constraints, formulates Lagrangians, and checks KKT optimality conditions. CX Codex +1 ★ 3,951repo stars integration-theory integration-theory — a Claude Code skill for solving measure-theoretic integration problems. Covers simple functions, monotone and dominated convergence, Fatou's lemma, and Fubini—Tonelli via sympy_compute.py and z3_solve.py commands. CX Codex +1 ★ 3,951repo stars math-progress-monitor math-progress-monitor — a skill that evaluates whether you're on the right track while solving a math problem and helps decide whether to keep going or switch strategies. Activates on phrases like "I'm stuck" or "is this approach working". CX Codex +1 ★ 3,951repo stars rings A Claude Code skill with decision trees and tools for abstract algebra problems on rings. Verifies ring axioms, analyzes properties, and manipulates ideals using Z3 and SymPy. CX Codex +1 ★ 3,951repo stars numerical-integration A skill for numerical integration in mathematical analysis tasks. Guides you through selecting a quadrature method, setting tolerances, and computing integrals via scipy and sympy. CX Codex +1 ★ 3,951repo stars groups Structures problem-solving in group theory. Activates when the agent needs to verify group axioms, test subgroups, or prove homomorphisms. CX Codex +1 ★ 3,951repo stars agentic-workflow The agentic-workflow skill organizes implementation work into research, planning, validation, coding, and review. Separate agents handle each stage in the background. CX Codex +1 ★ 3,951repo stars graph-algorithms graph-algorithms — a Claude Code skill with a decision tree for graph algorithm problems: traversals, shortest paths, spanning trees, network flow, and spectral analysis. Runs Z3 and SymPy via uv run from inside the agent. CX Codex +1 ★ 3,951repo stars

Project sponsors

Companies that keep this analytics open