ai-component-patterns

ai-component-patterns is a skill for Claude Code, Codex from RBraga01/builder-design. It costs 38 tokens per session (2,109 once invoked), scanned A, original, MIT.

A guide for building six types of interface components made specifically for AI features, such as chat, streamed replies, citations, and prompt input.

In plain words
What is it for?
Use it when creating or reviewing chat interfaces, streaming output, citation displays, agent logs, prompt inputs, or AI empty states.
Why use it?
It prevents ordinary interface elements from missing AI-specific needs such as stop controls, live accessibility updates, cursors, or token counters.

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/ai-component-patterns
Any agent
npx skills add RBraga01/builder-design --skill ai-component-patterns
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 ai-component-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/rbraga01/builder-design/ai-component-patterns.svg)](https://agentmods.dev/skills/rbraga01/builder-design/ai-component-patterns)
Your own site
<a href="https://agentmods.dev/skills/rbraga01/builder-design/ai-component-patterns"><img src="https://agentmods.dev/badge/skills/rbraga01/builder-design/ai-component-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,109 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.00038 $0.02109
Opus 5 $0.00019 $0.01055
Sonnet 5 $0.00008 $0.00422
Haiku 4.5 $0.00004 $0.00211

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

Security

Grade A, and why

ai-component-patterns 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.

skills/ai-component-patterns/SKILL.md · 224 lines

How it starts

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

AI Component Patterns

The Law

AI UI COMPONENTS ARE NOT GENERIC UI COMPONENTS.
"A textarea works for prompt input" and "a div works for streaming" ship components missing required sub-components — no cursor, no stop button, no live region, no token counter.
All required sub-components of all 6 AI-native patterns, fully implemented, IS an AI component.

When to Use

Trigger when:

  • Building any new AI feature UI component from scratch
  • Auditing an existing component before it ships
  • Replacing a generic component (textarea, div) that is being used as an AI-native one
  • Reviewing a PR that introduces chat, streaming output, citations, agent logs, or prompt input

When NOT to Use

  • Components that display only static, pre-rendered content (no model calls, no streaming)
  • Internal admin tools where the audience is developers who understand the system's raw state
  • Non-interactive AI outputs consumed by the system, not displayed to users

The Process

Step 1 — Identify the Component Type

From the 6 types below, identify which AI-native components this feature requires. A chat interface may need: Prompt Input + Streaming Output + Citation Display + Empty State. An agent view may need: Agent Action Log + Uncertainty Indicator + Streaming Output.

Step 2 — Check Each Required Element

For every component identified, use the Required Elements checklist as a review gate. A component is not done until every required element is present. Not most. Every.

Step 3 — Fix Pitfalls Before Ship

Each component has a Pitfalls list. These are the most common production failures. Check each pitfall explicitly — don't rely on "I didn't do that."

Step 4 — Complete the Completion Statement

Produce the Completion Statement Format below. Filling in real component names and real checkboxes is the test. Vague statements ("all components done") cannot satisfy it.

The 6 AI-Native Components

1 — Prompt Input

The user-facing text entry for AI interaction.

Read the full file on GitHub · 224 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 · 224 lines · 38 tokens per session scan A 6e60851e3929

Subscribe to this mod's changes

ai-component-patterns is a skill published in the GitHub repository RBraga01/builder-design (2 stars, last pushed 2mo ago), licensed MIT. It adds 38 tokens to every session and 2,109 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 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

diagram-generation

Generate self-contained HTML architecture diagrams. Use when creating visual diagrams for PRs, task plans, or architectural explanations.

comet-ml/opik · 26 tokens