PluginInstalls cleanly
Tidy up code Claude just wrote
code-simplifier
An Anthropic plugin with a helper agent that rewrites the code you just changed to be clearer and simpler, without changing what the code does.
- Works with
- Claude Code
- Good for
- Build an app
What it does
When an assistant builds features one by one, the code often ends up longer and more tangled than it needs to be. That makes the next change harder, for you and for the assistant. Code Simplifier is a plugin from Anthropic. It adds a helper agent, called a subagent, whose only job is to tidy up.
It looks at the code that changed in your current session and rewrites it to be easier to read: less nesting, no repeated parts, clearer names, and no comments that only repeat the code. Its first rule is that the program must still do exactly the same thing.
It follows the coding rules in your CLAUDE.md file. Its own built-in rules lean towards JavaScript, TypeScript and React projects, so if you use another language, write your preferences in CLAUDE.md.
The agent edits your files directly and has no tool limits, so it can also run commands. Commit your work with Git before you use it, so you can go back. The current version is 1.0.0. The agent file last changed in February 2026.
Who it is for
People who let Claude Code write most of their code and want it kept readable, so that later changes stay easy.
Example prompts
- "Use the code-simplifier subagent to clean up the code you just changed."
- "@code-simplifier:code-simplifier simplify the login page code."
- "Have the code-simplifier subagent look at my recent changes, then run the tests."
- "Simplify only the files in the src folder, and show me what changed."
How to install
/plugin install code-simplifier@claude-plugins-officialHow to use it
After a change, ask: Use the code-simplifier subagent to clean up the code you just changed. To be sure it runs, type @ and pick code-simplifier:code-simplifier.
Check it works
Type @ in Claude Code. Agents from plugins appear in the list under their plugin name, so look for code-simplifier:code-simplifier (Claude Code subagents docs). You can also run /agents and look for it there.
Common problems
- The agent is not in the @ list — the plugin did not load — follow "After install: plugin not working" in the Claude Code plugin docs.
- It changed code you wanted to keep as it was — it works on recently changed code — ask Claude to undo the last change, or use Git to go back (our reading).
- It applies JavaScript habits to another language — its built-in rules are written for JavaScript and TypeScript — add your language's rules to CLAUDE.md (our reading).
What to watch out for
- It edits your files: the agent rewrites recently changed code in place, so commit or back up your work first (agents/code-simplifier.md)
- The agent file sets no tool limits, so the agent can use every tool your session has, including shell commands (agents/code-simplifier.md; Claude Code subagents docs)
- The agent's instructions say it works proactively, right after code is written, without being asked. Its short description does not say so, but Claude may still start it on its own (agents/code-simplifier.md, our reading)
- It asks for the Opus model (model: opus in the agent file), which may use more of your plan's limits than a smaller model (our reading)
- Its built-in style rules are written for JavaScript, TypeScript and React (ES modules, the function keyword, return types); put your own rules in CLAUDE.md, which it is told to follow
Licence and author
- Licence
- Apache-2.0
- Author
- Anthropic
How we tested it
We installed it on an empty test computer on 20 Oct 2026. Installed and started in a clean test system. Not yet used in a real AI session.
The agent was not run on code. Not yet used on real work.
Technical details of the test
- Date
- 20 Oct 2026
- Method
- Intake sandbox run on 2026-10-20 in a clean container with no account: cloned the repository and checked its skill, agent and plugin files; installed code-simplifier@claude-plugins-official with the Claude Code command line.
Checked again on 20 Oct 2026
Alternatives
- PR Review Toolkit (Anthropic) — six review agents, one of which is its own code-simplifier, plus test and error checks.
- Feature Dev plugin (Anthropic) — a full plan, build and review workflow, not only clean-up.
- Asking directly — "simplify this file" works without the plugin; the agent just keeps the rules the same every time.
FAQ
Will it break my app? Its rule is to keep behaviour the same, but run your app or tests afterwards to be sure.
Does it look at my whole project? No, only recently changed code, unless you ask for more.
Does it cost extra? No extra fee, but it uses your normal Claude usage, on the Opus model.
Does it work in Codex or Gemini CLI? No. It is a Claude Code plugin.
Sources
- github.com/anthropics/claude-plugins-official/tree/main/plugins/code-simplifier
- github.com/anthropics/claude-plugins-official/blob/main/plugins/code-simplifier/agents/code-simplifier.md
- code.claude.com/docs/en/sub-agents