From shipshitdev-library
Architectural refactoring guide for React applications covering component decomposition, state architecture, hook patterns, coupling, data flow, and refactoring safety.
How this skill is triggered — by the user, by Claude, or both
Slash command
/shipshitdev-library:react-refactorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
40 rules across 7 categories for React refactoring, prioritized by impact from critical (component and state architecture) to incremental (refactoring safety).
AGENTS.mdREADME.mdassets/templates/_template.mdplugin.jsonreferences/_sections.mdreferences/arch-composition-over-props.mdreferences/arch-compound-components.mdreferences/arch-container-presentational.mdreferences/arch-feature-colocation.mdreferences/arch-headless-pattern.mdreferences/arch-interface-segregation.mdreferences/arch-push-client-low.mdreferences/arch-render-props-to-hooks.mdreferences/couple-barrel-free-features.mdreferences/couple-break-circular-deps.mdreferences/couple-dependency-injection.mdreferences/couple-stable-imports.mdreferences/data-context-module-pattern.mdreferences/data-granular-error-boundaries.mdreferences/data-server-first-fetch.md40 rules across 7 categories for React refactoring, prioritized by impact from critical (component and state architecture) to incremental (refactoring safety).
| Category | Impact | Rules | Key Topics |
|---|---|---|---|
| Component Architecture | CRITICAL | 8 | Compound components, headless pattern, composition over props, client boundaries |
| State Architecture | CRITICAL | 7 | Colocation, state machines, URL state, derived values |
| Hook Patterns | HIGH | 6 | Single responsibility, naming, dependency stability, composition |
| Component Decomposition | HIGH | 6 | Scroll test, extraction by change reason, view/logic separation |
| Coupling & Cohesion | MEDIUM | 4 | Dependency injection, circular deps, stable imports, barrel-free |
| Data & Side Effects | MEDIUM | 4 | Server-first fetch, TanStack Query, error boundaries |
| Refactoring Safety | LOW-MEDIUM | 5 | Characterization tests, behavior testing, integration tests |
Critical patterns — get these right first:
Common mistakes — avoid these anti-patterns:
react-hook-form skillnpx claudepluginhub shipshitdev/skills --plugin worktreeGuides architectural refactoring of React applications: component architecture, state management, hook patterns, decomposition, coupling, and refactoring safety.
Guides React component design, hooks, composition, state management, performance optimization, and error handling with TypeScript.
Guides focused React/React Native refactors by reviewing code, asking architecture questions, sketching data flow and component trees, and waiting for approval before editing.