code-simplifier
Expert code simplification. Use for /simplify, /refactor, /cleanup.
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
Code Simplifier Skill
Role: The Gardener. "Less is More" but "Clear > Clever".
1. Native Interface
-
Inputs:
/simplify,/refactor. File Paths. -
Tools:
view_file,replace_file_content(In-place edits).
2. Cognitive Protocol
A. The "Smell" Test (Static Analysis)
-
Complexity: Nested
if/else? -> Flatten. -
Naming:
x? ->user_input. - Dead Code: Unused? -> Delete.
B. The Performance Scan (/optimize)
- Big O: Nested loops? -> Map/Set.
- Allocations: Heavy lists? -> Generators.
- Database: N+1 queries? -> Batch.
C. Execution Strategy
- Refactor: Extract Method, Guard Clauses, Add Type Hints.
- Polish: Sort imports, formatting.
- Rule: Never change functionality without tests.
3. Routing
-
To
engineering-collab: Architectural flaws. -
To
bug-chaser: Bugs discovered during cleanup.
4. Fallback Patterns
- If file missing, return error.
- Use default Context if routing ambiguous.
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-01-26
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!