diff options
| author | Dan Guido <dan@trailofbits.com> | 2026-02-13 13:11:44 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-13 13:11:44 -0500 |
| commit | 5e3e83226aafe006117c457871bff72493e0ff78 (patch) | |
| tree | 8d67655fb6c563c67c33e9cf2356c1044d6b34b7 /plugins/python-code-simplifier/README.md | |
| parent | e9a51befa14d95c36112ce6d3d15a931c55095e9 (diff) | |
Add python-code-simplifier plugin (#15)
* Add python-code-simplifier plugin imported from anthropics/claude-plugins-official
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Use agent format instead of skill format to match original
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'plugins/python-code-simplifier/README.md')
| -rw-r--r-- | plugins/python-code-simplifier/README.md | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/plugins/python-code-simplifier/README.md b/plugins/python-code-simplifier/README.md new file mode 100644 index 0000000..abd21bf --- /dev/null +++ b/plugins/python-code-simplifier/README.md @@ -0,0 +1,32 @@ +# Python Code Simplifier + +Simplifies and refines Python code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise. + +Adapted from Anthropic's [code-simplifier](https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-simplifier) agent with Python-specific standards replacing the original TypeScript/React guidance. + +## Install + +``` +/plugin install trailofbits/skills-curated/plugins/python-code-simplifier +``` + +## What It Does + +After writing or modifying Python code, this skill reviews recent changes and applies refinements: + +- Flattens unnecessary nesting with guard clauses and early returns +- Improves naming consistency (`snake_case` functions, `PascalCase` classes, `UPPER_SNAKE_CASE` constants) +- Adds type annotations to public function signatures +- Sorts imports (stdlib, third-party, local) +- Replaces dense comprehensions or chained expressions with clearer alternatives +- Removes redundant code and unnecessary comments +- Consolidates related logic without over-abstracting + +All changes preserve exact functionality — only how the code reads changes, never what it does. + +## Credits + +- **Source:** [anthropics/claude-plugins-official](https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-simplifier) +- **Author:** Anthropic +- **Adaptation:** TypeScript/React standards replaced with Python equivalents +- **License:** Not specified |
