本文へ移動
cccskills
無料GitHub で公開

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.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md2.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

<!-- 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:

  • 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.
  • Location — check components/ui/, ui/, primitives/, src/components/ before creating a new directory. Reuse.
  • Tokens — respect existing CSS variable naming (--color-*, --space-*, --font-*, --radius-*). Don't introduce a parallel system.

Step 3 — Anti-Slop Test on every new component (from SKILL.md):

  • Component name must be domain-specific, not generic. MetricCard / PricingTier / InviteRow beats Card / Box / Item.
  • If the component is generic ("a card with a title and description"), ask yourself whether it should instead be an inline composition — premature abstraction is worse than repetition.

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:

  1. The new component file(s) + any token additions.
  2. A table showing every call-site update:
FileBeforeAfter
  1. A one-line delta: "Extracted N components, M tokens. Call-sites updated: X."

Next step: /tokens — lift the values you just centralized into the token spine (rung 2).

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

adapt

無料

Responsive layout pass covering breakpoints, touch targets, safe areas, and fluid type. Use when the UI has layout or touch issues on mobile/tablet, when adding a new screen that hasn't been tested across viewports, or when the user says "make it responsive" / "fix mobile layout". Invoke when the user asks for adapt on their UI, or mentions 'adapt' alongside design / UI / frontend work.

日本語の概要は準備中です。原文の説明を表示しています。

educlopez/ui-craft3782026年9月3日 更新

animate

無料

Motion design pass — adds purposeful animations or removes excessive ones, respecting MOTION_INTENSITY and the project's animation stack. Use when the user asks to add animation, "make it feel smoother", fix janky transitions, or trim motion that's distracting. Invoke when the user asks for animate on their UI, or mentions 'animate' alongside design / UI / frontend work.

日本語の概要は準備中です。原文の説明を表示しています。

educlopez/ui-craft3782026年9月3日 更新

audit

無料

Technical UI audit — a11y, performance, responsive. Produces a prioritized findings table. Invoke when the user asks for audit on their UI, or mentions 'audit' alongside design / UI / frontend work.

日本語の概要は準備中です。原文の説明を表示しています。

educlopez/ui-craft3782026年9月3日 更新

bolder

無料

Amplify personality — raises layout variance and motion, strengthens typography and one signature detail, without slop. Use when the UI works but feels safe, flat, or "template-y", or when the user says "bolder", "more personality", "more creative", or "make it pop" (still professional). Invoke when the user asks for bolder on their UI, or mentions 'bolder' alongside design / UI / frontend work.

日本語の概要は準備中です。原文の説明を表示しています。

educlopez/ui-craft3782026年9月3日 更新

brief

無料

Write or update the project's durable design brief at .ui-craft/brief.md. Invoke when the user asks for brief on their UI, or mentions 'brief' alongside design / UI / frontend work.

日本語の概要は準備中です。原文の説明を表示しています。

educlopez/ui-craft3782026年9月3日 更新

clarify

無料

UX copy review across buttons, errors, empty states, and form hints — critiques by default, applies only on request. Use when copy feels vague, generic, or AI-sounding, or when the user says "fix the labels", "improve error messages", or "review the copy". Invoke when the user asks for clarify on their UI, or mentions 'clarify' alongside design / UI / frontend work.

日本語の概要は準備中です。原文の説明を表示しています。

educlopez/ui-craft3782026年9月3日 更新

educlopez のスキルをすべて見る

このスキルの問題を報告する