Skill library

Agent skill UI design

Assistant UI

Shape a web interface around a coherent visual direction.

  • UI design
  • UI components

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add https://github.com/assistant-ui/skills/tree/main/assistant-ui/skills/assistant-ui --skill assistant-ui --agent claude-code --yes

Check this file in your project.claude/skills/assistant-ui/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add https://github.com/assistant-ui/skills/tree/main/assistant-ui/skills/assistant-ui --skill assistant-ui

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. The app’s React version, the backend contract, existing chat state if any, and a deterministic local adapter for testing.

View operation manual

What this skill helps with

  • Shape a web interface around a coherent visual direction.

Good for

  • Visual direction
Task
Connect a custom chat backend to the right assistant-ui runtime
Inputs
The app’s React version, the backend contract, existing chat state if any, and a deterministic local adapter for testing.
Outcome
One thread where a real or stubbed response uses the same adapter lifecycle and cancellation reaches the underlying request.
Skill name
assistant-ui

Choose where chat state is managed

An underspecified approach

Add a chat component and use whatever runtime its demo uses.

An adapter meant for a particular transport may be incompatible with your chat API or duplicate state already owned by another store.

A verifiable workflow

  1. Identify who owns messages, what shape the request uses, and how cancellation propagates.
  2. A local response fixture and a real backend adapter can implement the same run contract.
  3. The adapter receives cancellation, the composer returns to ready, and a fresh message succeeds.

assistant-ui operation manual

One thread where a real or stubbed response uses the same adapter lifecycle and cancellation reaches the underlying request.

The app’s React version, the backend contract, existing chat state if any, and a deterministic local adapter for testing.

  1. Choose the runtime from the actual backend contract

    Identify who owns messages, what shape the request uses, and how cancellation propagates.

    Prompt · Step 1
    Use the installed assistant-ui Skill for [React app, backend contract and current state owner]. Read the packaged runtime selection guide. If our custom endpoint owns transport but no external store holds messages, choose useLocalRuntime with a ChatModelAdapter. If existing state or a provider-specific transport is present, identify the corresponding runtime and version before proceeding.
  2. Start with a deterministic LocalRuntime adapter

    A local response fixture and a real backend adapter can implement the same run contract.

    Prompt · Step 2
    For [chosen custom backend path], install or use the project-compatible @assistant-ui/react. Mount AssistantRuntimeProvider around one thread with useLocalRuntime. Implement ChatModelAdapter.run against a local fixture that responds with actual message content, with a delayed case that can be aborted. Pass abortSignal down to the real request when wiring the production path. Keep any service credentials server-side.
  3. Verify completion, stop and the next message

    The adapter receives cancellation, the composer returns to ready, and a fresh message succeeds.

    Prompt · Step 3
    On [local thread and fixtures], send a known query and confirm rendered assistant content and message order. Trigger a delayed response, stop it, and verify the adapter’s AbortSignal. Send a third query and confirm the thread recovers. Report what was verified against fixtures and which live API tests remain.

Look up the runtime and primitives

Match the official reference to your installed version.

Should I choose LocalRuntime if Redux already owns the messages?@assistant-ui/react
Command or reference
useLocalRuntime · ChatModelAdapter · AbortSignal
Examples
Use the Skill’s ExternalStoreRuntime path when an existing store owns the messages. LocalRuntime is for assistant-ui-managed state with a custom adapter.

Troubleshooting and FAQ

Should I choose LocalRuntime if Redux already owns the messages?

Use the Skill’s ExternalStoreRuntime path when an existing store owns the messages. LocalRuntime is for assistant-ui-managed state with a custom adapter.