.cursor/skills/assistant-ui/SKILL.md
Add, configure, and integrate assistant-ui components in React apps. Use when developers ask to add a chat thread, set up a runtime, integrate with AI SDK, configure tools, or build AI chat interfaces with assistant-ui.
npx skillsauth add kvn8888/MultiModalAgentsHackathon assistant-uiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to help users build AI chat interfaces with assistant-ui.
Check if the project has components.json (shadcn config) and @assistant-ui/react installed.
If assistant-ui is not yet set up, run:
npx assistant-ui init --yes
This initializes shadcn and installs the default assistant-ui chat components.
Install components via the shadcn registry:
npx shadcn@latest add "https://r.assistant-ui.com/chat/b/ai-sdk-quick-start/json"
Available component presets:
| Preset | Registry URL |
|--------|-------------|
| AI SDK Quick Start | https://r.assistant-ui.com/chat/b/ai-sdk-quick-start/json |
You can also add individual assistant-ui shadcn components:
npx shadcn@latest add assistant-ui/thread
npx shadcn@latest add assistant-ui/markdown-text
assistant-ui requires a runtime. The most common setup uses AI SDK:
Install the integration package:
npm install @assistant-ui/react-ai-sdk
Create a chat API route (Next.js App Router):
// app/api/chat/route.ts
import { openai } from "@ai-sdk/openai";
import { streamText } from "ai";
export const maxDuration = 30;
export async function POST(req: Request) {
const { messages, config } = await req.json();
const result = streamText({
model: openai("gpt-4o"),
messages,
...config,
});
return result.toDataStreamResponse();
}
Create the assistant component:
"use client";
import { AssistantRuntimeProvider } from "@assistant-ui/react";
import { useChatRuntime } from "@assistant-ui/react-ai-sdk";
import { Thread } from "@/components/assistant-ui/thread";
export const Assistant = () => {
const runtime = useChatRuntime({
api: "/api/chat",
});
return (
<AssistantRuntimeProvider runtime={runtime}>
<Thread />
</AssistantRuntimeProvider>
);
};
To add tool calling support, define tools on the backend and render them on the frontend:
import { streamText, tool } from "ai";
import { z } from "zod";
const result = streamText({
model: openai("gpt-4o"),
messages,
tools: {
get_weather: tool({
description: "Get weather for a location",
parameters: z.object({
location: z.string(),
}),
execute: async ({ location }) => {
return { temperature: 72, condition: "sunny", location };
},
}),
},
});
"use client";
import { makeAssistantToolUI } from "@assistant-ui/react";
export const WeatherToolUI = makeAssistantToolUI({
toolName: "get_weather",
render: ({ args, result }) => {
return (
<div>
<p>Weather for {args?.location}</p>
{result && <p>{result.temperature}F, {result.condition}</p>}
</div>
);
},
});
Register the tool UI in your assistant component:
<AssistantRuntimeProvider runtime={runtime}>
<WeatherToolUI />
<Thread />
</AssistantRuntimeProvider>
| Package | Purpose |
|---------|---------|
| @assistant-ui/react | Core React components and primitives |
| @assistant-ui/react-ai-sdk | Vercel AI SDK integration |
| @assistant-ui/react-markdown | Markdown rendering |
| @assistant-ui/react-syntax-highlighter | Code highlighting |
| @assistant-ui/ui | Pre-built shadcn/ui component set |
| @assistant-ui/styles | Pre-built CSS for non-Tailwind users |
For OpenAI-based setups, ensure OPENAI_API_KEY is set in .env.local.
testing
Search a Senso knowledge base for verified answers, context chunks, or content IDs. Use when the user asks a question that should be grounded in organizational knowledge, says "check Senso", or needs factual answers backed by verified documents.
documentation
Upload files or raw text into a Senso knowledge base. Handles file upload via presigned URLs, raw text/markdown creation, folder targeting, and processing status polling. Use when the user wants to add documents, files, or text content to their Senso KB.
development
the best framework to build agent for claude code.
development
PermitPulse project skill — the living source of truth for this repository. Read this skill at the start of every new session to understand the project, its architecture, tech stack, APIs, file layout, and current feature status. Update this skill whenever features are added, changed, or removed so future LLM sessions never need to re-learn the codebase from scratch.