Agent skill

Assistant UI Runtime

by compozy in compozy/compozy

Guide for assistant-ui runtime system and state management. An agent skill from compozy/compozy.

MITAuto-check passedFrontend & Design

Install Assistant UI Runtime

skills CLI
$ npx skills add compozy/compozy --skill assistant-ui-runtime -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install compozy/compozy assistant-ui-runtime --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/compozy/compozy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/assistant-ui/assistant-ui-runtime .claude/skills/assistant-ui-runtime && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
assistant-ui-runtime
GitHub stars
2.8k
Token cost
~856 tokens
SKILL.md length
77 words
Files
6 (incl. references)
Skills in repo
47
Repo updated
First seen
Licence
MIT

At a glance

Guide for assistant-ui runtime system and state management. An agent skill from compozy/compozy.

  • Working with runtimes
  • SKILL.md covers References, Runtime Hierarchy, State Access (Modern API) and Thread Operations, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Accessing state

What it does

Assistant UI Runtime is an agent skill from compozy/compozy. Guide for assistant-ui runtime system and state management. Use when working with runtimes, accessing state, or managing thread/message data.

Its SKILL.md is about 860 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/external-store.md`, `references/local-runtime.md` and `references/state-hooks.md`).

It sits in Frontend & Design, covering State management. The repository describes itself as: An operating system for AI agents. Plug in the agent CLIs you already use (Claude Code, Codex, Gemini CLI, Cursor) and they become a team: they split the work, hand tasks to each… The licence is MIT.

When your agent uses it

  • Working with runtimes
  • Accessing state
  • Managing thread/message data

Example prompts

  • “/assistant-ui-runtime”

What it can do on your machine

Read from SKILL.md and the folder at commit eec2ed1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • assistant-ui.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Assistant UI Runtime loads about 856 tokens when it runs, and up to ~8.7k if it reads all its reference files. Until then it costs about 41 tokens; SKILL.md has 77 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~856
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from compozy/compozy at commit eec2ed1, republished under its MIT licence (© compozy). 77 words, ~856 tokens.

Download SKILL.mdSave it as .claude/skills/assistant-ui-runtime/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
assistant-ui-runtime
description
Guide for assistant-ui runtime system and state management. Use when working with runtimes, accessing state, or managing thread/message data.
version
0.0.1
license
MIT

assistant-ui Runtime

Always consult assistant-ui.com/llms.txt for latest API.

References

Runtime Hierarchy

AssistantRuntime
├── ThreadListRuntime (thread management)
│   ├── ThreadListItemRuntime (per-thread item)
│   └── ...
└── ThreadRuntime (current thread)
    ├── ComposerRuntime (input state)
    └── MessageRuntime[] (per-message)
        └── MessagePartRuntime[] (per-content-part)

State Access (Modern API)

tsx
import { useAui, useAuiState, useAuiEvent } from "@assistant-ui/react";

function ChatControls() {
  const api = useAui();
  const messages = useAuiState(s => s.thread.messages);
  const isRunning = useAuiState(s => s.thread.isRunning);

  useAuiEvent("composer.send", (e) => {
    console.log("Sent in thread:", e.threadId);
  });

  return (
    <div>
      <button onClick={() => api.thread().append({
        role: "user",
        content: [{ type: "text", text: "Hello!" }],
      })}>
        Send
      </button>
      {isRunning && (
        <button onClick={() => api.thread().cancelRun()}>Cancel</button>
      )}
    </div>
  );
}

Thread Operations

tsx
const api = useAui();
const thread = api.thread();

// Append message
thread.append({ role: "user", content: [{ type: "text", text: "Hello" }] });

// Cancel generation
thread.cancelRun();

// Get current state
const state = thread.getState();  // { messages, isRunning, ... }

Message Operations

tsx
const message = api.thread().message(0);  // By index

message.edit({ role: "user", content: [{ type: "text", text: "Updated" }] });
message.reload();

Events

tsx
useAuiEvent("thread.runStart", () => {});
useAuiEvent("thread.runEnd", () => {});
useAuiEvent("composer.send", ({ threadId }) => {
  console.log("Sent in thread:", threadId);
});
useAuiEvent("thread.modelContextUpdate", () => {});

Capabilities

tsx
const caps = useAuiState(s => s.thread.capabilities);
// { cancel, edit, reload, copy, speak, attachments }

Quick Reference

tsx
// Get messages
const messages = useAuiState(s => s.thread.messages);

// Check running state
const isRunning = useAuiState(s => s.thread.isRunning);

// Append message
api.thread().append({ role: "user", content: [{ type: "text", text: "Hi" }] });

// Cancel generation
api.thread().cancelRun();

// Edit message
api.thread().message(index).edit({ ... });

// Reload message
api.thread().message(index).reload();

Common Gotchas

"Cannot read property of undefined"

  • Ensure hooks are called inside AssistantRuntimeProvider

State not updating

  • Use selectors with useAuiState to prevent unnecessary re-renders

Messages array empty

  • Check runtime is configured
  • Verify API response format

© compozy, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in .agents/skills/assistant-ui/assistant-ui-runtime of compozy/compozy.

  • SKILL.md
  • references/external-store.md
  • references/local-runtime.md
  • references/state-hooks.md
  • references/thread-list.md
  • references/types.md

Open the folder on GitHubat commit eec2ed1

Compare with similar skills

Assistant UI Runtime next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Assistant UI Runtime compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Assistant UI Runtime this skillcompozy/compozy2.8k—~856Automated safety check: PassMIT
Svelte Core Best Practicesrilldata/rill2.9k4 repos~1.8kAutomated safety check: PassApache-2.0
Dify Component Writing Guidelanggenius/dify158k—~626Automated safety check: PassCustom licence
React State Managementinvolvex/youtube-music-cli45613 repos~3kAutomated safety check: PassMIT
GPUI Kit Desktop App GuideAprilNEA/OpenLogi23k—~5.5kAutomated safety check: PassApache-2.0
Pierre Theming Librarypierrecomputer/pierre6.2k—~661Automated safety check: PassApache-2.0

Similar skills

  • Rules for writing idiomatic Svelte 5 code: when to reach for runes like state, derived and effect, and how to handle props, attachments and bindings.

    2.9k GitHub starsUsed in 4 repos~1.8k tokens
    Frontend & DesignAuto-check passed
  • Use when implementing or refactoring React/TypeScript components and the task requires decisions about component ownership, feature boundaries, state, data…

    158k GitHub stars~626 tokensUpdated today
    Frontend & DesignAuto-check passed
  • React State Management

    involvex/youtube-music-cli

    Master modern React state management with Redux Toolkit, Zustand, Jotai, and React Query.

    456 GitHub starsUsed in 13 repos~3k tokens
    Frontend & DesignAuto-check passed
  • Guides building Rust desktop apps with the gpui-kit crate, covering component selection, state ownership, theming and overlays, plus normative GPUI coding rules.

    23k GitHub stars~5.5k tokensUpdated 4 days ago
    Frontend & DesignAuto-check passed
  • Pierre Theming Library

    pierrecomputer/pierre

    Explains how to use the @pierre/theming package to list, resolve, select, switch and persist themes, with controller, color and React references.

    6.2k GitHub stars~661 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Frontend Patterns

    kurealnum/dotfiles

    Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.

    290 GitHub starsUsed in 19 repos~3.7k tokens
    Frontend & DesignAuto-check passed

More from compozy/compozy

All 47 skills in this repo
  • Eng Real Scenario QA

    compozy/compozy

    Dogfoods Compozy through an autonomous startup scenario with live providers, cross-surface observation, and strict evidence audit.

    2.8k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Eng Test Conventions

    compozy/compozy

    Go test-shape discipline for Compozy. An agent skill from compozy/compozy.

    2.8k GitHub stars~467 tokensUpdated today
    Auto-check passed
  • Assistant UI

    compozy/compozy

    Guide for assistant-ui library - AI chat UI components. An agent skill from compozy/compozy.

    2.8k GitHub stars~958 tokensUpdated today
    Auto-check passed
  • Guide for assistant-ui UI primitives - ThreadPrimitive, ComposerPrimitive, MessagePrimitive.

    2.8k GitHub stars~999 tokensUpdated today
    Auto-check passed
  • Assistant UI Streaming

    compozy/compozy

    Guide for assistant-stream package and streaming protocols. An agent skill from compozy/compozy.

    2.8k GitHub stars~813 tokensUpdated today
    Auto-check passed
  • Assistant UI Tools

    compozy/compozy

    Guide for tool registration and tool UI in assistant-ui. An agent skill from compozy/compozy.

    2.8k GitHub stars~868 tokensUpdated today
    Auto-check passed

Questions about Assistant UI Runtime

What does Assistant UI Runtime do?

Guide for assistant-ui runtime system and state management. An agent skill from compozy/compozy. Assistant UI Runtime is an agent skill from compozy/compozy. Guide for assistant-ui runtime system and state management.

When should I use Assistant UI Runtime?

Assistant UI Runtime fits situations like: working with runtimes; accessing state; managing thread/message data.

How do I install Assistant UI Runtime in Claude Code?

Run `npx skills add compozy/compozy --skill assistant-ui-runtime -a claude-code`. Or copy the skill folder (.agents/skills/assistant-ui/assistant-ui-runtime in compozy/compozy) into .claude/skills/assistant-ui-runtime in your project. Claude Code loads it when a task matches its description.

How do I install Assistant UI Runtime in Codex?

Run `npx skills add compozy/compozy --skill assistant-ui-runtime -a codex`. Or copy the skill folder (.agents/skills/assistant-ui/assistant-ui-runtime in compozy/compozy) into .agents/skills/assistant-ui-runtime in your project. Codex loads it when a task matches its description.

Can I use Assistant UI Runtime in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add compozy/compozy --skill assistant-ui-runtime -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/assistant-ui-runtime, .gemini/skills/assistant-ui-runtime, .github/skills/assistant-ui-runtime and .opencode/skills/assistant-ui-runtime in your project.

What does Assistant UI Runtime need to run?

SKILL.md names no scripts, command-line tools or credentials: Assistant UI Runtime is instructions for the agent only.

Does Assistant UI Runtime access the network?

SKILL.md names 1 domain. As links in the text: assistant-ui.com. This is read from the text; nothing was executed.

Is Assistant UI Runtime safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Assistant UI Runtime use?

Assistant UI Runtime is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Assistant UI Runtime use?

About 856 tokens (SKILL.md is roughly 3.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.8k tokens, read only when the agent opens those files.

What are the alternatives to Assistant UI Runtime?

Skills that share tags, products or a category with Assistant UI Runtime: Svelte Core Best Practices (rilldata/rill, 2.9k stars), Dify Component Writing Guide (langgenius/dify, 158k stars), React State Management (involvex/youtube-music-cli, 456 stars) and GPUI Kit Desktop App Guide (AprilNEA/OpenLogi, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Assistant UI Runtime?

compozy (a GitHub organization) maintains it in compozy/compozy, which has 2,792 GitHub stars. The repository holds 47 skills in this directory. The repository was last updated on October 8, 2026.

Source: compozy/compozy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.