code-simplifier
SKILL.md
Community Code Simplification Best Practices
Comprehensive code simplification guide for AI agents and LLMs. Contains 45 rules across 8 categories, prioritized by impact from critical (context discovery, behavior preservation) to incremental (language idioms). Each rule includes detailed explanations, real-world examples comparing incorrect vs. correct implementations, and specific impact metrics.
Core Principles
- Context First: Understand project conventions before making any changes
- Behavior Preservation: Change how code is written, never what it does
- Scope Discipline: Focus on recently modified code, keep diffs small
- Clarity Over Brevity: Explicit, readable code beats clever one-liners
When to Apply
Reference these guidelines when:
- Simplifying or cleaning up recently modified code
- Reducing nesting, complexity, or duplication
- Improving naming and readability
- Applying language-specific idiomatic patterns
- Reviewing code for maintainability issues