mcpField
A
ai-sdk-ui-v7

ai-sdk-ui-v7

github.com/blockmaticDevelopment1223 installsUpdated 5w ago
Repository

About ai-sdk-ui-v7

A skill for developers building chat interfaces with `@ai-sdk/react` and `useChat` on AI SDK v7. It covers client-side message handling and streaming UI patterns, while directing backend generation work to ai-sdk-core.

Key features

  1. 01Version-specific useChat guidance
  2. 02DefaultChatTransport configuration
  3. 03Local input and message rendering patterns
  4. 04Streaming UI response guidance
  5. 05Chat UI code templates

Use cases

  1. 01Building a React chat interface
  2. 02Connecting chat to a custom API endpoint
  3. 03Rendering messages with parts and status

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/blockmatic/basilic-skills --skill ai-sdk-ui-v7

After installing, type/ai-sdk-ui-v7in Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

templates/
nextjs-api-route.ts
nextjs-chat-app-router.tsx
use-chat-basic.tsx

Details

From the project README

Skill: ai-sdk-ui

Scope

  • Applies to: @ai-sdk/react useChat and DefaultChatTransport from ai
  • Does NOT cover: Backend generation (see ai-sdk-core)

Assumptions

  • SDK major is ai ^7; @ai-sdk/react is a separate package major. Folder follows ai
  • Never write useChat from memory. Grep node_modules/@ai-sdk/react/docs/ and node_modules/ai/docs/, else https://ai-sdk.dev/docs/ai-sdk-ui/chatbot
  • Chat HTTP may be Fastify; pass transport when the URL is not /api/chat

Principles

  • useChat from @ai-sdk/react; DefaultChatTransport from ai
  • Local input state; sendMessage({ text }); status not isLoading; render message.parts
  • Server: see ai-sdk-core. Handlers use createUIMessageStreamResponse + toUIMessageStream({ stream: result.stream }). Leave deprecated toUIMessageStreamResponse() only when the task is unrelated to streaming or the SDK

Constraints

MUST
  • DefaultChatTransport({ api }) when the endpoint is not /api/chat
  • Disable send while status !== 'ready'
AVOID
  • import { useChat } from 'ai/react'
  • toDataStreamResponse / pipeDataStreamToResponse
  • Pre-v5 handleInputChange / handleSubmit / useAssistant

Interactions

Templates

Comments

Markdown supported