React chat interfaces with Vercel AI SDK v6, covering hooks, message parts, tool approval workflows, and 18 documented UI error solutions.
Works with
Three core hooks: useChat for conversational AI, useCompletion for text generation, and useObject for structured output streaming
Message content now accessed via .parts array (breaking change from v5) with support for text, tool invocations, files, reasoning, and source citations
Tool approval workflows enable human-in-the-loop confirmation befor
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionai-sdk-uiExecute the skills CLI command in your project's root directory to begin installation:
Fetches ai-sdk-ui from jezweb/claude-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate ai-sdk-ui. Access via /ai-sdk-ui in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
697
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
697
stars
Frontend React hooks for AI-powered user interfaces with Vercel AI SDK v6.
Version: AI SDK v6.0.42 (Stable) Framework: React 18+/19, Next.js 14+/15+ Last Updated: 2026-01-20
Status: Stable Release Latest: [email protected], @ai-sdk/[email protected], @ai-sdk/[email protected] Migration: Minimal breaking changes from v5 → v6
1. Message Parts Structure (Breaking Change)
In v6, message content is now accessed via .parts array instead of .content:
// ❌ v5 (OLD)
{messages.map(m => (
<div key={m.id}>{m.content}</div>
))}
// ✅ v6 (NEW)
{messages.map(m => (
<div key={m.id}>
{m.parts.map((part, i) => {
if (part.type === 'text') return <span key={i}>{part.text}</span>;
if (part.type === 'tool-invocation') return <ToolCall key={i} tool={part} />;
if (part.type === 'file') return <FilePreview key={i} file={part} />;
return null;
})}
</div>
))}
Part Types:
text - Text content with .text propertytool-invocation - Tool calls with .toolName, .args, .resultfile - File attachments with .mimeType, .datareasoning - Model reasoning (when available)source - Source citations3. Agent Integration
Type-safe messaging with agents using InferAgentUIMessage<typeof agent>:
import { useChat } from '@ai-sdk/react';
import type { InferAgentUIMessage } from 'ai';
import { myAgent } from './agent';
export default function AgentChat() {
const { messages, sendMessage } = useChat<InferAgentUIMessage<typeof myAgent>>({
api: '/api/chat',
});
// messages are now type-checked against agent schema
}
4. Tool Approval Workflows (Human-in-the-Loop) Request user confirmation before executing tools:
import { useChat } from '@ai-sdk/react';
import { useState } from 'react';
export default function ChatWithApproval() {
const { messages, sendMessage, addToolApprovalResponse } = useChat({
api: '/api/chat',
});
const handleApprove = (toolCallId: string) => {
addToolApprovalResponse({
toolCallId,
approved: true, // or false to deny
});
};
return (
<div>
{messages.map(message => (
<div key={message.id}>
{message.toolInvocations?.map(tool => (
tool.state === 'awaiting-approval' && (
<div key={tool.toolCallId}>
<p>Approve tool call: {tool.toolName}?</p>
<button onClick={() => handleApprove(tool.toolCallId)}>
Approve
</button>
<button onClick={() => addToolApprovalResponse({
toolCallId: tool.toolCallId,
approved: false
})}>
Deny
</button>
</div>
)
))}
</div>
))}
</div>
);
}
5. Auto-Submit Capability Automatically continue conversation after handling approvals:
import { useChat, lastAssistantMessageIsCompleteWithApprovalResponses } from '@ai-sdk/react';
export default function AutoSubmitChat() {
const { messages, sendMessage } = useChat({
api: '/api/chat',
sendAutomaticallyWhen: lastAssistantMessageIsCompleteWithApprovalResponses,
// Automatically resubmit after all approval responses provided
});
}
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
jezweb/claude-skills
anthropics/claude-code
mblode/agent-skills
github/awesome-copilot
sickn33/antigravity-awesome-skills
leonxlnx/taste-skill
ai-sdk-ui is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Useful defaults in ai-sdk-ui — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
ai-sdk-ui reduced setup friction for our internal harness; good balance of opinion and flexibility.
I recommend ai-sdk-ui for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
I recommend ai-sdk-ui for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
ai-sdk-ui reduced setup friction for our internal harness; good balance of opinion and flexibility.
Solid pick for teams standardizing on skills: ai-sdk-ui is focused, and the summary matches what you get after install.
Keeps context tight: ai-sdk-ui is the kind of skill you can hand to a new teammate without a long onboarding doc.
ai-sdk-ui fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
ai-sdk-ui has been reliable in day-to-day use. Documentation quality is above average for community skills.
showing 1-10 of 45