componentize
Installation
SKILL.md
Componentize
Use this skill to interrogate a codebase for reuse opportunities before writing new UI. The goal is to reduce duplication, establish canonical shared components, and make app code consume those components through props, slots, composition, and clear package boundaries. Do not centralize the whole UI unless the user explicitly asks for a design-system project.
Start
When invoked:
- State that you are using the
componentizeskill. - Identify the repo shape before editing:
- package manager and workspace config
- apps and packages
- whether
turbo.jsonexists - whether a shared UI package already exists, commonly
packages/ui,packages/design-system,packages/components, orlibs/ui - UI framework, styling system, icon library, test setup, Storybook or examples
- If the user refers to a visible target by location, appearance, or interaction, resolve that target before searching broadly.
- Search before creating anything. Use
rg,rg --files, and import relationships to find existing components, repeated markup, repeated Tailwind class strings, copied form controls, duplicated shells, and variant drift. - If the user asks for implementation, first state the extraction target, canonical home, public API, call sites to migrate, and validation plan. Then edit narrowly and validate. If the user asks for analysis, return an audit with prioritized extraction candidates.