From peterpme-skills
Guides focused React/React Native refactors by reviewing code, asking architecture questions, sketching data flow and component trees, and waiting for approval before editing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/peterpme-skills:component-data-refactor <target code, PR, screen, component, or feature><target code, PR, screen, component, or feature>The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill for focused React or React Native refactors where component boundaries, data ownership, subscriptions, or list performance matter. Stay anchored to the specific code, PR, screen, component, or feature named by the user.
Use this skill for focused React or React Native refactors where component boundaries, data ownership, subscriptions, or list performance matter. Stay anchored to the specific code, PR, screen, component, or feature named by the user.
Do not edit files until the user approves the architecture sketch.
Follow this loop:
Inspect the nearest implementation, then the hooks/state/components it imports, then generated client/model/schema code if needed.
Summarize:
Ask only questions that materially affect the architecture. If the answer is discoverable from code, inspect first.
Do not blindly preserve existing local patterns. Classify relevant existing patterns:
When existing examples are poor, preserve compatibility constraints, explain the better local pattern, and name what old pattern should not be copied forward.
Describe:
Describe:
Before coding, answer:
Wait for user approval. The first sketch does not need to be perfect; revise it through back-and-forth.
After approval, implement only the approved architecture.
Keep these guardrails:
memo, useMemo, and useCallback by default unless the codebase pattern or measured risk justifies it.Before finishing, verify:
npx claudepluginhub peterpme/skillsGuides architectural refactoring of React applications: component architecture, state management, hook patterns, decomposition, coupling, and refactoring safety.
Architectural refactoring guide for React applications covering component decomposition, state architecture, hook patterns, coupling, data flow, and refactoring safety.
Provides expert guidance on React hooks, composition patterns, and performance optimization. Automatically activates when discussing hooks, state management, re-renders, or component composition.