refactoring-patterns
Refactoring Patterns Skill
Safe transformations — same behavior, better structure.
Golden Rule
Tests pass before AND after. Never refactor and add features in the same commit.
When to Refactor
| Trigger | Action |
|---|---|
| Feature is hard to add | Refactor first, then add feature |
| Same bug twice | Refactor to prevent recurrence |
| "I don't understand" | Refactor for clarity |
| Duplicate code | Extract and reuse |
| Long function (>30 lines) | Extract logical units |
More from fabioc-aloha/alex_skill_mall
refactor
Systematic code refactoring to improve maintainability without changing behavior. Use when asked to "refactor this", "clean up this code", "improve code quality", "simplify this", "reduce complexity", or "eliminate code smells". Always preserves existing behavior.
1socratic-questioning
Help users discover answers, don't just deliver them.
1graphic-design
Patterns for visual design, SVG creation, layout composition, typography, and brand identity.
1deep-review
Adversarial code review with three parallel perspectives — Advocate, Skeptic, Architect — that create productive tension. Use for high-stakes PRs, architectural changes, or when single-pass review would miss issues. Surfaces findings through disagreement, not consensus.
1data-preparation
Data cleaning, profiling, transformation, and quality gates -- prepares raw data for visualization and analysis
1dashboard-design
Dashboard layout patterns, KPI card design, filter architecture, narrative flow through panels, and self-contained HTML generation
1