Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

generative-ui

БесплатноБез исполняемых скриптовНе проверен

Lets the model compose interfaces at runtime from a component vocabulary instead of one hand-written component per tool, and covers every generative UI…

assistant-uiот assistant-ui★ 30 звёзд на GitHub

Об этом скилле

assistant-ui Generative UI

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

Generative UI inverts the usual tool-rendering relationship. Instead of one hand-written component per tool call, you ship a vocabulary of components and let something assemble a tree from it: either the model, through the present tool, or your backend, through a message part or a LangGraph event. @assistant-ui/generative-ui ships a default vocabulary of 29 components (cards, facts, tables, charts, forms, controls) plus converters that turn the same tree into Slack Block Kit or a Microsoft Teams Adaptive Card, and one that turns an A2UI surface into it, so a composition built once can render in the browser and outside it.

References

Which generative UI pattern?

Two questions separate the patterns: does the model compose the layout or do you bind it ahead of time, and does the UI originate from a tool call or from a part your backend emits.

Pattern API Best for
The present tool JSONGenerativeUI + present The model composes dashboards, cards, and layouts from a vocabulary you ship
Tool UI toolkit render (see tools) A widget tied to one tool call you already know about
Generative UI primitive MessagePrimitive.GenerativeUI + allowlist A backend that already emits generative-ui message parts
LangGraph data UI makeAssistantDataUI + ui_message LangGraph agents emitting UI on the LangGraph stream, see assistant-ui.com/docs/runtimes/langgraph/generative-ui
OpenUI @openuidev/assistant-ui, third party Already invested in the OpenUI ecosystem and its component kit

The first two are tool-driven, so the model decides when UI appears; the LangGraph row is backend-driven, so your agent does. present and the generative UI primitive both take a JSON component tree, but in non-interchangeable shapes, see Spec shape differences. A tree built for present is also the shape the Slack and Teams converters accept and the A2UI converter produces.

Quick start

Install the package, add the styled element, and enable the "use generative" compiler for your framework:

zod is an optional peer dependency imported by the /react entry, so install it with the package.

npm install @assistant-ui/generative-ui zod
npx assistant-ui@latest add generative-ui
import { withAui } from "@assistant-ui/next";

export default withAui({
  /* your Next config */
});

Vite and TanStack Start use aui() from @assistant-ui/vite (plugins: [aui({ ... })]); Expo and bare React Native use const { withAui } = require("@assistant-ui/metro"); in metro.config.js. The directive lets one file declare tools that both the browser and your server route import: the compiler strips the browser-only halves from the server build and the schemas from the client build.

JSONGenerativeUI turns a component library into the model-facing schema for present. Register the result on a toolkit like any other tool:

"use generative";

import { defineToolkit } from "@assistant-ui/react";
import {
  JSONGenerativeUI,
  defaultGenerativeUILibrary,
} from "@assistant-ui/generative-ui/react";

const generative = new JSONGenerativeUI({
  library: defaultGenerativeUILibrary,
});

export default defineToolkit({
  present: generative.present({ display: "standalone" }),
});

display: "standalone" renders the result on its own surface, outside the chain-of-thought trace; omit it to render inline. The default vocabulary is already a working setup with no components of your own, see vocabulary.md for the full list and how to extend it.

Register the toolkit on the client through AuiConfig, and set sendAutomaticallyWhen so the run continues once the frontend tool resolves:

"use client";

import { AssistantRuntimeProvider, AuiConfig, Tools } from "@assistant-ui/react";
import { useChatRuntime } from "@assistant
Полный SKILL.md на GitHub

Установить generative-ui в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/a2ui-openui.mdreferences/actions.mdreferences/renderers.mdreferences/tokens.mdreferences/vocabulary.md

FAQ

Что делает скилл generative-ui?

Lets the model compose interfaces at runtime from a component vocabulary instead of one hand-written component per tool, and covers every generative UI pattern in the framework. Use for the model-driven present tool: JSONGenerativeUI, defaultGenerativeUILibrary, and present({ display }) from @assistant-ui/generative-ui/react, registered through AuiConfig({ tools: Tools({ toolkit }) }). Also covers the backend-driven MessagePrimitive.GenerativeUI primitive and its component allowlist, the Slack Block Kit and Microsoft Teams Adaptive Card renderers and their action decoders, A2UI surfaces over AG-UI, and the third-party OpenUI integration. Route here when the model should design its own layout rather than fill one you wrote, when an unknown _type or component name throws or silently renders nothing, or when a generative UI tree needs to post to Slack or Teams or paint an A2UI surface. For a widget tied to one tool call you already know about, use tool-ui in the tools skill instead.

Как установить скилл generative-ui?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл generative-ui запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить generative-ui с