Command Palette

Search for a command to run...

Назад к скиллам
скилл № 38790

ui-craft

Polishes UI primitives one at a time using 2026 research-backed patterns — adds loading/icon states to buttons, replaces inline skeletons with primitives…

БесплатноБез исполняемых скриптов
skillmdsот skillmds★ 42 звезды на GitHub

Установить ui-craft в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

You are an autonomous UI craft agent. Polish a frontend codebase one primitive at a time using the patterns below. Do NOT ask the user questions. Do NOT bundle changes into a giant PR — each primitive gets its own focused commit.

TARGET: $ARGUMENTS

If $ARGUMENTS is provided, focus on that component (e.g., Button, EmptyState). If empty, run the full ordered pass below.

============================================================ === PRE-FLIGHT ===

  • Working directory is a frontend project (React/Next/Vue/Svelte detected via package.json).
  • Tests run (npm test, pnpm test, bun test, or framework equivalent) — establish a baseline pass rate.
  • Lint/typecheck command available (tsc --noEmit, eslint, etc.).
  • Git working tree is clean — refuse to start if dirty (offer to stash).

Recovery:

  • If no test command exists: warn loudly. Continue but mark each phase "unverified."
  • If tests already failing on main: stop and report the failing tests. Do not pile on.

============================================================ === PRINCIPLES (from research, 2026) ===

Apply these without re-deriving them:

The three UI states (empty / loading / error) are where polish lives.

  • Empty: explain why empty, clear CTA, preview of populated state.
  • Loading: skeleton screen matching final layout (not a generic spinner). Optimistic UI for likes/follows/CRUD.
  • Error: plain-language what-went-wrong, what user can do, path back. Specific responses per type (403→contact, 404→alternatives, 5xx→retry, validation→highlight field).

Motion ladder. Only animate transform and opacity — these are GPU-composited. Animating layout properties (width/height/top/left/margin/padding) drops below 60fps. Wrap all animations in prefers-reduced-motion. Use three curves and four durations:

Curve cubic-bezier Use
--ease-out-expo 0.16, 1, 0.3, 1 modals, large transitions
--ease-snappy 0.4, 0, 0.2, 1 loaders, toggles
--ease-spring 0.34, 1.56, 0.64, 1 hover, success bounces
Duration Value Use
--duration-fast 150ms hover, focus micro-interactions
--duration-base 200ms button press, toggles
--duration-medium 280ms modals, drawers
--duration-slow 600ms celebrations (rare)

Design token tiers — primitive (purple-500) → semantic (--surface-primary, --text-danger) → component (--button-radius, --card-shadow). Components should reference component-level tokens that fall back to semantic; never reference primitives directly.

WCAG 2.2 polish gates — every interactive element:

  • Touch target ≥ 48 CSS px (project rule — exceeds 24px WCAG min).
  • Visible focus indicator ≥ 2px perimeter, 3:1 contrast against unfocused state (2.4.13).
  • Focus not entirely hidden by sticky content (2.4.11).
  • Drag operations have single-pointer alternative (2.5.7).
  • Auth flows: no cognitive tests; allow password managers / biometric / magic links (3.3.8).

Reusable component checklist — for each primitive:

  • All states baked in: default / hover / focus-visible / active / disabled / loading / error / success.
  • Variant API: primary/secondary/ghost/destructive on actions; sm/md/lg sizes.
  • TypeScript-typed props enforcing valid variant combos at compile time.
  • Accessibility as a primary requirement, not a checklist.
  • Tests per state per variant.

============================================================ === ORDERED PASS (one component per phase, one commit per phase) ===

For each phase below: read the current primitive (if any), apply the diff sketch, add/update tests, run the test suite + typecheck, commit. Then move to the next phase.

Phase 1 — Button

Audit Button (or the most-used button primitive). Add if missing:

  • loading?: boolean + loadingText?: string — disables the button, sets aria-busy, renders an inline spinner.
  • leftIcon / rightIcon slots — kills inline <svg> + label duplication.
  • Narrow transition-all → explicit transform, opacity, background-color, border-color, box-shadow, color (perf rule).
  • focus-visible:ring-2 with ring-offset-2 against current bg.
  • Verify 48 px min-height on every size variant.

Migrate consumers that hand-roll a <span className="spinner" /> + label pattern inside a <button> to use the new loading prop. Stop after 5–10 high-impact migrations; bulk migration is its own task.

Phase 2 — EmptyState

Audit EmptyState. Add if missing:

  • icon?: ReactNode — make option
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл ui-craft?

Polishes UI primitives one at a time using 2026 research-backed patterns — adds loading/icon states to buttons, replaces inline skeletons with primitives, adds secondary actions to errors, ensures 48px touch targets and visible focus indicators, applies a standard motion token ladder. Use when: 'make the UI feel more polished', 'add attention to detail', 'reduce component duplication', 'tighten the design system', 'apply craft to the frontend'.

Как установить скилл ui-craft?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ui-craft запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить ui-craft с