Skip to content
Development
Agent

tool-ui-implementer

Create Tool UI component source files. Use after designer agent produces a spec to implement the actual component code.

From plugin
tool-ui
7765 skills5 agents7 commands

Claude Code

$ npx -y skills add assistant-ui/tool-ui --agent claude-code

Agent definition

tool-ui-implementer.md
name: tool-ui-implementer
description: Create Tool UI component source files. Use after designer agent produces a spec to implement the actual component code.
tools:
  - Read
  - Write
  - Edit
  - Glob
  - Grep
  - Bash

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

Reference Files

  • `apps/www/components/tool-ui/option-list/*`
  • `apps/www/components/tool-ui/plan/*`
  • `apps/www/components/tool-ui/message-draft/*`
  • `apps/www/components/tool-ui/shared/*`
  • `apps/www/scripts/new-tool-ui-component.ts`

Final Checklist

  • [ ] Scaffold-based structure is complete
  • [ ] Schema uses `defineToolUiContract`
  • [ ] Receipt semantics use `choice`
  • [ ] No `../shared` barrel imports for core component logic
  • [ ] Component exports are complete (local + aggregate)
  • [ ] Added contract tests for non-trivial logic
Read more
@assistant-ui
Ships withtool-ui

UI components for AI interfaces

7761 skill5 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
776
Star history of assistant-ui/tool-ui on GitHub, a chart by star-history.com

Other agents on tool-ui.

tool-ui-designer

tool-ui-designer

Agent

Interview user and design Tool UI component API. Use when starting /generate-tool-ui to gather requirements and produce a design…

tool-ui-documenter

tool-ui-documenter

Agent

Create documentation and registry entries for Tool UI components. Use after implementer to write docs and wire docs/preview…

tool-ui-examples

tool-ui-examples

Agent

Create presets and showcase entries for Tool UI components. Use after implementer to create compelling examples, gallery entry,…

tool-ui-reviewer

tool-ui-reviewer

Agent

Quality gate for Tool UI components. Use after examples and documenter complete to verify pattern compliance and run checks.

More agents from other plugins.

a11y-architect
Auto-invoked

a11y-architect

Agent

Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI…

ecc2w293k
@affaan-m@affaan-mInstall Agent
analyze-pass-impact

analyze-pass-impact

Agent

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across…

react5d252k
@facebook@facebookInstall Agent
orchestrator

orchestrator

Agent

- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as…

codex5d135k
@openai@openaiInstall Agent
cavecrew-builder

cavecrew-builder

Agent

Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…

caveman6d119k
@juliusbrussee@juliusbrusseeInstall Agent

Questions about tool-ui-implementer.

Which coding agents can use tool-ui-implementer?
tool-ui-implementer installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.