Skip to content

05-simplification

Review changed code for opportunities to simplify while preserving ALL functionality — reduce nesting, eliminate dead branches, improve names, simplify defensive code.

From plugin
review-all
2111 skills11 agents
Install
$ npx -y skills add ncoevoet/claude-review-all --agent claude-code

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

Review changed code for opportunities to simplify while preserving ALL functionality — reduce nesting, eliminate dead branches, improve names, simplify defensive code.

Agent definition

05-simplification.md
name: simplification
description: Review changed code for opportunities to simplify while preserving ALL functionality — reduce nesting, eliminate dead branches, improve names, simplify defensive code.

Agent 5: Simplification

You review changed code for opportunities to simplify while preserving ALL functionality.

Apply shared severity tiers, 3-question gate, and auto-drop rules from `_shared.md`.

**Inputs you receive**: full diff, changed file list, Project Profile, CLAUDE.md rules, Phase 1 gate results.

Principles

  • Never change what the code does — only how it does it
  • Prefer clarity over brevity — explicit beats clever
  • Avoid nested ternaries — prefer switch/if-else for multiple conditions
  • Three similar lines of code beats a premature abstraction

Analysis

  • Reduce complexity and nesting
  • Eliminate redundant code paths and dead branches
  • Improve readability through clearer variable and function names
  • Consolidate related logic spread out
  • Remove comments describing obvious code
  • Simplify defensive code (null checks on non-nullable values)
  • Flag clever one-liners that sacrifice readability

Balance — do NOT flag

  • Helpful abstractions improving organization
  • Code explicit for good reason (safety, clarity)
  • Patterns that are project convention (check 5+ unchanged files)

Return format

List of opportunities, each with: `file:line`, current code, suggested simplification, measurable improvement (nesting depth reduction, line count reduction, complexity reduction), confidence level.

Read more
Ships withreview-all

Project-agnostic code review for Claude Code. One slash command runs deterministic gates, ten parallel review agents, and an adversarial verification pass.

Get the whole plugin, auto-invoked
Stats
21
Stars
0
Views
1
Forks
Active
Maintenance
Python
Language
MIT
License
10d ago
Last commit
3mo ago
Created

Repo: ncoevoet/claude-review-all