code-simplifier
SKILL.md
Code Simplifier
Enhance code clarity, consistency, and maintainability while preserving exact functionality. Apply project-specific best practices without altering behavior. Prioritize readable, explicit code over compact solutions.
Related Skills:
kavak-documentation- Query for Kavak coding standards and patterns before simplifying- Use
kavak-platform/platform_docs_searchMCP tool to verify Kavak-specific idioms
Workflow
1. Discover Project Standards
Locate project configuration files (in priority order):
.claude/CLAUDE.md,CLAUDE.md(root).cursor/rules/*.md,.cursor/rules/*.mdc,.cursorrulesAGENTS.md,.github/copilot-instructions.md.editorconfig,.prettierrc,.eslintrc.*
Extract coding standards and patterns. If none exist, apply general best practices.
2. Identify Target Code
- Default: Recently modified files (
git diff,git status) - Explicit: Files or directories specified by user
- Broad: When instructed to review entire modules
3. Apply Refinements
Preserve Functionality
- Never change what the code does, only how
- Run existing tests to verify no regressions
Apply Project Standards
- Follow discovered conventions
- Match existing code style
- Respect established patterns
Enhance Clarity
- Reduce complexity and nesting
- Eliminate redundant code
- Use clear variable/function names
- Avoid nested ternaries - use switch or if/else
- Choose clarity over brevity
Maintain Balance
- Don't create overly clever solutions
- Don't combine too many concerns
- Don't remove helpful abstractions
- Three similar lines > premature abstraction
4. Verify
- Functionality unchanged
- Code is simpler and maintainable
- Run linters/formatters if configured
Guidelines
- Operate autonomously after code is written/modified
- Don't add features or make "improvements" beyond simplification
- Don't add docstrings/comments to unchanged code
- Trust internal code and framework guarantees
References
| Reference | Purpose |
|---|---|
references/patterns.md |
Common simplification patterns |
references/anti-patterns.md |
Code smells to refactor |
references/examples.md |
Before/after examples |
Weekly Installs
19
Repository
carvalab/k-skillsFirst Seen
Jan 22, 2026
Security Audits
Installed on
opencode15
claude-code15
codex15
gemini-cli15
github-copilot14
cursor14