/rune:designfrom rune
Generates a .rune/design-system.md design contract from product descriptions, mapping domain to platform-specific style, palette, typography, and anti-patterns. Prevents generic AI UI defaults.
Ships in rune. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Design system reasoning layer. Converts a product description into a concrete design system — style, color direction, typography pairing, platform conventions, and an explicit anti-pattern list for this domain. Writes .rune/design-system.md as the persistent design contract that all UI-generating skills read before producing code. Prevents AI-generated UI from defaulting to generic patterns ("purple accent, card grids, centered everything") that signal "not designed by a human."
/rune design — manual invocation when starting a new UI projectcook (L1): frontend task detected, no .rune/design-system.md existsreview (L2): AI anti-pattern detected — recommended to run design skillperf (L2): Lighthouse Accessibility BLOCK — design foundation may be missingscout (L2): detect existing design tokens, component library, platform targetsasset-creator (L3): generate base visual assets (logo, OG image) from design systembrowser-pilot (L3): render the surface and inspect it before claiming any visual property holds (Step 5.4)review (L2): accessibility violations found → flag for fix in next code reviewcook (L1): before any frontend code generationscaffold (L1): design system for new projectbrainstorm (L2): when selected approach has UI/UX implicationsba (L2): when requirements include UI/UX componentsreview (L2): when AI anti-pattern detected in diffperf (L2): when Lighthouse Accessibility score blocks/rune design direct invocation.rune/
└── design-system.md # Design contract for all UI-generating skills
Load the design knowledge base before reasoning:
~/.claude/docs/design-dna.md
Read it. This is the primary reference (user's curated taste).Read the baseline: skills/design/DESIGN-REFERENCE.md (shipped with Rune)Read skills/design/MOTION-CRAFT.md. It is the canonical motion authority: the should-it-animate frequency gate, easing/duration budgets (including peak-slope curve selection for large travel, and velocity continuity across keyframe joins), physicality (never scale(0), origin-aware popovers), spring physics, gesture handoff, motion performance, the role→strategy reduced-motion framework, SVG-specific mechanics (user units, pathLength, SVGO), and a reverse-lookup vocabulary. Cite its exact values in the design-system motion section; never approximate curves or durations. When MOTION-CRAFT.md and DESIGN-REFERENCE.md disagree on a motion detail (easing, duration, interaction timing), MOTION-CRAFT.md wins — it is the deeper, motion-specific source; DESIGN-REFERENCE.md's Animation Timing / Interaction Patterns tables are the general baseline.Advisory motion-audit mode: When asked to "improve the animations" / "make this feel better" / "what could be animated here", operate read-only — survey the motion surface against MOTION-CRAFT.md, report frequency-gated findings (and deliberately rejected candidates), and hand precise recipes to
cook/fix. Suggesting motion everywhere is worse than useless; expect to reject most candidates.
Why two layers: The baseline ships "good enough" universal design knowledge. Users who care about aesthetics create their own
design-dna.mdwith curated palettes, font pairings, and style preferences. The design skill works well with either — it just works better with a curated reference.
Design intelligence data from UI/UX Pro Max (MIT, 42.8k★).
Located at references/ui-pro-max-data/ — 161 palettes, 84 styles, 73 font pairings, 161 reasoning rules, 99 UX guidelines.
When references/ui-pro-max-data/ is available:
styles.csv for domain-matched visual styles (expands from 10 → 84)ui-reasoning.csv for industry-specific design rules (161 rules)colors.csv for palette alternatives (expands from 10 → 161)Invoke scout to detect:
web | ios (SwiftUI) | android (Compose) | react-native | multi-platformtokens.json, design-system/, theme.ts, tailwind.config.*, variables.cssIf .rune/design-system.md already exists: Read it, check Last Updated date. If < 30 days old, ask user whether to refresh or keep. Do NOT silently overwrite.
From the user's task description + codebase context, classify product type:
| Category | Examples |
|---|---|
| Trading/Fintech | trading dashboard, portfolio tracker, payment app, crypto wallet |
| SaaS Dashboard | admin panel, analytics, CRM, project management |
| Landing/Marketing | landing page, product site, marketing page, waitlist |
| Healthcare | patient portal, medical dashboard, health tracker |
| E-commerce | product catalog, cart, checkout, marketplace |
| Developer Tools | IDE plugin, CLI dashboard, API explorer, devtool |
| Creative/Portfolio | portfolio, design showcase, art gallery, agency site |
| Social/Community | social feed, forum, messaging, community platform |
| Mobile Consumer | iOS/Android consumer app — entertainment, productivity, lifestyle |
| AI-Native | AI assistant interface, chatbot, model explorer |
If domain is unclear: ask one clarifying question — "Is this closer to X or Y?"
After classifying domain, ask ONE question: "What should users feel when they use this?"
Accept a single mood keyword (or infer from context if obvious). Map mood to concrete design constraints:
| Mood | Color Temp | Typography Weight | Whitespace | Animation | Shadow |
|---|---|---|---|---|---|
| Impressed | Cool (blue-slate) | Heavy display (700-800) | Generous (xl-3xl) | Dramatic reveals (0.8-1.2s ease-out) | Deep, layered |
| Excited | Warm (amber-orange) | Bold contrasts (400 vs 800) | Tight-medium (sm-lg) | Energetic springs (0.4-0.6s spring) | Elevation lifts |
| Calm | Neutral-warm (stone-sage) | Light-medium (300-500) | Very generous (2xl-3xl) | Slow fades (0.6-0.8s ease-out-quad) | Soft, minimal |
| Confident | Cool-neutral (zinc-slate) | Medium-heavy (500-700) | Structured (md-xl) | Precise slides (0.3-0.5s ease) | Crisp, defined |
| Playful | Saturated (multi-hue) | Round + bold (600-700) | Medium, irregular (md-lg) | Bouncy springs (0.4-0.6s spring, overshoot) | Hard/comic (3-5px offset) |
| Techy | Cold (gray-cyan) | Mono-heavy, crisp (400-600) | Dense, grid-aligned (sm-md) | Sharp snaps (0.15-0.3s ease-out) | Minimal or glow |
| Professional | Muted neutrals | System fonts, readable (400-500) | Balanced (md-lg) | Subtle (0.2-0.3s ease) | Standard elevation |
| Inspired | Rich-warm (gold-terracotta) | Editorial display (300-700 range) | Asymmetric, generous | Scroll-driven reveals (0.5-0.8s) | Dramatic, directional |
Mapping rules:
.rune/design-system.md under ## Mood sectionanimation-patterns, palette-picker, type-system) read mood constraints from design-system.mdSkip if: User says "no preference" or "just follow domain defaults" — proceed to Step 3 with domain-only reasoning.
Picking from a 10-option style menu is how AI UI gets generic. Instead:
Why: Every menu option dilutes commitment. A single confident default gets committed, tweaked, and shipped. A menu gets deliberated, A/B'd, and abandoned. This is the Tweaks Default pattern from Anthropic's design system guidance — the AI commits first, humans steer second.
These rules apply regardless of domain, mood, or platform. Every generated design system MUST comply.
Enforcement: rune:review v1.1.0+ reads .rune/design-system.md § Scale Minimums and flags violations of Rules 1–3 below as MEDIUM/HIGH findings. Rules 4–6 (Measurable Constraints, No-Pure-No-Lorem, CJK-First) are design-time guidance — added in design v0.6.0, review enforcement forthcoming. Design defines, review enforces — this is the contract.
Full detail moved to
references/anti-ai-rules.md(progressive disclosure). Read that file before executing this section.
Full detail moved to
references/anti-ai-rules.md(progressive disclosure). Read that file before executing this section.
Full detail moved to
references/anti-ai-rules.md(progressive disclosure). Read that file before executing this section.
Full detail moved to
references/anti-ai-rules.md(progressive disclosure). Read that file before executing this section.
Full detail moved to
references/anti-ai-rules.md(progressive disclosure). Read that file before executing this section.
Full detail moved to
references/anti-ai-rules.md(progressive disclosure). Read that file before executing this section.
Full detail moved to
references/domain-rules.md(progressive disclosure). Read that file before executing this section.
Full detail moved to
references/platform-overrides.md(progressive disclosure). Read that file before executing this section.
Use Write to create .rune/design-system.md:
# Design System: [Project Name]
Last Updated: [YYYY-MM-DD]
Platform: [web | ios | android | multi-platform]
Domain: [product category]
Style: [chosen style]
## Color Tokens
### Primitive (raw values)
--color-[name]-[scale]: [hex]
### Semantic (meaning-mapped)
--bg-base: [value] — page background
--bg-surface: [value] — card/panel background
--bg-elevated: [value] — modal/dropdown background
--text-primary: [value] — primary text
--text-secondary: [value] — secondary/muted text
--border: [value] — default border
--accent: [value] — primary action/brand
--success: [value] — positive/profit signal
--danger: [value] — error/loss signal
--warning: [value] — caution signal
## Typography
| Role | Font | Weight | Size |
|------|------|--------|------|
| Display | [font] | [weight] | [px range] |
| H1 | [font] | [weight] | [px] |
| H2/H3 | [font] | [weight] | [px] |
| Body | [font] | [weight] | [px] |
| Mono/Numbers | [font] | [weight] | [px] |
Numbers rule: [monospace font] for ALL numeric values in this domain (prices, metrics, IDs)
## Spacing (8px base)
xs: 4px | sm: 8px | md: 16px | lg: 24px | xl: 32px | 2xl: 48px | 3xl: 64px
## Border Radius
sm: 6px | md: 8px | lg: 12px | xl: 16px | full: 9999px
## Effects
[signature effects for this style — gradients, shadows, blur, etc.]
## Anti-Patterns (MUST NOT generate these)
[domain-specific list from Step 3 + platform overrides]
- ❌ [anti-pattern 1] — [why it fails in this domain]
- ❌ [anti-pattern 2]
## Platform Notes
[platform-specific implementation requirements from Step 4]
## Component Library
[detected library or "custom"]
## Pre-Delivery Checklist
> Items marked 👁 describe what a human would SEE — tick them only from a render, or mark them ASSUMED (Step 5.4).
- [ ] 👁 Color contrast ≥ 4.5:1 for all text
- [ ] 👁 Focus-visible ring on ALL interactive elements (never outline-none alone)
- [ ] 👁 Touch targets ≥ 44×44px on mobile / ≥ 24×24px on desktop, with 8px gap between targets (matches Step 2.9 Rule 1)
- [ ] All icon-only buttons have aria-label
- [ ] All inputs have associated <label> or aria-label
- [ ] 👁 Empty state, error state, loading state for all async data
- [ ] cursor-pointer on all clickable non-button elements
- [ ] Every animation has a named role (communicative / decorative) and one of the four reduce strategies — bail, snap to end state, collapse, reduce complexity (MOTION-CRAFT §10)
- [ ] Motion preference is read live (`change` listener or library equivalent), not once at mount
- [ ] 👁 Reduce path exercised, not grepped — meaning survives with the preference on
- [ ] Dark mode support (or explicit reasoning why not)
- [ ] 👁 Responsive tested at 375px / 768px / 1024px / 1440px
- [ ] No pure #000 or #fff in semantic tokens (use oklch neutrals)
- [ ] No lorem ipsum / placeholder copy in shipped output (use real data or labelled `[ PLACEHOLDER: ... ]` blocks)
- [ ] If multi-language: CJK-capable font listed FIRST in stack (`"Noto Sans SC", "Inter", ...`)
A checklist item ticked from source is a prediction, not an observation. You emit markup and imagine the result, and the imagined render is always flattering — overflow, wrapping, contrast failure, misalignment and collision are invisible in source form. Every item in the checklist above that describes what a human would see is unverified until the surface is rendered and inspected, or the specific property is computed.
| Claim | What source-reading proves | What actually settles it |
|---|---|---|
| "Contrast ≥ 4.5:1" | The token values were chosen | Compute the ratio for the rendered pair — a token used on an unexpected background fails anyway |
| "Responsive at 375px" | Breakpoints exist | Render at 375px and look: wrapping, overflow, tap-target collision |
| "No overflow / clean alignment" | Nothing | Render — this class of failure has no textual signature |
| "Focus ring visible" | The CSS rule exists | Tab through it; a parent overflow:hidden or a later rule can eat it |
| "Empty / error / loading states work" | The branches exist | Render each one; the happy path is the only state most designs are ever seen in |
Advisory, not a gate. When the runtime grants a browser, browser-pilot is the strongest
check available and costs one call — take it, then report what was seen. When it does not,
say so: mark the visual items ASSUMED (not rendered) rather than ticking them. A checklist
of predictions labelled as observations is worse than a short one that is honest — see
completion-gate → references/claim-discipline.md.
Highest-yield renders, when budget allows only a few: narrowest breakpoint, longest realistic content string, empty state, dark mode.
UI-SPEC.md is a contract. Once written, changes require explicit user approval ("I want to change the card style"). Skills that generate UI (`cook`, `fix`, `scaffold`) MUST read UI-SPEC.md before producing components. Drift from spec = review finding.Full detail moved to
references/ui-spec.md(progressive disclosure). Read that file before executing this section.
Run a focused accessibility audit on the design system and any existing UI code. This step ensures the design contract doesn't produce inaccessible outputs.
Automated checks (use Grep on codebase):
outline-none, outline: none, focus:outline-none without a replacement focus-visible ring. Every instance is a violation.w-6 h-6, p-1 on interactive elements). Flag anything < 24x24px.<input without adjacent <label or aria-label. Search for icon-only buttons without aria-label.<div onClick, <span onClick (should be <button>). Flag missing <nav>, <main>, <header> landmarks.prefers-reduced-motion media query or Tailwind motion-reduce: variant. Where the guard is present, the check is not done — confirm the branch is reachable (no outer if (reduced) return before the end-state applicator) and that JS timelines (GSAP/Motion/Lenis) are gated too, since a CSS media query cannot stop them. Touches ≠ reachable ≠ correct.Output: Accessibility audit section in Design Report with pass/fail per check and specific file:line violations.
If violations found → add them to .rune/design-system.md Anti-Patterns section as concrete rules.
Full detail moved to
references/visual-audit.md(progressive disclosure). Read that file before executing this section.
Generate microcopy guidelines specific to this product domain. UX writing is part of design — not an afterthought.
Domain-specific microcopy rules:
| Domain | Tone | Error Pattern | CTA Pattern | Empty State |
|---|---|---|---|---|
| Trading/Fintech | Precise, neutral, no humor | "Order failed: insufficient margin ($X required)" | "Place Order", "Close Position" | "No open positions. Market opens in 2h 15m." |
| SaaS Dashboard | Professional, helpful | "Couldn't save changes. Try again or contact support." | "Get Started", "Upgrade Plan" | "No data yet. Connect your first integration." |
| E-commerce | Friendly, urgent-capable | "This item is no longer available. Here are similar items." | "Add to Cart", "Buy Now" | "Your cart is empty. Continue shopping?" |
| Healthcare | Calm, clinical, clear | "We couldn't verify your insurance. Please check your member ID." | "Schedule Visit", "View Results" | "No upcoming appointments." |
| Developer Tools | Direct, technical | "Build failed: missing dependency @types/node" | "Deploy", "Run Tests" | "No builds yet. Push to trigger CI." |
Generate for this project:
[What happened] + [Why] + [What to do next][What's missing] + [How to fill it][What will happen] + [Reversibility]Add UX writing guidelines to .rune/design-system.md under a new ## UX Writing section.
Emit design summary to calling skill:
## Design Report: [Project Name]
### Domain Classification
[product category] — [style chosen] — [platform]
### Design System Generated
.rune/design-system.md
### Key Decisions
- Accent: [color + reasoning — why this color for this domain]
- Typography: [pairing + reasoning]
- Style: [style name + why it fits this product]
### Anti-Patterns Registered (will be flagged by review)
- ❌ [n] domain-specific patterns
- ❌ [n] platform-specific patterns
### Pre-Delivery Checklist
[count] items to verify before shipping
Full detail moved to
references/output-example.md(progressive disclosure). Read that file before executing this section.
.rune/design-system.md — ephemeral design decisions evaporate; persistence is the pointoklch(from var(--accent) ...) — NEVER hand-shade hex values (Step 2.9 Rule 3)#000 / #fff for default text or background, MUST NOT ship lorem ipsum (Step 2.9 Rule 5).rune/ui-spec.md under ## Unwired Elements (element, location, why unwired, wiring owner) — Placeholder Ownership (Step 2.9 Rule 2)| Gate | Requires | If Missing |
|---|---|---|
| Domain Gate | Product domain classified before generating tokens | Ask clarifying question |
| Anti-Pattern Gate | Anti-pattern list derived from domain rules (not generic) | Domain-specific list required |
| Persistence Gate | .rune/design-system.md written before reporting done | Write file first |
| Platform Gate | Platform detected before generating tokens | Default to web, note assumption |
| Tweaks-Default Gate | One opinionated default proposed before asking for tweaks | Do NOT present neutral 5-option menus |
| Scale-Minimums Gate | Hero ≥48px, body ≥16px, touch ≥44px written into design-system.md | Emit minimums block in output |
| SVG-Placeholder Gate | No hand-rolled SVG for standard icons — Phosphor/Huge or placeholder | Swap to icon library or [ ICON: name ] box |
| oklch-Derivation Gate | All accent variants derived via oklch(from ...) | Rewrite manual hex shades as relative oklch |
| Measurable-Constraints Gate | Every rule in design-system.md is testable (concrete units, hex/oklch, ratios) | Rewrite vague directives as measurable specs (Step 2.9 Rule 4 table) |
| No-Pure-No-Lorem Gate | No #000/#fff in semantic tokens; no lorem ipsum in output | Swap to oklch neutrals; replace lorem with real data or labelled placeholder |
| Placeholder-Ownership Gate | Every inert/placeholder element shipped is listed in .rune/ui-spec.md ## Unwired Elements (element, location, why, wiring owner) | Add the missing rows before reporting done — an unlisted placeholder is a dead element with no owner |
| Artifact | Format | Location |
|---|---|---|
| Design system file | Markdown | .rune/design-system.md |
| UI specification contract | Markdown | .rune/ui-spec.md |
| Design report | Markdown | inline (chat output) |
| Accessibility audit findings | Markdown list | inline + appended to design-system.md |
| Visual audit score | Table (6 pillars × 1-4) | inline + appended to design report |
| UX writing guidelines | Markdown section | .rune/design-system.md § UX Writing |
Known failure modes for this skill. Check these before declaring done.
| Failure Mode | Severity | Mitigation |
|---|---|---|
| Generating generic design system without domain classification | CRITICAL | Domain Gate blocks this — classify first |
| Purple/indigo accent on non-AI-native product | HIGH | Constraint 3 blocks this — re-generate with domain-appropriate accent |
| Anti-pattern list copied from generic sources (not domain-specific) | HIGH | Each anti-pattern must cite why it fails in THIS specific domain |
| design-system.md not written (only reported verbally) | HIGH | Constraint 4 — no file = no persistence = future sessions lose design context |
| Mood contradicts domain safety conventions | HIGH | Step 2.5 warns user before proceeding (e.g., Playful + Healthcare) |
| UI-SPEC.md drift — components diverge from locked decisions | HIGH | HARD-GATE: cook/fix must read ui-spec.md before generating UI |
| Visual audit score < 18 shipped without improvement plan | MEDIUM | Step 6.5 flags weak pillars and creates backlog items |
| iOS target generating solid-background cards | MEDIUM | Platform Gate: iOS 26 Liquid Glass deprecates this pattern |
| Android target using hardcoded hex colors | MEDIUM | Platform Gate: MaterialTheme.colorScheme is mandatory for dynamic color |
| Presenting a neutral 5+ option style menu (deliberation death) | HIGH | Step 2.7 Tweaks Default — propose ONE opinionated default, ask for tweaks |
| Body text at 14px or hero at <40px (AI boilerplate scale) | HIGH | Step 2.9 Rule 1 — enforce Scale Minimums table in every design system |
| Hand-rolled SVG for dashboard/menu/close icons (malformed geometry) | HIGH | Step 2.9 Rule 2 — Phosphor/Huge Icons or [ ICON: name ] placeholder, never custom |
| Accent variants shaded by eyeball (inconsistent perceived brightness) | MEDIUM | Step 2.9 Rule 3 — oklch(from var(--accent) calc(l - 0.1) c h) |
Missing text-wrap: pretty on headings (widow words) | LOW | One-line CSS — add to base heading styles |
| Vague directive in design-system.md ("modern typography", "tasteful spacing") | HIGH | Step 2.9 Rule 4 — rewrite as measurable spec a reviewer can enforce |
Pure #000 background or #fff body bg in semantic tokens | MEDIUM | Step 2.9 Rule 5 — oklch(98% 0 0) / oklch(8% 0 0) neutrals |
| Lorem ipsum text shipped in production output | HIGH | Step 2.9 Rule 5 — use real user data or labelled [ PLACEHOLDER ] block |
| CJK product with Latin-first font stack (Chinese chars fall back to OS default, break rhythm) | MEDIUM | Step 2.9 Rule 6 — "Noto Sans SC", "Inter", system-ui |
.rune/design-system.md written (includes Mood + UX Writing sections).rune/ui-spec.md written (design contract for UI-generating skills)~2000-5000 tokens input, ~800-1500 tokens output. Sonnet for design reasoning quality.
DESIGN-REFERENCE.md (opens in a new tab)MOTION-CRAFT.md (opens in a new tab)references/anti-ai-rules.md (opens in a new tab)references/domain-rules.md (opens in a new tab)references/output-example.md (opens in a new tab)references/platform-overrides.md (opens in a new tab)references/ui-spec.md (opens in a new tab)references/visual-audit.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub rune-kit/rune --plugin rune67 skills in this plugin
/adversaryPre-implementation red-team analysis. Use when a plan is high-risk, critical path, or expensive to reverse. Challenges plans before code is written — finds edge cases, security holes, scalability bottlenecks, error propagation risks, and integration conflicts. Catches flaws at plan time (10x cheaper than post-implementation)./asset-creatorCreates code-based visual assets — SVG icons, OG image HTML templates, social banners, and icon sets. Use when generating visuals as code (vector/HTML), NOT raster images — for raster generation see @rune-pro/media. Outputs files with usage instructions./auditComprehensive project audit — security, dependencies, code quality, architecture, performance, infra, docs, and mesh analytics. Use when needing a full 8-dimension health-score snapshot before a major release, M&A diligence, or quarterly review. Delegates to specialist skills (sentinel, dependency-doctor, perf, autopsy, etc.).Other plugins' skills for the same job