← ClaudeAtlas

code-simplificationlisted

Refactor code to reduce complexity and duplication without changing behavior.
HybridAIOne/hybridclaw · ★ 109 · AI & Automation · score 82
Install: claude install-skill HybridAIOne/hybridclaw
# Code Simplification Use this skill for deeper code simplification work while preserving current behavior. This is intentionally narrower than a generic "simplify" skill: it is for behavior-preserving refactors in a live codebase, with explicit attention to tests, surrounding types, and incremental validation. ## Default Workflow 1. Identify the exact behavior that must stay the same. 2. Read the surrounding code, types, and tests before editing. 3. Establish a baseline with the smallest relevant checks. 4. Simplify in small reversible steps. 5. Re-run validation after each meaningful change. 6. Stop when the code is materially clearer, not when it is merely different. ## What to Simplify Prioritize complexity that makes defects more likely: - deep nesting that can become guard clauses - duplicated logic that can become one local helper - conditionals split across too many locations - wrappers or abstractions with no real caller benefit - long functions that can be split by responsibility - state transitions that are hard to follow or partially duplicated Prefer deleting code over adding a new abstraction when both solve the problem. ## Working Rules - Preserve behavior first; simplification is not a license for feature changes. - Keep refactors small enough that failures are easy to localize. - Use existing project patterns instead of inventing a new style. - Avoid introducing generic helpers until there are at least a few stable call sites that justify them. -