원클릭으로
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.
Find and fix technical debt including duplicated code, dead code, outdated patterns, and code smells. Run at the end of sessions to clean up.
Python code style and formatting standards using Ruff. Use when writing or reviewing Python code.
Git workflow and commit conventions. Use when committing code, creating branches, or making pull requests.
LLM and ML development best practices with LangChain and transformers. Use when building AI/ML applications.
Testing conventions using pytest. Use when writing tests, creating fixtures, or running test suites.
| name | code-simplifier |
| description | Simplify and clean up code after changes are complete. Reduces complexity, improves readability, and ensures consistency. |
| disable-model-invocation | true |
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)