Skip to content
UI Craft / docs

Skill anatomy

How UI Craft is structured — the main skill, its 20 domain references, the 15 slash commands, and the 3 style variants.

Updated 2026-04-18

UI Craft is not one long file. It is a slim entry point plus a routing table pointing to depth references — so agents only load the knowledge they need for the current task.

Three layers

  1. Main skillskills/ui-craft/SKILL.md. ~13 KB. Knobs, Discovery phase, anti-slop rules, the routing table, and the few always-needed rules.
  2. Referencesskills/ui-craft/references/*.md. 20 domain files. Loaded on demand based on intent.
  3. Commandscommands/*.md. 15 focused passes that apply a single lens from the skill.

Plus 3 sibling variants — pre-committed styles that lock the knobs. See Style variants. Playful and brutalist ship as style presets under examples/presets/, not full siblings.

The main skill

SKILL.md is deliberately small. It was slimmed from 35 KB to 13.6 KB in v0.5.0 via progressive disclosure. Always-needed rules stay in SKILL.md. Depth lives in references. The file contains:

  • Knobs block (CRAFT_LEVEL, MOTION_INTENSITY, VISUAL_DENSITY)
  • Discovery phase (4 questions)
  • Anti-slop list (the checklist applied to every UI)
  • Routing table (intent → reference file)
  • Four modes: Build, Animate, Review, Polish

Read on GitHub →

The 20 domains

Each domain is one file. Agents load them based on intent.

DomainFileCovers
Motionmotion.mdDecision ladder, duration + easing token scales, interaction rules, choreography, motion budget, reduced-motion contract
Layoutlayout.mdSpacing systems, optical alignment, layered shadows, visual hierarchy
Typographytypography.mdtext-wrap: balance, tabular-nums, font scale, curly quotes
Colorcolor.mdOKLCH, design tokens, dark mode, APCA contrast
Accessibilityaccessibility.mdWAI-ARIA, keyboard nav, focus management, touch targets
Performanceperformance.mdCompositor-only animations, FLIP, will-change, CLS prevention
Modern CSSmodern-css.mdView Transitions, Anchor Positioning, Popover, <dialog>, interpolate-size, color-mix(), scroll-driven, container queries
Responsiveresponsive.mdFluid sizing, mobile-first, touch zones, safe areas
Soundsound.mdWeb Audio API, feedback sounds, appropriateness matrix
UX Copycopy.mdVoice / tone matrix, reading level, terminology, locale-aware strings, inclusive language, error / empty / CTA tactics
UI Reviewreview.mdSystematic critique methodology, anti-slop detection, Polish Pass
Dashboarddashboard.mdSignal-to-noise hierarchy (hero / supporting / context / deep-dive), sidebar, metric cards, data tables
Inspirationinspiration.mdReal patterns from dub.co, cursor, linear, vercel, stripe
Stackstack.mdMotion, GSAP, Three.js — decision tree, patterns, perf gotchas, anti-patterns (opt-in)
Heuristicsheuristics.mdNielsen’s 10 + Fitts / Hick / Doherty / Cleveland-McGill / Miller / Tesler with 1–5 scoring rubric and impact framing
Personaspersonas.md5 archetypes (first-timer, power user, low-bandwidth, screen-reader, one-thumb) with walkthrough checklists
State designstate-design.mdIdle / loading / empty / error / partial / conflict / offline — design the unhappy path first
Data vizdataviz.mdCleveland-McGill perceptual hierarchy, chart selection matrix, ColorBrewer + Okabe-Ito palettes, direct labeling, Tufte
AI / chat surfacesai-chat.mdStreaming contract, 7-state model, tool traces, citations, feedback affordances, generative UI, conversation layout
Formsforms.mdValidation timing, progressive disclosure, multi-step wizards, autosave, optimistic submit, field-specific patterns

Stack is opt-in

stack.md is the only reference that is not loaded by default. It only loads when:

  • MOTION_INTENSITY ≥ 8, and
  • The user opted into Motion / GSAP / Three.js during Discovery

This is deliberate. The file is large. Loading it for a static button animation would be noise.

The routing table

SKILL.md contains a routing table that maps user intent to reference files. Agents match the intent and load only the relevant files. Examples:

User intentLoads
”Build a pricing page”layout.md, typography.md, color.md, responsive.md, copy.md
”Audit this component”accessibility.md, performance.md, responsive.md, review.md
”Animate this modal”motion.md, performance.md, accessibility.md
”Build a dashboard”layout.md, dashboard.md, typography.md, responsive.md, state-design.md
”Polish this page”review.md, typography.md, layout.md, motion.md

Agents never load all 20 references at once. That defeats the point of progressive disclosure.

The 15 commands

Focused passes. Each command loads a single lens. See Commands for the full reference. They are grouped by intent:

  • Review & shipheuristic, audit, critique, polish, harden, unhappy
  • Plan & transformshape, animate, adapt, typeset, colorize, clarify, extract
  • Taste dialdistill, delight

Only Claude Code understands slash commands natively. In other harnesses they are materialized as peer sub-skills with their own name + description frontmatter. Same content, different invocation surface.

Harness mirrors

Source of truth: skills/ui-craft/ + commands/. Never edit .codex/, .cursor/, .gemini/, .opencode/, or .agents/ directly.

The mirrors are generated by scripts/sync-harnesses.mjs and committed to the repo so npx skills add installs the right tree for each harness. CI re-runs the sync on every push to main.

node scripts/sync-harnesses.mjs
# or
npm run sync

More in the README →

File layout

ui-craft/
  skills/
    ui-craft/
      SKILL.md                     # slim entry point (~13 KB)
      references/                  # 20 domain files
        accessibility.md
        ai-chat.md
        color.md
        copy.md                    # voice/tone + microcopy (unified)
        dashboard.md
        dataviz.md
        forms.md
        heuristics.md
        inspiration.md
        layout.md
        modern-css.md
        motion.md                  # unified motion reference
        performance.md
        personas.md
        responsive.md
        review.md
        sound.md
        stack.md
        state-design.md
        typography.md
    ui-craft-minimal/SKILL.md
    ui-craft-editorial/SKILL.md
    ui-craft-dense-dashboard/SKILL.md
  commands/                        # 15 source-of-truth slash commands
  examples/
    animation-storyboard.md        # multi-stage animation pattern
    presets/
      playful.md                   # Clay / Gumroad / Duolingo / Arc preset
      brutalist.md                 # Swiss print / Nothing / terminal preset
  scripts/
    detect.mjs                     # anti-slop detector
    sync-harnesses.mjs             # mirror generator
    validate.mjs                   # manifest + frontmatter validator

Spotted something out of date? Open an issue on GitHub →