بنقرة واحدة
code-simplifier
// Simplify and clean up code after changes are complete. Reduces complexity, improves readability, and ensures consistency.
// Simplify and clean up code after changes are complete. Reduces complexity, improves readability, and ensures consistency.
Commit changes, push to remote, and create a pull request. Use for completing features or fixes ready for review.
Implements the Spec-Driven Development lifecycle (Intent, Requirements, Design, Tasks, Build) for structured feature development. Use when the user wants to scaffold a new feature spec, generate EARS requirements, create a technical design, break work into tasks, or check spec status. Trigger on keywords: sdd, spec-driven, ears requirements, feature spec.
Find and fix technical debt including duplicated code, dead code, outdated patterns, and code smells. Run at the end of sessions to clean up.
Run IV, DiD, and RDD analyses in R with proper diagnostics
Build and solve Walrasian general equilibrium models with theory derivations and Julia computation
Panel data analysis with Python using linearmodels and pandas.
| name | code-simplifier |
| description | Simplify and clean up code after changes are complete. Reduces complexity, improves readability, and ensures consistency. |
| workflow_stage | engineering |
| compatibility | ["claude-code","cursor","codex","gemini-cli"] |
| author | Awesome Econ AI Community |
| version | 1.0.0 |
| disable-model-invocation | true |
| tags | ["refactoring","python","readability"] |
Clean up and simplify code after making changes.
Run this skill after completing a feature or fix to ensure the code is clean, readable, and maintainable.
with statements for resource managementenumerate() instead of manual indexingzip() for parallel iterationpathlib for file pathsIdentify Changed Files
Analyze Each File
Apply Simplifications
Format and Lint
ruff format .ruff check --fix .Verify
pytestOptionally specify files or directories to simplify.
Usage:
/code-simplifier - Simplify recently changed files/code-simplifier src/module.py - Simplify specific file/code-simplifier src/ - Simplify entire directoryBefore:
result = []
for i in range(len(items)):
if items[i].is_valid == True:
result.append(items[i].value)
After:
result = [item.value for item in items if item.is_valid]
Before:
if x != None:
if y != None:
if z != None:
process(x, y, z)
After:
if all(v is not None for v in (x, y, z)):
process(x, y, z)