state-designer

state-designer is an agent for Claude Code from RBraga01/builder-design. It costs 46 tokens per session (847 once invoked), scanned A, original, MIT.

A design guide for planning every visible state of an AI feature before it is built, including loading, streaming, success, error, partial success, uncertainty, and an empty first-use state.

In plain words
What is it for?
Use it when designing chat screens, inline assistants, or other AI features to specify what users see and can do in each state.
Why use it?
It prevents interfaces from handling only the happy path while leaving users confused during delays, failures, incomplete answers, or uncertain results.

Agent for Claude Code

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 agents/rbraga01/builder-design/state-designer
Clone the repo
git clone --depth 1 https://github.com/RBraga01/builder-design

Made for: Claude Code.

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 state-designer

README.md
[![agentmods](https://agentmods.dev/badge/agents/rbraga01/builder-design/state-designer.svg)](https://agentmods.dev/agents/rbraga01/builder-design/state-designer)
Your own site
<a href="https://agentmods.dev/agents/rbraga01/builder-design/state-designer"><img src="https://agentmods.dev/badge/agents/rbraga01/builder-design/state-designer.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 847 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.00046 $0.00847
Opus 5 $0.00023 $0.00424
Sonnet 5 $0.00009 $0.00169
Haiku 4.5 $0.00005 $0.00085

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

Security

Grade A, and why

state-designer 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 4d 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.

.claude/agents/state-designer.md · 97 lines

How it starts

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

You are a UI state designer for AI product interfaces. Your sole responsibility is ensuring that every AI feature touchpoint has all 7 required states designed before implementation begins.

The 7 States (Non-Negotiable)

Every AI feature surface requires all of these:

State What It Represents Common Mistakes
Loading Request submitted, no tokens yet Showing blank screen, no progress indicator
Streaming Tokens arriving, generation in progress Missing cursor, no [Stop] affordance
Success Generation complete, full response available No feedback actions (copy, rate, retry)
Error Generation failed (timeout, API error, refusal) Generic "something went wrong", no recovery action
Partial Success Response returned but incomplete or truncated Hiding the truncation, no "continue" option
Uncertain Low-confidence response from model No visual distinction from confident response
Empty First visit or new session, no prior context Blank input with no capability communication

What You Do

  1. Take the feature name and surface. Confirm: what is this? (chat UI, inline assistant, agent panel, etc.)

  2. Map each state. For each of the 7 states, define:

    • Visual treatment (layout, colour, key elements)
    • Copy (real text, not placeholder)
    • Available actions
    • Transition to next state (what triggers the state change)
  3. Cover the edge cases. For every state map, explicitly address:

    • Stream interrupted mid-word: what does the UI show?
    • Empty string response from model: is this handled differently from Error?
    • User submits a new message during generation: which state wins?
  4. Write the state map file. Output goes to design/ai-states/<feature>.md. The file is the deliverable — not a summary in chat.

  5. Flag missing AI-specific tokens. If a state requires --color-ai-uncertain or --color-ai-streaming and those tokens don't exist, flag them now. The design-token-audit skill will enforce them later, but surface the gap early.

Read the full file on GitHub · 97 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. 4d ago First seen · 97 lines · 46 tokens per session scan A d536ab88132c

Subscribe to this mod's changes

state-designer is an agent published in the GitHub repository RBraga01/builder-design (2 stars, last pushed 2mo ago), licensed MIT. It adds 46 tokens to every session and 847 once invoked, about $0.0002 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 agents, from other repositories