Lesson 15
Code Review with /simplify
AI-generated
Code Review with /simplify
Understand what the /simplify skill does
Run /simplify on your recent code changes
Interpret the results from the three-agent review
Apply or reject suggested improvements
Focus reviews on specific concerns
Before you commit code, someone should review it. Ideally that someone has fresh eyes and catches things you missed. Claude Code includes a built-in code review skill called /simplify that does exactly this.
The /simplify skill spawns three review agents that analyze your code in parallel. They look for opportunities to reuse existing code, improve quality, and increase efficiency. Then they report their findings and can apply fixes automatically.
This lesson teaches you how to use /simplify effectively. You will learn when to run it, how to interpret results, and how to make the most of automated code review.
When you run /simplify, Claude Code:
Identifies your recently changed files
Spawns three review agents in parallel
Each agent examines the code from a different angle
Results are aggregated into findings
Claude applies fixes for issues it can resolve
The three review perspectives are:
Code reuse: Are you duplicating code that already exists elsewhere? Could you use an existing utility function?
Code quality: Is the code readable? Are there confusing patterns? Could naming be clearer?
Code efficiency: Are there performance issues? Unnecessary operations? Better algorithms available?
Running three perspectives in parallel gives you broader coverage than a single review pass.
Basic usage is simple:
This reviews your recently changed files. You see progress as each agent works, then a summary of findings.
Focus on specific concerns:
Adding focus instructions tells the agents what to prioritize. This is useful when you know what kind of feedback you want.
Review specific files:
If you want to review files that are not recently changed:
This is a direct request to Claude rather than the /simplify skill, but achieves a similar result for specific files.
After /simplify runs, you see a summary:
Findings: A list of issues identified, organized by type (reuse, quality, efficiency).
Severity: Some findings are more important than others. Critical issues affect correctness. Minor issues are style improvements.
Suggestions: Specific recommendations for how to fix each issue.
Applied fixes: If Claude automatically fixed something, it tells you what changed.
Example output:
Read through the findings. Some you will want to apply. Others you might disagree with.
Claude applies some fixes automatically when they are straightforward (like renaming a variable). For others, it provides suggestions.
Apply a suggestion:
Claude makes the suggested change.
Reject a suggestion:
Not all suggestions are right for your situation. It is fine to reject them with an explanation.
Apply all remaining:
If you agree with everything, apply them all at once.
Review applied changes:
Claude shows the diffs from automatic fixes so you can review them.
Before committing. Run /simplify after making changes but before committing. This catches issues while they are fresh.
Before creating a PR. A /simplify pass before creating a pull request reduces the review burden for your teammates.
After implementing a feature. Complex features often have opportunities for cleanup once the implementation is working.
When refactoring. Even deliberate refactoring can introduce issues. /simplify provides a sanity check.
Periodically on older code. Running /simplify on code you have not touched recently can find improvements you missed originally.
Different situations call for different focus areas:
Performance-critical code:
User-facing features:
Security-sensitive areas:
Maintainability concerns:
Focused reviews are faster and more relevant than unfocused ones.
/simplify does not replace human review entirely. Use it as a first pass:
Run /simplify to catch mechanical issues
Apply or reject the suggestions
Run manual review for logic, architecture, and design
Ask teammates to review for things Claude might miss
Automated review catches things humans overlook (typos, inefficiencies, style issues). Human review catches things automation misses (incorrect logic, poor design decisions, missing requirements).
Besides /simplify, you can ask Claude for reviews directly:
Security review:
Performance review:
Architecture review:
These direct requests give Claude full flexibility in how it analyzes the code.
/simplify runs three parallel review agents for reuse, quality, and efficiency
Run it before committing or creating PRs
Add focus instructions to prioritize specific concerns
Review findings and apply or reject suggestions
Some fixes are applied automatically; others need your approval
Combine automated review with human review for best coverage
Practice code review with these steps:
Start Claude Code in a project.
Make some changes to a file (or use recent changes you made).
Run /simplify and observe the three agents working.
Read through the findings.
Apply one suggestion.
Reject another with an explanation.
Run /simplify focus on readability to see focused feedback.
Compare the focused results to the general results.
This exercise shows how automated code review fits into your workflow.
https://code.claude.com/docs/en/skills - Bundled skills including /simplify
https://code.claude.com/docs/en/commands - Command reference for review-related commands
https://code.claude.com/docs/en/best-practices - Code review as part of the development workflow