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.
npx agentmods add skills/rbraga01/builder-design/design-before-codenpx skills add RBraga01/builder-design --skill design-before-codegit clone --depth 1 https://github.com/RBraga01/builder-designWrote 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.
[](https://agentmods.dev/skills/rbraga01/builder-design/design-before-code)<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>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.
| Model | Per session | Once 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 |
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.
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…"
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.
- 3d ago First seen · 140 lines · 51 tokens per session scan A a88fba40fce9
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.
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…
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…
ui-styles
离线 UI 风格库(79 个风格家族,中英双语 prompt)。当用户需要为项目选定视觉风格、生成 UI 设计 prompt、或询问某个具体设计风格(如 claymorphism / glassmorphism / neoBrutalism / vaporwave / synthwave / bento grids / minimalism 等)时使用。触发词:「UI 风格」「设计风格推荐」「UI prompt」「视觉风格」「换个风格」「这个项目用什么风格」。.
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.
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…
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".