This tool helps you clean up messy React components. It focuses on components that are too big or complex. You can use it to make your code easier to read and maintain.
The tool checks two main things: a complexity score and the number of lines. If the score is above 50 or the file has more than 300 lines, it is time to refactor. You can run commands to see these numbers.
Two common ways to refactor are extracting custom hooks and splitting into smaller components. These patterns keep your code simple and organized. The guide shows real examples from the Dify frontend.
Global
mkdir -p ~/.claude/skills/component-refactoringProject
mkdir -p .claude/skills/component-refactoringSource Repository
Frontend Designanthropics/skills
Create striking frontend interfaces with bold design and polished code every time
Vercel React Best Practicesvercel-labs/agent-skills
Optimize React and Next.js apps using proven Vercel performance guidelines
Design Taste Frontendleonxlnx/taste-skill
Enforce premium frontend design with metric-based rules and smart component architecture
Vercel Composition Patternsvercel-labs/agent-skills
Clean React components with composition instead of boolean props
Shadcnshadcn/ui
Manage shadcn UI components easily with CLI commands and clear styling rules
Impeccablepbakaus/impeccable
Polish your frontend interfaces with expert design critique and code
Minimalist Uileonxlnx/taste-skill
Build warm minimal web interfaces with editorial typography and flat bento grids
Industrial Brutalist Uileonxlnx/taste-skill
Raw mechanical UIs fusing Swiss print with military terminal aesthetics and high data density