← ClaudeAtlas

code-design-refactorlisted

Design-level refactoring rules — extraction, decoupling, SRP, encapsulation, primitive obsession. Language-agnostic. Sits between logic-cleaner (expression-level) and improve-codebase-architecture (system-level). Use when restructuring existing code at the module/class/function level.
ralvarezdev/ralvaskills · ★ 2 · Code & Development · score 73
Install: claude install-skill ralvarezdev/ralvaskills
# Code Design Refactor The **design-level** rung of the refactoring ladder. Tighter scope than [improve-codebase-architecture](../improve-codebase-architecture/SKILL.md) (which surveys friction across the whole codebase), broader than [logic-cleaner](../logic-cleaner/SKILL.md) (which polishes inside a function). When a class is doing too much, when a function takes a tuple of primitives that ought to be a value object, when two modules know too much about each other — that's this skill's job. ## 1. Scope boundary | Skill | Operates on | Asks | |---|---|---| | [logic-cleaner](../logic-cleaner/SKILL.md) | Expressions, single function bodies | "Is this branch readable? Is this conditional negated?" | | **`code-design-refactor`** | Functions, classes, modules within one package | "Does this thing have one reason to change? Is the seam in the right place?" | | [improve-codebase-architecture](../improve-codebase-architecture/SKILL.md) | The whole codebase, multiple modules, deep architectural drift | "Where are the shallow modules across the project? Where's the friction?" | If a finding requires renaming a primitive boolean variable, use `logic-cleaner`. If it requires moving responsibilities between modules across the codebase, use `improve-codebase-architecture`. This skill handles the middle. ## 2. When to invoke - User asks to "clean up", "tidy", "refactor", "restructure" a specific function / class / module. - A code review surfaces a too-big function or a class doing t