AI-101

Lesson 15

Code Review with /simplify

AI Confidence: 90%

AI-generated

Code Review with /simplify

Learning Objectives

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

Introduction

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.

What /simplify Does

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.

Running /simplify

Basic usage is simple:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

This reviews your recently changed files. You see progress as each agent works, then a summary of findings.

Focus on specific concerns:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

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:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

This is a direct request to Claude rather than the /simplify skill, but achieves a similar result for specific files.

Interpreting Results

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:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Read through the findings. Some you will want to apply. Others you might disagree with.

Applying and Rejecting Fixes

Claude applies some fixes automatically when they are straightforward (like renaming a variable). For others, it provides suggestions.

Apply a suggestion:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Claude makes the suggested change.

Reject a suggestion:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Not all suggestions are right for your situation. It is fine to reject them with an explanation.

Apply all remaining:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

If you agree with everything, apply them all at once.

Review applied changes:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Claude shows the diffs from automatic fixes so you can review them.

When to Run /simplify

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.

Focusing Your Review

Different situations call for different focus areas:

Performance-critical code:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

User-facing features:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Security-sensitive areas:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Maintainability concerns:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Focused reviews are faster and more relevant than unfocused ones.

Combining with Manual Review

/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).

Other Review Approaches

Besides /simplify, you can ask Claude for reviews directly:

Security review:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Performance review:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Architecture review:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

These direct requests give Claude full flexibility in how it analyzes the code.

Key Takeaways

/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

Try It Yourself

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.

Sources

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