tool-ui: Agent for Claude Code

.claude/agents/tool-ui-implementer.md

tool-ui-implementer is an agent for Claude Code from assistant-ui/tool-ui. It costs 27 tokens per session (705 once invoked), scanned A, original, MIT.

An agent for implementing Tool UI components in the project’s required React and TypeScript file structure.

In plain words
What is it for?
Use it after a design specification is ready to build a new Tool UI component and its adapter, schema, documentation stub, and related files.
Why use it?
It handles the component scaffolding, JSON-safe data contract, parsing, error handling, accessibility, and action behavior that can otherwise be easy to miss.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is assistant-ui/tool-ui's own configuration. It tells Claude Code how to work on tool-ui itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tool-ui configures →

Reuse

Borrowing it

Nothing to install: this file belongs to assistant-ui/tool-ui. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/assistant-ui/tool-ui/main/.claude/agents/tool-ui-implementer.md
Clone the repo
git clone --depth 1 https://github.com/assistant-ui/tool-ui

Made for: Claude Code.

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 tool-ui-implementer

README.md
[![agentmods](https://agentmods.dev/badge/agents/assistant-ui/tool-ui/tool-ui-implementer/github.svg)](https://agentmods.dev/agents/assistant-ui/tool-ui/tool-ui-implementer)
Your own site
<a href="https://agentmods.dev/agents/assistant-ui/tool-ui/tool-ui-implementer"><img src="https://agentmods.dev/badge/agents/assistant-ui/tool-ui/tool-ui-implementer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tool-ui-implementer

Your own site · 80×15
<a href="https://agentmods.dev/agents/assistant-ui/tool-ui/tool-ui-implementer"><img src="https://agentmods.dev/badge/agents/assistant-ui/tool-ui/tool-ui-implementer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 705 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00027 $0.00705
Opus 5.5 $0.00011 $0.00282
Sonnet 5.5 $0.00005 $0.00141
Haiku 4.5 $0.00003 $0.00071

Measured 2mo ago against content hash 7fff449b0eb7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tool-ui-implementer 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 2mo 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/tool-ui-implementer.md · 110 lines

How it starts

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

Tool UI Implementer Agent

You implement a new Tool UI component to current repo standards.

Context

Tool UI is maintainer-owned and copy/paste-first. Readability and predictable contracts are mandatory.

Input

You receive a design spec with:

  • slug + intent
  • schema shape
  • action semantics
  • receipt semantics
  • accessibility requirements

Implementation Steps

1. Scaffold First

For a new component, run:

pnpm component:new <slug>

Then extend scaffolded files instead of creating ad-hoc structure.

2. Component Directory Contract

Ensure apps/www/components/tool-ui/<slug>/ includes:

  • _adapter.tsx
  • schema.ts
  • <slug>.tsx
  • error-boundary.tsx
  • index.ts or index.tsx
  • README.md

3. Schema + Parse Contract

Use current schema contract pattern:

  • defineToolUiContract from ../shared/contract
  • parseSerializableX
  • safeParseSerializableX

Rules:

  • serializable schema is JSON-safe only
  • className is client-only, not in serializable schema
  • do not use .default() on Zod fields
  • receipt prop is choice (never confirmed/decision)

4. Component Rules

  • Root node includes data-slot and data-tool-ui-id
  • Use explicit, easy-to-read logic over dense abstractions
  • Prefer direct shared imports (../shared/schema, ../shared/contract, etc.) over ../shared barrel imports
  • If actions exist, follow shared actions pattern:
    • responseActions
    • onResponseAction
    • onBeforeResponseAction when needed
    • ActionButtons + normalized actions config
  • If component has post-action busy state, expose it with aria-busy

5. Error Boundary + Exports

  • Use createToolUiErrorBoundary from ../shared/error-boundary
  • Export component, error boundary, schema, parse/safeParse helpers, and types
  • Update aggregate exports in apps/www/components/tool-ui/index.ts

6. Tests for Non-Trivial Behavior

For logic-heavy behavior, add focused tests in:

  • apps/www/lib/tests/tool-ui/<slug>/...

Good candidates:

  • deterministic ids/keys
  • state transition helpers
  • action semantics
  • parsing contracts

Read the full file on GitHub · 110 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. 2mo ago First seen · 110 lines · 27 tokens per session scan A 7fff449b0eb7

Subscribe to this mod's changes

tool-ui-implementer is an agent published in the GitHub repository assistant-ui/tool-ui (779 stars, last pushed 1mo ago), licensed MIT. It adds 27 tokens to every session and 705 once invoked, about $0.0001 per session on Opus 5.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-30.

Related

Other agents, from other repositories

analyze-pass-impact

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across all compiler phases. Use when you need to understand the impact of a cross-cutting concern on specific compiler passes.

react/react · 53 tokens

react-build-resolver

Diagnose and fix React build failures across Vite, webpack, Next.js, CRA, Parcel, esbuild, and Bun. Handles JSX/TSX compile errors, hydration mismatches, server/client component boundary failures, missing types, and bundler-specific configuration issues with minimal, surgical changes. MUST BE USED when a React build…

affaan-m/ECC · 73 tokens

fullstack-craftsman

MANDATORY specialist subagent for Fullstack implementation (React 19, Next.js 15, Tailwind v4, Node.js/Bun/Hono backend, Database ORM, and API Design). Delegate to this subagent for writing, modifying, or refactoring fullstack application code.

roedyrustam/vibes-plug · 63 tokens

code-reviewer

Use proactively after non-trivial changes to @epam/ai-dial-ui-kit. Reviews recent diffs for correctness, public API consistency (Dial exports), a11y, tests, styles, scope, and security. Read-only — produces a prioritized must-fix / nice-to-have report and never edits files.

epam/ai-dial-ui-kit · 68 tokens

react-expert

Specialized in React.js, Next.js, and modern frontend ecosystems. Uses specialized knowledge of hooks, state management (Zustand/Redux), and server components.

ashrafmusa/agenticana · 37 tokens

frontend-specialist

Senior Frontend Architect who builds maintainable React/Next.js systems with performance-first mindset. Use when working on UI components, styling, state management, responsive design, or frontend architecture. Triggers on keywords like component, react, vue, ui, ux, css, tailwind, responsive.

ashrafmusa/agenticana · 63 tokens