design-before-code

design-before-code is a skill for Claude Code, Codex from RBraga01/builder-design. It costs 51 tokens per session (1,181 once invoked), scanned A, original, MIT.

A planning rule that requires a written design before implementing a new AI feature or interface component. The design records the layout, states, wording, and interactions.

In plain words
What is it for?
For specifying new AI interface components, changing interaction models, adding major product sections, and defining outputs from agents or multi-step workflows.
Why use it?
It prevents the implementation from being shaped only by what is easiest to code and exposes missing decisions before development begins.

Skill for Claude CodeCodex

Part of the builder-design plugin — 8 skills, 5 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/rbraga01/builder-design/design-before-code
Any agent
npx skills add RBraga01/builder-design --skill design-before-code
Clone the repo
git clone --depth 1 https://github.com/RBraga01/builder-design

Made for: Claude Code, Codex.

Or install builder-design, the plugin that ships this one along with the rest of its 8 skills, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for design-before-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/rbraga01/builder-design/design-before-code.svg)](https://agentmods.dev/skills/rbraga01/builder-design/design-before-code)
Your own site
<a href="https://agentmods.dev/skills/rbraga01/builder-design/design-before-code"><img src="https://agentmods.dev/badge/skills/rbraga01/builder-design/design-before-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,181 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00051 $0.01181
Opus 5 $0.00026 $0.00590
Sonnet 5 $0.00010 $0.00236
Haiku 4.5 $0.00005 $0.00118

Measured 3d ago against content hash a88fba40fce9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

design-before-code scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/design-before-code/SKILL.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Design Before Code

The Law

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.

When to Use

Trigger before:

  • Implementing any new AI feature UI component
  • Refactoring a component that changes its interaction model
  • Adding a new page or major section to an AI product
  • Implementing the output of an agent or multi-step AI workflow

When NOT to Use

  • Hotfixes to existing, already-designed components (wording changes, colour tweaks)
  • Backend-only changes with no UI surface
  • Prototypes explicitly scoped as throwaway (label them as such)

The Spec Format

A spec does not need to be a Figma file. It needs to answer four questions:

1 — Layout

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.

2 — States

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     |

3 — Copy

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…"

Read the full file on GitHub · 140 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 140 lines · 51 tokens per session scan A a88fba40fce9

Subscribe to this mod's changes

design-before-code is a skill published in the GitHub repository RBraga01/builder-design (2 stars, last pushed 2mo ago), licensed MIT. It adds 51 tokens to every session and 1,181 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

uxi

UX research and UI design guidance for any product in any domain. Use this whenever the work touches interface design, usability, design critique, accessibility, design systems, user research, information architecture, onboarding, forms, dashboards, landing pages, empty and error states, or interface copy. Trigger it…

ahammadnafiz/uxi · 166 tokens

ux-principles-skill

Apply established UX, interaction-design, and visual-design principles when designing, building, or reviewing any user-facing interface or flow. Use when creating or editing UI components, screens, forms, navigation, or layouts; when making product/interaction decisions (goals, personas, postures, states); when…

dereyurtali/ux-principles-skill · 151 tokens

ui-styles

离线 UI 风格库(79 个风格家族,中英双语 prompt)。当用户需要为项目选定视觉风格、生成 UI 设计 prompt、或询问某个具体设计风格(如 claymorphism / glassmorphism / neoBrutalism / vaporwave / synthwave / bento grids / minimalism 等)时使用。触发词:「UI 风格」「设计风格推荐」「UI prompt」「视觉风格」「换个风格」「这个项目用什么风格」。.

chrzamz/ui-styles-skill · 114 tokens

stitch-design

Automate high-fidelity UI prototyping with Google Stitch MCP. Use when the user needs to generate, iterate, or refine UI screens via Stitch prompts.

blockbloomer/claude-skill-stitch-design · 35 tokens

ui-designer

!cat skills/shared/game-visual-foundations.md 2>/dev/null || echo "=== Visual Foundations not loaded ===" !cat skills/shared/protocols/visual-grounding.md 2>/dev/null || echo "=== Visual Grounding not loaded ===" !cat skills/shared/protocols/visual-evidence-library.md 2>/dev/null || echo "=== Visual Evidence Library…

buiphucminhtam/forgewright · 65 tokens

accessibility

Audit and improve web accessibility following WCAG 2.2 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".

addyosmani/web-quality-skills · 51 tokens