educlopez/ui-craft-gemini-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" / "tokenize styles". Invoke when the user asks for extract on their UI, or mentions 'extract' alongside design / UI / frontend work.
This is a copy. The original lives at educlopez/extract.
npx skills add https://github.com/educlopez/ui-craft --skill extract
<!-- 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 $ARGUMENTS. Load the ui-craft skill.
Step 1 — Scan the target for extraction candidates:
cva/tv variant if the project uses one — check first).theme.extend.Step 2 — Match the project's conventions, don't impose new ones:
components/ui/, ui/, primitives/, src/components/ before creating a new directory. Reuse.--color-*, --space-*, --font-*, --radius-*). Don't introduce a parallel system.Step 3 — Anti-Slop Test on every new component (from SKILL.md):
MetricCard / PricingTier / InviteRow beats Card / Box / Item.Step 4 — Update every call-site. No half-migrations.
Knob-agnostic — DRY is not tunable.
References to read: references/layout.md (composition patterns), references/typography.md and references/color.md (token naming), plus the project's existing component library (scan before writing).
Output:
| File | Before | After |
| --- | --- | --- |
Next step: /tokens — lift the values you just centralized into the token spine (rung 2).
Take educlopez/ui-craft-gemini-extract from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.