/extract
Refactoring pass — extracts repeated Tailwind class combos and markup into components, and lifts magic values into design tokens. Use when the codebase has obvious duplication, hardcoded hex values or pixel sizes, or when the user says "clean this up" / "extract components" /
One skill from ui-craft.
shell
$ npx -y skills add educlopez/ui-craft --skill extract --agent claude-codeInstalls just this skill. Get the whole plugin for auto-invocation.
How it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/extract
Context preview
The summary Claude sees to decide when to auto-load this skill.
Refactoring pass — extracts repeated Tailwind class combos and markup into components, and lifts magic values into design tokens. Use when the codebase has obvious duplication, hardcoded hex values or pixel sizes, or when the user says "clean this up" / "extract components" /
Stats
Stars208
Forks9
LanguageGo
LicenseMIT
Ships with ui-craft
SKILL.md
extract.SKILL.md
--- name: extract description: "Refactoring pass — extracts repeated Tailwind class combos and markup into components, and lifts magic values into design tokens. Use when the codebase has obvious duplication, hardcoded hex values or pixel sizes, or when the user says "clean this up" / "extract components" / "tokenize styles". Invoke when the user asks for extract on their UI, or mentions 'extract' alongside design / UI / frontend work." --- <!-- HARNESS MIRROR — do not edit here. Canonical source: skills/ or commands/. After editing source, copy into cli/assets/<harness>/ and repo-root harness mirrors. --> **Context:** this sub-skill is one lens of the broader `ui-craft` skill. If the `ui-craft` skill is also installed, read its SKILL.md first for Discovery + Anti-Slop + Craft Test, then apply the specific lens below. Extract reusable pieces from the target the user described. Load the `ui-craft` skill. **Step 1 — Scan the target for extraction candidates:** - **Repeated Tailwind class combos** — any class string that appears ≥3 times becomes a component (or a `cva`/`tv` variant if the project uses one — check first). - **Magic values** — hex colors, pixel sizes, shadow definitions, font sizes, z-index values appearing in literal form. Lift into CSS variables or `theme.extend`. - **Repeated markup** — blocks that differ only by text/props collapse into a single component with props. **Step 2 — Match the project's conventions, don't impose new ones:** - **Naming** — look at neighboring components. PascalCase file? kebab-case file? Named export vs default export? Match exactly.
