/builder-design:design-before-codefrom builder-design
Use before implementing any new AI feature UI component. Requires a written shape/spec — layout, states, copy, interactions — before a single line of implementation code is written. Blocks "I'll design it as I build it" completions.
Ships in builder-design. 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.
None: SKILL.md is the whole skill.
CODE WRITTEN WITHOUT A SPEC IS ALWAYS A PROTOTYPE.
"I'll design it as I build it" produces UI shaped by what was easy to code — not by what users need.
A written layout, state definitions, final copy, and interaction map IS a spec.
Trigger before:
A spec does not need to be a Figma file. It needs to answer four questions:
What is the visual structure? Describe it in words or ASCII:
┌─────────────────────────────────┐
│ [Avatar] User message │
│ │
│ AI response [Avatar] │
│ ─ ─ streaming ─ ─ │
│ │
│ [Prompt input ___________] [▶] │
└─────────────────────────────────┘
Note: column widths, alignment, responsive behaviour (stacks on mobile? collapses?), max-width constraints.
Which states does this component have? (See ai-states-required for the full list.) For each state, note the visual difference.
| State | Visual change |
|----------|----------------------------------------|
| Loading | Response area shows streaming cursor |
| Error | Red border, inline error copy |
| Success | Full text, feedback buttons appear |
Write the actual copy for every text element — not "label here" but the final words.
Placeholder: "Ask anything about this document…"
Error: "Something went wrong. Try again."
Empty: "No messages yet. Start by asking a question."
Loading: "Thinking…"
What can the user do, and what happens?
Send message → POST /api/chat → show loading → stream response
Stop generation → abort stream → show partial + [Continue] button
Retry → resend last message → loading state
Copy response → clipboard → toast "Copied"
Thumbs down → open feedback modal
Create design/specs/<component-name>.md with the four sections above. Takes 15–30 minutes. Saves 4 hours of back-and-forth after implementation.
Before starting code, verify the spec answers:
ai-states-required have a visual treatment?Code to the spec, not alongside it. If implementation reveals a gap in the spec, stop and update the spec before continuing. The spec is the source of truth.
Before marking the PR ready, check the implementation against each spec section. A diff between spec and implementation is either a spec update (conscious decision) or a regression.
These thoughts mean no spec exists — stop:
When design-before-code is satisfied, state it like this:
Spec written.
Component: <name>
File: design/specs/<component-name>.md ✓
Layout: <described — responsive behaviour noted> ✓
States: <N states documented — all from ai-states-required covered> ✓
Copy: <all text elements written — no placeholder copy> ✓
Interactions: <all user actions mapped to consequences> ✓
Edge cases noted: <long text / empty response / simultaneous submit> ✓
Ready to implement.
UI built without a spec is designed by the path of least resistance through the code, not by what users need. AI product UIs are especially vulnerable: the model's output is unpredictable in length, format, and latency. Without a spec, every edge case the model produces becomes a visual surprise the developer handles ad hoc — inconsistently, incompletely, and under time pressure.
What SKILL.md sets; muted values are Claude Code's defaults
8 skills in this plugin
/accessible-ai-outputUse before shipping any UI that renders AI-generated content. Dynamic model output requires ARIA live regions, reading order, and cognitive load review that static content does not. Blocks "we'll do accessibility later" completions./ai-component-patternsUse when designing or implementing any of the 6 core AI UI components. Each has specific patterns, pitfalls, and required sub-components that generic UI components don't address./ai-onboarding-designUse when designing first-run flows and empty states for AI features. AI onboarding has specific requirements — model capability communication, trust building, and graceful degradation when the model doesn't know — that generic onboarding patterns miss./ai-output-designUse when designing how AI-generated content is rendered — streaming text, structured data, citations, code blocks, and uncertainty signals. Covers both visual rendering and the accessibility layer./ai-states-requiredUse before writing any code for an AI feature's UI. All 7 states must be designed and documented before implementation begins. Blocks "we'll add loading states later" completions./design-token-auditUse before any AI feature UI lands in production. Every colour, spacing value, typography, shadow, and border in AI components must reference design tokens — no hardcoded values. Blocks "I'll align with the design system later" completions.Other plugins' skills for the same job
builder-design@rbraga01 is listed by rbraga01/a-team — review the source before installing
npx claudepluginhub rbraga01/a-team --plugin builder-design