python-code-simplifier — Claude Code plugin for Python
The python-code-simplifier plugin refines recently changed Python code without altering its behavior. Use it after edits to make the code easier to read and maintain.
CC-BY-SA-4.0 ★ 540 updated 2026-07-14
/plugin marketplace add trailofbits/skills-curated
/plugin install python-code-simplifier@skills-curatedWhat python-code-simplifier does
After Python code is added or changed, the plugin reviews the recent work. It can reduce needless indentation, use consistent Python naming, add annotations to public function signatures, and reorder imports. Dense expressions can be rewritten in a more readable form.
It also removes duplicate logic and comments that do not help explain the code, while grouping related operations without adding unnecessary abstractions. The program’s behavior should stay the same; the edits target how the code is expressed. Its usual scope is recent changes, so ask explicitly when you want it to inspect more.
What it helps with
- flatten nested conditions in Python functions
- align names with common Python casing conventions
- add type annotations to public function signatures
- untangle dense expressions and remove redundant comments
Example prompts for the agent
- Simplify the Python code I just changed while keeping its behavior the same.
- Review the edited files and sort their imports in Python style.
- Inspect this whole module and make its expressions easier to follow without changing the logic.
How to install python-code-simplifier
Plugin marketplace
/plugin marketplace add trailofbits/skills-curated/plugin install python-code-simplifier@skills-curatedStep by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own
Questions about python-code-simplifier
How do I install python-code-simplifier in Claude Code?
Run these commands in order: /plugin marketplace add trailofbits/skills-curated, then /plugin install python-code-simplifier@skills-curated.
What does python-code-simplifier do?
It refines recent Python edits by reducing needless nesting, organizing imports, and making expressions clearer while keeping program behavior intact.
Which Python code does the plugin review?
Its normal focus is recently changed code. Ask directly for a wider review when you want it to cover a whole file or module.