Agent skill

Assistant UI Streaming

by compozy in compozy/compozy

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

MITAuto-check passedDevelopment

Install Assistant UI Streaming

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

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

GitHub CLI
$ gh skill install compozy/compozy assistant-ui-streaming --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-streaming .claude/skills/assistant-ui-streaming && 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-streaming
GitHub stars
2.8k
Token cost
~813 tokens
SKILL.md length
113 words
Files
4 (incl. references)
Skills in repo
47
Repo updated
First seen
Licence
MIT

At a glance

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

  • Implementing streaming backends
  • SKILL.md covers References, When to Use, Installation and Custom Streaming Response, plus 4 more sections
  • Calls npm
  • Custom protocols

What it does

Assistant UI Streaming is an agent skill from compozy/compozy. Guide for assistant-stream package and streaming protocols. Use when implementing streaming backends, custom protocols, or debugging stream issues.

Its SKILL.md is about 810 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/assistant-transport.md`, `references/data-stream.md` and `references/encoders.md`).

It sits in Development, covering Debugging. 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

  • Implementing streaming backends
  • Custom protocols
  • Debugging stream issues

Example prompts

  • “/assistant-ui-streaming”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit c46be43. 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

    Shell commands in SKILL.md call:

    • npm

    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 Streaming loads about 813 tokens when it runs, and up to ~3.7k if it reads all its reference files. Until then it costs about 43 tokens; SKILL.md has 113 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~813
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.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 c46be43, republished under its MIT licence (© compozy). 113 words, ~813 tokens.

Download SKILL.mdSave it as .claude/skills/assistant-ui-streaming/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
assistant-ui-streaming
description
Guide for assistant-stream package and streaming protocols. Use when implementing streaming backends, custom protocols, or debugging stream issues.
version
0.0.1
license
MIT

assistant-ui Streaming

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

The assistant-stream package handles streaming from AI backends.

References

When to Use

Using Vercel AI SDK?
├─ Yes → toUIMessageStreamResponse() (no assistant-stream needed)
└─ No → assistant-stream for custom backends

Installation

bash
npm install assistant-stream

Custom Streaming Response

ts
import { createAssistantStreamResponse } from "assistant-stream";

export async function POST(req: Request) {
  return createAssistantStreamResponse(async (stream) => {
    stream.appendText("Hello ");
    stream.appendText("world!");

    // Tool call example
    const tool = stream.addToolCallPart({ toolCallId: "1", toolName: "get_weather" });
    tool.argsText.append('{"city":"NYC"}');
    tool.argsText.close();
    tool.setResponse({ result: { temperature: 22 } });

    stream.close();
  });
}

With useLocalRuntime

useLocalRuntime expects ChatModelRunResult chunks. Yield content parts for streaming:

tsx
import { useLocalRuntime } from "@assistant-ui/react";

const runtime = useLocalRuntime({
  model: {
    async *run({ messages, abortSignal }) {
      const response = await fetch("/api/chat", {
        method: "POST",
        body: JSON.stringify({ messages }),
        signal: abortSignal,
      });

      const reader = response.body?.getReader();
      const decoder = new TextDecoder();
      let buffer = "";

      while (reader) {
        const { done, value } = await reader.read();
        if (done) break;

        buffer += decoder.decode(value, { stream: true });
        const parts = buffer.split("\n");
        buffer = parts.pop() ?? "";

        for (const chunk of parts.filter(Boolean)) {
          yield { content: [{ type: "text", text: chunk }] };
        }
      }
    },
  },
});

Debugging Streams

ts
import { AssistantStream, DataStreamDecoder } from "assistant-stream";

const stream = AssistantStream.fromResponse(response, new DataStreamDecoder());
for await (const event of stream) {
  console.log("Event:", JSON.stringify(event, null, 2));
}

Stream Event Types

  • part-start with part.type = "text" | "reasoning" | "tool-call" | "source" | "file"
  • text-delta with streamed text
  • result with tool results
  • step-start, step-finish, message-finish
  • error strings

Common Gotchas

Stream not updating UI

  • Check Content-Type is text/event-stream
  • Check for CORS errors

Tool calls not rendering

  • addToolCallPart needs both toolCallId and toolName
  • Register tool UI with makeAssistantToolUI

Partial text not showing

  • Use text-delta events for streaming

© 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 3 other files (references) in .agents/skills/assistant-ui/assistant-ui-streaming of compozy/compozy.

  • SKILL.md
  • references/assistant-transport.md
  • references/data-stream.md
  • references/encoders.md

Open the folder on GitHubat commit c46be43

Compare with similar skills

Assistant UI Streaming 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 Streaming compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Assistant UI Streaming this skillcompozy/compozy2.8k—~813Automated safety check: PassMIT
Trellis Session Insightmindfold-ai/Trellis15k4 repos~1.7kAutomated safety check: PassAGPL-3.0
Native Data FetchingCherryHQ/cherry-studio-app4k6 repos~2.9kAutomated safety check: NotesMIT
Aoti Debugpytorch/pytorch104k1 repos~1.7kAutomated safety check: PassCustom licence
Herdr Throwaway Reproductionherdrdev/herdr43k—~2.4kAutomated safety check: PassApache-2.0
Systematic Debuggingultralisp/ultralisp25851 repos~2.4kAutomated safety check: PassNone

Similar skills

  • Trellis Session Insight

    mindfold-ai/Trellis

    Reach into past AI conversation history through the trellis mem CLI.

    15k GitHub starsUsed in 4 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Native Data Fetching

    CherryHQ/cherry-studio-app

    A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.

    4k GitHub starsUsed in 6 repos~2.9k tokens
    DevelopmentAuto-check: notes
  • Aoti Debug

    pytorch/pytorch

    Debug AOTInductor (AOTI) errors and crashes. An agent skill from pytorch/pytorch.

    104k GitHub starsUsed in 1 repo~1.7k tokens
    DevelopmentAuto-check passed
  • Runs a disposable, uniquely named Herdr session inside an existing one so runtime, pane, terminal or API bugs can be reproduced without touching the main session.

    43k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Systematic Debugging

    ultralisp/ultralisp

    A skill your agent uses when encountering any bug, test failure, or unexpected behavior, before proposing fixes

    258 GitHub starsUsed in 51 repos~2.4k tokens
    DevelopmentAuto-check passed
  • Decides whether an OpenLogi device problem on macOS is a privacy-permission (TCC) problem, using agent log lines, and says which identity needs which grant.

    23k GitHub stars~2.5k tokensUpdated 4 days ago
    DevelopmentAuto-check: notes

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 Runtime

    compozy/compozy

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

    2.8k GitHub stars~856 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

Categories

Questions about Assistant UI Streaming

What does Assistant UI Streaming do?

Guide for assistant-stream package and streaming protocols. An agent skill from compozy/compozy. Assistant UI Streaming is an agent skill from compozy/compozy. Guide for assistant-stream package and streaming protocols.

When should I use Assistant UI Streaming?

Assistant UI Streaming fits situations like: implementing streaming backends; custom protocols; debugging stream issues.

How do I install Assistant UI Streaming in Claude Code?

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

How do I install Assistant UI Streaming in Codex?

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

Can I use Assistant UI Streaming 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-streaming -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-streaming, .gemini/skills/assistant-ui-streaming, .github/skills/assistant-ui-streaming and .opencode/skills/assistant-ui-streaming in your project.

What does Assistant UI Streaming need to run?

Going by SKILL.md and its folder, Assistant UI Streaming needs the command-line tools its instructions call (npm). Our summary lists: Node.js.

Does Assistant UI Streaming 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 Streaming 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 Streaming use?

Assistant UI Streaming 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 Streaming use?

About 813 tokens (SKILL.md is roughly 3.3k 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 2.9k tokens, read only when the agent opens those files.

What are the alternatives to Assistant UI Streaming?

Skills that share tags, products or a category with Assistant UI Streaming: Trellis Session Insight (mindfold-ai/Trellis, 15k stars), Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars), Aoti Debug (pytorch/pytorch, 104k stars) and Herdr Throwaway Reproduction (herdrdev/herdr, 43k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Assistant UI Streaming?

compozy (a GitHub organization) maintains it in compozy/compozy, which has 2,791 GitHub stars. The repository holds 47 skills in this directory. The repository was last updated on October 7, 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.