code-simplification

Solid

Refactor code to reduce complexity and duplication without changing behavior.

AI & Automation 125 stars 11 forks Updated today MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
70
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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. - ...

Details

Author
HybridAIOne
Repository
HybridAIOne/hybridclaw
Created
5 months ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category