[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6G6ATATC3E06M24SNEG3DQR":3,"skill-same:01M6G6ATATC3E06M24SNEG3DQR":155},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":51,"install":52,"resources":64},"01M6G6ATATC3E06M24SNEG3DQR","ai-sdk-ui",null,"Build React chat interfaces with Vercel AI SDK v6. Covers useChat\u002FuseCompletion\u002FuseObject hooks, message parts structure, tool approval workflows, and 18 UI error solutions. Prevents documented issues with React Strict Mode, concurrent requests, stale closures, and tool approval edge cases.\n\nUse when: implementing AI chat UIs, migrating v5→v6, troubleshooting \"useChat failed to parse stream\", \"stale body values\", \"React maximum update depth\", \"Cannot read properties of undefined (reading 'state')\", or tool approval workflow errors.","kbarbel640-del\u002Fskills","kbarbel640-del","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255315490?v=4","01M6CJPPQGCCESXMG3K7BBGQ5J","01M6CJPPX2PB2BCZERFVM2C2B3",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"ai sdk ui","ui","ai sdk","sdk","vercel","true","errors","reading","error","structure","message","vercel ai sdk","hooks","read","tool","issues","update","react","workflows","workflow","2026-11-10 10:12:30",false,"---\nname: ai-sdk-ui\ndescription: |\n  Build React chat interfaces with Vercel AI SDK v6. Covers useChat\u002FuseCompletion\u002FuseObject hooks, message parts structure, tool approval workflows, and 18 UI error solutions. Prevents documented issues with React Strict Mode, concurrent requests, stale closures, and tool approval edge cases.\n\n  Use when: implementing AI chat UIs, migrating v5→v6, troubleshooting \"useChat failed to parse stream\", \"stale body values\", \"React maximum update depth\", \"Cannot read properties of undefined (reading 'state')\", or tool approval workflow errors.\nuser-invocable: true\n---\n\n# AI SDK UI - Frontend React Hooks\n\nFrontend React hooks for AI-powered user interfaces with Vercel AI SDK v6.\n\n**Version**: AI SDK v6.0.42 (Stable)\n**Framework**: React 18+\u002F19, Next.js 14+\u002F15+\n**Last Updated**: 2026-01-20\n\n---\n\n## AI SDK v6 Stable (January 2026)\n\n**Status:** Stable Release\n**Latest:** ai@6.0.42, @ai-sdk\u002Freact@3.0.44, @ai-sdk\u002Fopenai@3.0.7\n**Migration:** Minimal breaking changes from v5 → v6\n\n### New UI Features in v6\n\n**1. Message Parts Structure (Breaking Change)**\nIn v6, message content is now accessed via `.parts` array instead of `.content`:\n\n```tsx\n\u002F\u002F ❌ v5 (OLD)\n{messages.map(m => (\n  \u003Cdiv key={m.id}>{m.content}\u003C\u002Fdiv>\n))}\n\n\u002F\u002F ✅ v6 (NEW)\n{messages.map(m => (\n  \u003Cdiv key={m.id}>\n    {m.parts.map((part, i) => {\n      if (part.type === 'text') return \u003Cspan key={i}>{part.text}\u003C\u002Fspan>;\n      if (part.type === 'tool-invocation') return \u003CToolCall key={i} tool={part} \u002F>;\n      if (part.type === 'file') return \u003CFilePreview key={i} file={part} \u002F>;\n      return null;\n    })}\n  \u003C\u002Fdiv>\n))}\n```\n\n**Part Types:**\n- `text` - Text content with `.text` property\n- `tool-invocation` - Tool calls with `.toolName`, `.args`, `.result`\n- `file` - File attachments with `.mimeType`, `.data`\n- `reasoning` - Model reasoning (when available)\n- `source` - Source citations\n\n**3. Agent Integration**\nType-safe messaging with agents using `InferAgentUIMessage\u003Ctypeof agent>`:\n\n```tsx\nimport { useChat } from '@ai-sdk\u002Freact';\nimport type { InferAgentUIMessage } from 'ai';\nimport { myAgent } from '.\u002Fagent';\n\nexport default function AgentChat() {\n  const { messages, sendMessage } = useChat\u003CInferAgentUIMessage\u003Ctypeof myAgent>>({\n    api: '\u002Fapi\u002Fchat',\n  });\n  \u002F\u002F messages are now type-checked against agent schema\n}\n```\n\n**4. Tool Approval Workflows (Human-in-the-Loop)**\nRequest user confirmation before executing tools:\n\n```tsx\nimport { useChat } from '@ai-sdk\u002Freact';\nimport { useState } from 'react';\n\nexport default function ChatWithApproval() {\n  const { messages, sendMessage, addToolApprovalResponse } = useChat({\n    api: '\u002Fapi\u002Fchat',\n  });\n\n  const handleApprove = (toolCallId: string) => {\n    addToolApprovalResponse({\n      toolCallId,\n      approved: true,  \u002F\u002F or false to deny\n    });\n  };\n\n  return (\n    \u003Cdiv>\n      {messages.map(message => (\n        \u003Cdiv key={message.id}>\n          {message.toolInvocations?.map(tool => (\n            tool.state === 'awaiting-approval' && (\n              \u003Cdiv key={tool.toolCallId}>\n                \u003Cp>Approve tool call: {tool.toolName}?\u003C\u002Fp>\n                \u003Cbutton onClick={() => handleApprove(tool.toolCallId)}>\n                  Approve\n                \u003C\u002Fbutton>\n                \u003Cbutton onClick={() => addToolApprovalResponse({\n                  toolCallId: tool.toolCallId,\n                  approved: false\n                })}>\n                  Deny\n                \u003C\u002Fbutton>\n              \u003C\u002Fdiv>\n            )\n          ))}\n        \u003C\u002Fdiv>\n      ))}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n**5. Auto-Submit Capability**\nAutomatically continue conversation after handling approvals:\n\n```tsx\nimport { useChat, lastAssistantMessageIsCompleteWithApprovalResponses } from '@ai-sdk\u002Freact';\n\nexport default function AutoSubmitChat() {\n  const { messages, sendMessage } = useChat({\n    api: '\u002Fapi\u002Fchat',\n    sendAutomaticallyWhen: lastAssistantMessageIsCompleteWithApprovalResponses,\n    \u002F\u002F Automatically resubmit after all approval responses provided\n  });\n}\n```\n\n**6. Structured Output in Chat**\nGenerate structured data alongside tool calling (previously only available in `useObject`):\n\n```tsx\nimport { useChat } from '@ai-sdk\u002Freact';\nimport { z } from 'zod';\n\nconst schema = z.object({\n  summary: z.string(),\n  sentiment: z.enum(['positive', 'neutral', 'negative']),\n});\n\nexport default function StructuredChat() {\n  const { messages, sendMessage } = useChat({\n    api: '\u002Fapi\u002Fchat',\n    \u002F\u002F Server can now stream structured output with chat messages\n  });\n}\n```\n\n---\n\n## useChat Hook - v4 → v5 Breaking Changes\n\n**CRITICAL: useChat no longer manages input state in v5!**\n\n**v4 (OLD - DON'T USE):**\n```tsx\nconst { messages, input, handleInputChange, handleSubmit, append } = useChat();\n\n\u003Cform onSubmit={handleSubmit}>\n  \u003Cinput value={input} onChange={handleInputChange} \u002F>\n\u003C\u002Fform>\n```\n\n**v5 (NEW - CORRECT):**\n```tsx\nconst { messages, sendMessage } = useChat();\nconst [input, setInput] = useState('');\n\n\u003Cform onSubmit={(e) => {\n  e.preventDefault();\n  sendMessage({ content: input });\n  setInput('');\n}}>\n  \u003Cinput value={input} onChange={(e) => setInput(e.target.value)} \u002F>\n\u003C\u002Fform>\n```\n\n**Summary of v5 Changes:**\n1. **Input management removed**: `input`, `handleInputChange`, `handleSubmit` no longer exist\n2. **`append()` → `sendMessage()`**: New method for sending messages\n3. **`onResponse` removed**: Use `onFinish` instead\n4. **`initialMessages` → controlled mode**: Use `messages` prop for full control\n5. **`maxSteps` removed**: Handle on server-side only\n\nSee `references\u002Fuse-chat-migration.md` for complete migration guide.\n\n---\n\n## useAssistant Hook (Deprecated)\n\n> **⚠️ Deprecation Notice**: `useAssistant` is deprecated as of AI SDK v5. OpenAI Assistants API v2\n> will sunset on August 26, 2026. For new projects, use `useChat` with custom backend logic instead.\n> See the **openai-assistants** skill for migration guidance.\n\nInteract with OpenAI-compatible assistant APIs with automatic UI state management.\n\n**Import:**\n```tsx\nimport { useAssistant } from '@ai-sdk\u002Freact';\n```\n\n**Basic Usage:**\n```tsx\n'use client';\nimport { useAssistant } from '@ai-sdk\u002Freact';\nimport { useState, FormEvent } from 'react';\n\nexport default function AssistantChat() {\n  const { messages, sendMessage, isLoading, error } = useAssistant({\n    api: '\u002Fapi\u002Fassistant',\n  });\n  const [input, setInput] = useState('');\n\n  const handleSubmit = (e: FormEvent) => {\n    e.preventDefault();\n    sendMessage({ content: input });\n    setInput('');\n  };\n\n  return (\n    \u003Cdiv>\n      {messages.map(m => (\n        \u003Cdiv key={m.id}>\n          \u003Cstrong>{m.role}:\u003C\u002Fstrong> {m.content}\n        \u003C\u002Fdiv>\n      ))}\n      \u003Cform onSubmit={handleSubmit}>\n        \u003Cinput\n          value={input}\n          onChange={(e) => setInput(e.target.value)}\n          disabled={isLoading}\n        \u002F>\n      \u003C\u002Fform>\n      {error && \u003Cdiv>{error.message}\u003C\u002Fdiv>}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n**Use Cases:**\n- Building OpenAI Assistant-powered UIs\n- Managing assistant threads and runs\n- Streaming assistant responses with UI state management\n- File search and code interpreter integrations\n\nSee official docs for complete API reference: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Freference\u002Fai-sdk-ui\u002Fuse-assistant\n\n---\n\n## Top UI Errors & Solutions\n\nSee `references\u002Ftop-ui-errors.md` for complete documentation. Quick reference:\n\n### 1. useChat Failed to Parse Stream\n\n**Error**: `SyntaxError: Unexpected token in JSON at position X`\n\n**Cause**: API route not returning proper stream format.\n\n**Solution**:\n```typescript\n\u002F\u002F ✅ CORRECT\nreturn result.toDataStreamResponse();\n\n\u002F\u002F ❌ WRONG\nreturn new Response(result.textStream);\n```\n\n### 2. useChat No Response\n\n**Cause**: API route not streaming correctly.\n\n**Solution**:\n```typescript\n\u002F\u002F App Router - use toDataStreamResponse()\nexport async function POST(req: Request) {\n  const result = streamText({ \u002F* ... *\u002F });\n  return result.toDataStreamResponse(); \u002F\u002F ✅\n}\n\n\u002F\u002F Pages Router - use pipeDataStreamToResponse()\nexport default async function handler(req, res) {\n  const result = streamText({ \u002F* ... *\u002F });\n  return result.pipeDataStreamToResponse(res); \u002F\u002F ✅\n}\n```\n\n### 3. Streaming Not Working When Deployed\n\n**Cause**: Deployment platform buffering responses.\n\n**Solution**: Vercel auto-detects streaming. Other platforms may need configuration.\n\n### 4. Stale Body Values with useChat\n\n**Cause**: `body` option captured at first render only.\n\n**Solution**:\n```typescript\n\u002F\u002F ❌ WRONG - body captured once\nconst { userId } = useUser();\nconst { messages } = useChat({\n  body: { userId },  \u002F\u002F Stale!\n});\n\n\u002F\u002F ✅ CORRECT - use controlled mode\nconst { userId } = useUser();\nconst { messages, sendMessage } = useChat();\n\nsendMessage({\n  content: input,\n  data: { userId },  \u002F\u002F Fresh on each send\n});\n```\n\n### 5. React Maximum Update Depth\n\n**Cause**: Infinite loop in useEffect.\n\n**Solution**:\n```typescript\n\u002F\u002F ❌ WRONG\nuseEffect(() => {\n  saveMessages(messages);\n}, [messages, saveMessages]); \u002F\u002F saveMessages triggers re-render!\n\n\u002F\u002F ✅ CORRECT\nuseEffect(() => {\n  saveMessages(messages);\n}, [messages]); \u002F\u002F Only depend on messages\n```\n\nSee `references\u002Ftop-ui-errors.md` for 13 more common errors (18 total documented).\n\n---\n\n## Streaming Best Practices\n\n### Performance\n\n**Always use streaming for better UX:**\n```tsx\n\u002F\u002F ✅ GOOD - Streaming (shows tokens as they arrive)\nconst { messages } = useChat({ api: '\u002Fapi\u002Fchat' });\n\n\u002F\u002F ❌ BAD - Non-streaming (user waits for full response)\nconst response = await fetch('\u002Fapi\u002Fchat', { method: 'POST' });\n```\n\n### UX Patterns\n\n**Show loading states:**\n```tsx\n{isLoading && \u003Cdiv>AI is typing...\u003C\u002Fdiv>}\n```\n\n**Provide stop button:**\n```tsx\n{isLoading && \u003Cbutton onClick={stop}>Stop\u003C\u002Fbutton>}\n```\n\n**Auto-scroll to latest message:**\n```tsx\nuseEffect(() => {\n  messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' });\n}, [messages]);\n```\n\n**Disable input while loading:**\n```tsx\n\u003Cinput disabled={isLoading} \u002F>\n```\n\nSee `references\u002Fstreaming-patterns.md` for comprehensive best practices.\n\n---\n\n## React Strict Mode Considerations\n\nReact Strict Mode intentionally double-invokes effects to catch bugs. When using `useChat` or `useCompletion` in effects (auto-resume, initial messages), guard against double execution to prevent duplicate API calls and token waste.\n\n**Problem:**\n```tsx\n'use client';\nimport { useChat } from '@ai-sdk\u002Freact';\nimport { useEffect } from 'react';\n\nexport default function Chat() {\n  const { messages, sendMessage, resumeStream } = useChat({\n    api: '\u002Fapi\u002Fchat',\n    resume: true,\n  });\n\n  useEffect(() => {\n    \u002F\u002F ❌ Triggers twice in strict mode → two concurrent streams\n    sendMessage({ content: 'Hello' });\n    \u002F\u002F or\n    resumeStream();\n  }, []);\n}\n```\n\n**Solution:**\n```tsx\n\u002F\u002F ✅ Use ref to track execution\nimport { useRef } from 'react';\n\nconst hasSentRef = useRef(false);\n\nuseEffect(() => {\n  if (hasSentRef.current) return;\n  hasSentRef.current = true;\n\n  sendMessage({ content: 'Hello' });\n}, []);\n\n\u002F\u002F For resumeStream specifically:\nconst hasResumedRef = useRef(false);\n\nuseEffect(() => {\n  if (!autoResume || hasResumedRef.current || status === 'streaming') return;\n  hasResumedRef.current = true;\n  resumeStream();\n}, [autoResume, resumeStream, status]);\n```\n\n**Why It Happens:** React Strict Mode double-invokes effects to surface side effects. The SDK doesn't guard against concurrent requests, so both invocations create separate streams that fight for state updates.\n\n**Impact:** Duplicate messages, doubled token usage, race conditions causing TypeError: \"Cannot read properties of undefined (reading 'state')\".\n\n**Source:** [GitHub Issue #7891](https:\u002F\u002Fgithub.com\u002Fvercel\u002Fai\u002Fissues\u002F7891), [Issue #6166](https:\u002F\u002Fgithub.com\u002Fvercel\u002Fai\u002Fissues\u002F6166)\n\n---\n\n## When to Use This Skill\n\n### Use ai-sdk-ui When:\n- Building React chat interfaces\n- Implementing AI completions in UI\n- Streaming AI responses to frontend\n- Building Next.js AI applications\n- Handling chat message state\n- Displaying tool calls in UI\n- Managing file attachments with AI\n- Migrating from v4 to v5 (UI hooks)\n- Encountering useChat\u002FuseCompletion errors\n\n### Don't Use When:\n- Need backend AI functionality → Use **ai-sdk-core** instead\n- Building non-React frontends (Svelte, Vue) → Check official docs\n- Need Generative UI \u002F RSC → See https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-rsc\n- Building native apps → Different SDK required\n\n### Related Skills:\n- **ai-sdk-core** - Backend text generation, structured output, tools, agents\n- Compose both for full-stack AI applications\n\n---\n\n## Package Versions\n\n**Stable (v6 - Recommended):**\n```json\n{\n  \"dependencies\": {\n    \"ai\": \"^6.0.8\",\n    \"@ai-sdk\u002Freact\": \"^3.0.6\",\n    \"@ai-sdk\u002Fopenai\": \"^3.0.2\",\n    \"react\": \"^18.3.0\",\n    \"zod\": \"^3.24.2\"\n  }\n}\n```\n\n**Legacy (v5):**\n```json\n{\n  \"dependencies\": {\n    \"ai\": \"^5.0.99\",\n    \"@ai-sdk\u002Freact\": \"^1.0.0\",\n    \"@ai-sdk\u002Fopenai\": \"^2.0.68\"\n  }\n}\n```\n\n**Version Notes:**\n- AI SDK v6.0.6 (stable, Jan 2026) - recommended for new projects\n- AI SDK v5.x (legacy) - still supported but not receiving new features\n- React 18.3+ \u002F React 19 supported\n- Next.js 14+\u002F15+ recommended\n- Zod 3.24.2+ for schema validation\n\n---\n\n## Links to Official Documentation\n\n**Core UI Hooks:**\n- AI SDK UI Overview: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-ui\u002Foverview\n- useChat: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-ui\u002Fchatbot\n- useCompletion: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-ui\u002Fcompletion\n- useObject: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-ui\u002Fobject-generation\n\n**Advanced Topics (Link Only):**\n- Generative UI (RSC): https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-rsc\u002Foverview\n- Stream Protocols: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-ui\u002Fstream-protocols\n- Message Metadata: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-ui\u002Fmessage-metadata\n\n**Next.js Integration:**\n- Next.js App Router: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fgetting-started\u002Fnextjs-app-router\n- Next.js Pages Router: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fgetting-started\u002Fnextjs-pages-router\n\n**Migration & Troubleshooting:**\n- v4→v5 Migration: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fmigration-guides\u002Fmigration-guide-5-0\n- Troubleshooting: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Ftroubleshooting\n- Common Issues: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Ftroubleshooting\u002Fcommon-issues\n\n**Vercel Deployment:**\n- Vercel Functions: https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions\n- Streaming on Vercel: https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions\u002Fstreaming\n\n---\n\n## Templates\n\nThis skill includes the following templates in `templates\u002F`:\n\n1. **use-chat-basic.tsx** - Basic chat with manual input (v5 pattern)\n2. **use-chat-tools.tsx** - Chat with tool calling UI rendering\n3. **use-chat-attachments.tsx** - File attachments support\n4. **use-completion-basic.tsx** - Basic text completion\n5. **use-object-streaming.tsx** - Streaming structured data\n6. **nextjs-chat-app-router.tsx** - Next.js App Router complete example\n7. **nextjs-chat-pages-router.tsx** - Next.js Pages Router complete example\n8. **nextjs-api-route.ts** - API route for both App and Pages Router\n9. **message-persistence.tsx** - Save\u002Fload chat history\n10. **custom-message-renderer.tsx** - Custom message components with markdown\n11. **package.json** - Dependencies template\n\n## Reference Documents\n\nSee `references\u002F` for:\n\n- **use-chat-migration.md** - Complete v4→v5 migration guide\n- **streaming-patterns.md** - UI streaming best practices\n- **top-ui-errors.md** - 18 common UI errors with solutions\n- **nextjs-integration.md** - Next.js setup patterns\n- **links-to-official-docs.md** - Organized links to official docs\n\n---\n\n**Production Tested**: WordPress Auditor (https:\u002F\u002Fwordpress-auditor.webfonts.workers.dev)\n**Last verified**: 2026-01-20 | **Skill version**: 3.1.0 | **Changes**: Updated to AI SDK v6.0.42 (+19 patches). Added React Strict Mode section. Expanded Issue #7 (stale body) with 3 workarounds. Added 6 new issues: TypeError with resume+onFinish (#13), concurrent sendMessage state corruption (#14), tool approval callback edge case (#15), ZodError on early stop (#16), convertToModelMessages tool approval bug (#17), undefined id infinite loop (#18). Error count: 12→18.\n","# AI SDK UI - Frontend React Hooks\n\nFrontend React hooks for AI-powered user interfaces with Vercel AI SDK v6.\n\n**Version**: AI SDK v6.0.42 (Stable)\n**Framework**: React 18+\u002F19, Next.js 14+\u002F15+\n**Last Updated**: 2026-01-20\n\n---\n\n## AI SDK v6 Stable (January 2026)\n\n**Status:** Stable Release\n**Latest:** ai@6.0.42, @ai-sdk\u002Freact@3.0.44, @ai-sdk\u002Fopenai@3.0.7\n**Migration:** Minimal breaking changes from v5 → v6\n\n### New UI Features in v6\n\n**1. Message Parts Structure (Breaking Change)**\nIn v6, message content is now accessed via `.parts` array instead of `.content`:\n\n```tsx\n\u002F\u002F ❌ v5 (OLD)\n{messages.map(m => (\n  \u003Cdiv key={m.id}>{m.content}\u003C\u002Fdiv>\n))}\n\n\u002F\u002F ✅ v6 (NEW)\n{messages.map(m => (\n  \u003Cdiv key={m.id}>\n    {m.parts.map((part, i) => {\n      if (part.type === 'text') return \u003Cspan key={i}>{part.text}\u003C\u002Fspan>;\n      if (part.type === 'tool-invocation') return \u003CToolCall key={i} tool={part} \u002F>;\n      if (part.type === 'file') return \u003CFilePreview key={i} file={part} \u002F>;\n      return null;\n    })}\n  \u003C\u002Fdiv>\n))}\n```\n\n**Part Types:**\n- `text` - Text content with `.text` property\n- `tool-invocation` - Tool calls with `.toolName`, `.args`, `.result`\n- `file` - File attachments with `.mimeType`, `.data`\n- `reasoning` - Model reasoning (when available)\n- `source` - Source citations\n\n**3. Agent Integration**\nType-safe messaging with agents using `InferAgentUIMessage\u003Ctypeof agent>`:\n\n```tsx\nimport { useChat } from '@ai-sdk\u002Freact';\nimport type { InferAgentUIMessage } from 'ai';\nimport { myAgent } from '.\u002Fagent';\n\nexport default function AgentChat() {\n  const { messages, sendMessage } = useChat\u003CInferAgentUIMessage\u003Ctypeof myAgent>>({\n    api: '\u002Fapi\u002Fchat',\n  });\n  \u002F\u002F messages are now type-checked against agent schema\n}\n```\n\n**4. Tool Approval Workflows (Human-in-the-Loop)**\nRequest user confirmation before executing tools:\n\n```tsx\nimport { useChat } from '@ai-sdk\u002Freact';\nimport { useState } from 'react';\n\nexport default function ChatWithApproval() {\n  const { messages, sendMessage, addToolApprovalResponse } = useChat({\n    api: '\u002Fapi\u002Fchat',\n  });\n\n  const handleApprove = (toolCallId: string) => {\n    addToolApprovalResponse({\n      toolCallId,\n      approved: true,  \u002F\u002F or false to deny\n    });\n  };\n\n  return (\n    \u003Cdiv>\n      {messages.map(message => (\n        \u003Cdiv key={message.id}>\n          {message.toolInvocations?.map(tool => (\n            tool.state === 'awaiting-approval' && (\n              \u003Cdiv key={tool.toolCallId}>\n                \u003Cp>Approve tool call: {tool.toolName}?\u003C\u002Fp>\n                \u003Cbutton onClick={() => handleApprove(tool.toolCallId)}>\n                  Approve\n                \u003C\u002Fbutton>\n                \u003Cbutton onClick={() => addToolApprovalResponse({\n                  toolCallId: tool.toolCallId,\n                  approved: false\n                })}>\n                  Deny\n                \u003C\u002Fbutton>\n              \u003C\u002Fdiv>\n            )\n          ))}\n        \u003C\u002Fdiv>\n      ))}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n**5. Auto-Submit Capability**\nAutomatically continue conversation after handling approvals:\n\n```tsx\nimport { useChat, lastAssistantMessageIsCompleteWithApprovalResponses } from '@ai-sdk\u002Freact';\n\nexport default function AutoSubmitChat() {\n  const { messages, sendMessage } = useChat({\n    api: '\u002Fapi\u002Fchat',\n    sendAutomaticallyWhen: lastAssistantMessageIsCompleteWithApprovalResponses,\n    \u002F\u002F Automatically resubmit after all approval responses provided\n  });\n}\n```\n\n**6. Structured Output in Chat**\nGenerate structured data alongside tool calling (previously only available in `useObject`):\n\n```tsx\nimport { useChat } from '@ai-sdk\u002Freact';\nimport { z } from 'zod';\n\nconst schema = z.object({\n  summary: z.string(),\n  sentiment: z.enum(['positive', 'neutral', 'negative']),\n});\n\nexport default function StructuredChat() {\n  const { messages, sendMessage } = useChat({\n    api: '\u002Fapi\u002Fchat',\n    \u002F\u002F Server can now stream structured output with chat messages\n  });\n}\n```\n\n---\n\n## useChat Hook - v4 → v5 Breaking Changes\n\n**CRITICAL: useChat no longer manages input state in v5!**\n\n**v4 (OLD - DON'T USE):**\n```tsx\nconst { messages, input, handleInputChange, handleSubmit, append } = useChat();\n\n\u003Cform onSubmit={handleSubmit}>\n  \u003Cinput value={input} onChange={handleInputChange} \u002F>\n\u003C\u002Fform>\n```\n\n**v5 (NEW - CORRECT):**\n```tsx\nconst { messages, sendMessage } = useChat();\nconst [input, setInput] = useState('');\n\n\u003Cform onSubmit={(e) => {\n  e.preventDefault();\n  sendMessage({ content: input });\n  setInput('');\n}}>\n  \u003Cinput value={input} onChange={(e) => setInput(e.target.value)} \u002F>\n\u003C\u002Fform>\n```\n\n**Summary of v5 Changes:**\n1. **Input management removed**: `input`, `handleInputChange`, `handleSubmit` no longer exist\n2. **`append()` → `sendMessage()`**: New method for sending messages\n3. **`onResponse` removed**: Use `onFinish` instead\n4. **`initialMessages` → controlled mode**: Use `messages` prop for full control\n5. **`maxSteps` removed**: Handle on server-side only\n\nSee `references\u002Fuse-chat-migration.md` for complete migration guide.\n\n---\n\n## useAssistant Hook (Deprecated)\n\n> **⚠️ Deprecation Notice**: `useAssistant` is deprecated as of AI SDK v5. OpenAI Assistants API v2\n> will sunset on August 26, 2026. For new projects, use `useChat` with custom backend logic instead.\n> See the **openai-assistants** skill for migration guidance.\n\nInteract with OpenAI-compatible assistant APIs with automatic UI state management.\n\n**Import:**\n```tsx\nimport { useAssistant } from '@ai-sdk\u002Freact';\n```\n\n**Basic Usage:**\n```tsx\n'use client';\nimport { useAssistant } from '@ai-sdk\u002Freact';\nimport { useState, FormEvent } from 'react';\n\nexport default function AssistantChat() {\n  const { messages, sendMessage, isLoading, error } = useAssistant({\n    api: '\u002Fapi\u002Fassistant',\n  });\n  const [input, setInput] = useState('');\n\n  const handleSubmit = (e: FormEvent) => {\n    e.preventDefault();\n    sendMessage({ content: input });\n    setInput('');\n  };\n\n  return (\n    \u003Cdiv>\n      {messages.map(m => (\n        \u003Cdiv key={m.id}>\n          \u003Cstrong>{m.role}:\u003C\u002Fstrong> {m.content}\n        \u003C\u002Fdiv>\n      ))}\n      \u003Cform onSubmit={handleSubmit}>\n        \u003Cinput\n          value={input}\n          onChange={(e) => setInput(e.target.value)}\n          disabled={isLoading}\n        \u002F>\n      \u003C\u002Fform>\n      {error && \u003Cdiv>{error.message}\u003C\u002Fdiv>}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n**Use Cases:**\n- Building OpenAI Assistant-powered UIs\n- Managing assistant threads and runs\n- Streaming assistant responses with UI state management\n- File search and code interpreter integrations\n\nSee official docs for complete API reference: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Freference\u002Fai-sdk-ui\u002Fuse-assistant\n\n---\n\n## Top UI Errors & Solutions\n\nSee `references\u002Ftop-ui-errors.md` for complete documentation. Quick reference:\n\n### 1. useChat Failed to Parse Stream\n\n**Error**: `SyntaxError: Unexpected token in JSON at position X`\n\n**Cause**: API route not returning proper stream format.\n\n**Solution**:\n```typescript\n\u002F\u002F ✅ CORRECT\nreturn result.toDataStreamResponse();\n\n\u002F\u002F ❌ WRONG\nreturn new Response(result.textStream);\n```\n\n### 2. useChat No Response\n\n**Cause**: API route not streaming correctly.\n\n**Solution**:\n```typescript\n\u002F\u002F App Router - use toDataStreamResponse()\nexport async function POST(req: Request) {\n  const result = streamText({ \u002F* ... *\u002F });\n  return result.toDataStreamResponse(); \u002F\u002F ✅\n}\n\n\u002F\u002F Pages Router - use pipeDataStreamToResponse()\nexport default async function handler(req, res) {\n  const result = streamText({ \u002F* ... *\u002F });\n  return result.pipeDataStreamToResponse(res); \u002F\u002F ✅\n}\n```\n\n### 3. Streaming Not Working When Deployed\n\n**Cause**: Deployment platform buffering responses.\n\n**Solution**: Vercel auto-detects streaming. Other platforms may need configuration.\n\n### 4. Stale Body Values with useChat\n\n**Cause**: `body` option captured at first render only.\n\n**Solution**:\n```typescript\n\u002F\u002F ❌ WRONG - body captured once\nconst { userId } = useUser();\nconst { messages } = useChat({\n  body: { userId },  \u002F\u002F Stale!\n});\n\n\u002F\u002F ✅ CORRECT - use controlled mode\nconst { userId } = useUser();\nconst { messages, sendMessage } = useChat();\n\nsendMessage({\n  content: input,\n  data: { userId },  \u002F\u002F Fresh on each send\n});\n```\n\n### 5. React Maximum Update Depth\n\n**Cause**: Infinite loop in useEffect.\n\n**Solution**:\n```typescript\n\u002F\u002F ❌ WRONG\nuseEffect(() => {\n  saveMessages(messages);\n}, [messages, saveMessages]); \u002F\u002F saveMessages triggers re-render!\n\n\u002F\u002F ✅ CORRECT\nuseEffect(() => {\n  saveMessages(messages);\n}, [messages]); \u002F\u002F Only depend on messages\n```\n\nSee `references\u002Ftop-ui-errors.md` for 13 more common errors (18 total documented).\n\n---\n\n## Streaming Best Practices\n\n### Performance\n\n**Always use streaming for better UX:**\n```tsx\n\u002F\u002F ✅ GOOD - Streaming (shows tokens as they arrive)\nconst { messages } = useChat({ api: '\u002Fapi\u002Fchat' });\n\n\u002F\u002F ❌ BAD - Non-streaming (user waits for full response)\nconst response = await fetch('\u002Fapi\u002Fchat', { method: 'POST' });\n```\n\n### UX Patterns\n\n**Show loading states:**\n```tsx\n{isLoading && \u003Cdiv>AI is typing...\u003C\u002Fdiv>}\n```\n\n**Provide stop button:**\n```tsx\n{isLoading && \u003Cbutton onClick={stop}>Stop\u003C\u002Fbutton>}\n```\n\n**Auto-scroll to latest message:**\n```tsx\nuseEffect(() => {\n  messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' });\n}, [messages]);\n```\n\n**Disable input while loading:**\n```tsx\n\u003Cinput disabled={isLoading} \u002F>\n```\n\nSee `references\u002Fstreaming-patterns.md` for comprehensive best practices.\n\n---\n\n## React Strict Mode Considerations\n\nReact Strict Mode intentionally double-invokes effects to catch bugs. When using `useChat` or `useCompletion` in effects (auto-resume, initial messages), guard against double execution to prevent duplicate API calls and token waste.\n\n**Problem:**\n```tsx\n'use client';\nimport { useChat } from '@ai-sdk\u002Freact';\nimport { useEffect } from 'react';\n\nexport default function Chat() {\n  const { messages, sendMessage, resumeStream } = useChat({\n    api: '\u002Fapi\u002Fchat',\n    resume: true,\n  });\n\n  useEffect(() => {\n    \u002F\u002F ❌ Triggers twice in strict mode → two concurrent streams\n    sendMessage({ content: 'Hello' });\n    \u002F\u002F or\n    resumeStream();\n  }, []);\n}\n```\n\n**Solution:**\n```tsx\n\u002F\u002F ✅ Use ref to track execution\nimport { useRef } from 'react';\n\nconst hasSentRef = useRef(false);\n\nuseEffect(() => {\n  if (hasSentRef.current) return;\n  hasSentRef.current = true;\n\n  sendMessage({ content: 'Hello' });\n}, []);\n\n\u002F\u002F For resumeStream specifically:\nconst hasResumedRef = useRef(false);\n\nuseEffect(() => {\n  if (!autoResume || hasResumedRef.current || status === 'streaming') return;\n  hasResumedRef.current = true;\n  resumeStream();\n}, [autoResume, resumeStream, status]);\n```\n\n**Why It Happens:** React Strict Mode double-invokes effects to surface side effects. The SDK doesn't guard against concurrent requests, so both invocations create separate streams that fight for state updates.\n\n**Impact:** Duplicate messages, doubled token usage, race conditions causing TypeError: \"Cannot read properties of undefined (reading 'state')\".\n\n**Source:** [GitHub Issue #7891](https:\u002F\u002Fgithub.com\u002Fvercel\u002Fai\u002Fissues\u002F7891), [Issue #6166](https:\u002F\u002Fgithub.com\u002Fvercel\u002Fai\u002Fissues\u002F6166)\n\n---\n\n## When to Use This Skill\n\n### Use ai-sdk-ui When:\n- Building React chat interfaces\n- Implementing AI completions in UI\n- Streaming AI responses to frontend\n- Building Next.js AI applications\n- Handling chat message state\n- Displaying tool calls in UI\n- Managing file attachments with AI\n- Migrating from v4 to v5 (UI hooks)\n- Encountering useChat\u002FuseCompletion errors\n\n### Don't Use When:\n- Need backend AI functionality → Use **ai-sdk-core** instead\n- Building non-React frontends (Svelte, Vue) → Check official docs\n- Need Generative UI \u002F RSC → See https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-rsc\n- Building native apps → Different SDK required\n\n### Related Skills:\n- **ai-sdk-core** - Backend text generation, structured output, tools, agents\n- Compose both for full-stack AI applications\n\n---\n\n## Package Versions\n\n**Stable (v6 - Recommended):**\n```json\n{\n  \"dependencies\": {\n    \"ai\": \"^6.0.8\",\n    \"@ai-sdk\u002Freact\": \"^3.0.6\",\n    \"@ai-sdk\u002Fopenai\": \"^3.0.2\",\n    \"react\": \"^18.3.0\",\n    \"zod\": \"^3.24.2\"\n  }\n}\n```\n\n**Legacy (v5):**\n```json\n{\n  \"dependencies\": {\n    \"ai\": \"^5.0.99\",\n    \"@ai-sdk\u002Freact\": \"^1.0.0\",\n    \"@ai-sdk\u002Fopenai\": \"^2.0.68\"\n  }\n}\n```\n\n**Version Notes:**\n- AI SDK v6.0.6 (stable, Jan 2026) - recommended for new projects\n- AI SDK v5.x (legacy) - still supported but not receiving new features\n- React 18.3+ \u002F React 19 supported\n- Next.js 14+\u002F15+ recommended\n- Zod 3.24.2+ for schema validation\n\n---\n\n## Links to Official Documentation\n\n**Core UI Hooks:**\n- AI SDK UI Overview: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-ui\u002Foverview\n- useChat: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-ui\u002Fchatbot\n- useCompletion: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-ui\u002Fcompletion\n- useObject: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-ui\u002Fobject-generation\n\n**Advanced Topics (Link Only):**\n- Generative UI (RSC): https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-rsc\u002Foverview\n- Stream Protocols: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-ui\u002Fstream-protocols\n- Message Metadata: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fai-sdk-ui\u002Fmessage-metadata\n\n**Next.js Integration:**\n- Next.js App Router: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fgetting-started\u002Fnextjs-app-router\n- Next.js Pages Router: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fgetting-started\u002Fnextjs-pages-router\n\n**Migration & Troubleshooting:**\n- v4→v5 Migration: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fmigration-guides\u002Fmigration-guide-5-0\n- Troubleshooting: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Ftroubleshooting\n- Common Issues: https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Ftroubleshooting\u002Fcommon-issues\n\n**Vercel Deployment:**\n- Vercel Functions: https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions\n- Streaming on Vercel: https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions\u002Fstreaming\n\n---\n\n## Templates\n\nThis skill includes the following templates in `templates\u002F`:\n\n1. **use-chat-basic.tsx** - Basic chat with manual input (v5 pattern)\n2. **use-chat-tools.tsx** - Chat with tool calling UI rendering\n3. **use-chat-attachments.tsx** - File attachments support\n4. **use-completion-basic.tsx** - Basic text completion\n5. **use-object-streaming.tsx** - Streaming structured data\n6. **nextjs-chat-app-router.tsx** - Next.js App Router complete example\n7. **nextjs-chat-pages-router.tsx** - Next.js Pages Router complete example\n8. **nextjs-api-route.ts** - API route for both App and Pages Router\n9. **message-persistence.tsx** - Save\u002Fload chat history\n10. **custom-message-renderer.tsx** - Custom message components with markdown\n11. **package.json** - Dependencies template\n\n## Reference Documents\n\nSee `references\u002F` for:\n\n- **use-chat-migration.md** - Complete v4→v5 migration guide\n- **streaming-patterns.md** - UI streaming best practices\n- **top-ui-errors.md** - 18 common UI errors with solutions\n- **nextjs-integration.md** - Next.js setup patterns\n- **links-to-official-docs.md** - Organized links to official docs\n\n---\n\n**Production Tested**: WordPress Auditor (https:\u002F\u002Fwordpress-auditor.webfonts.workers.dev)\n**Last verified**: 2026-01-20 | **Skill version**: 3.1.0 | **Changes**: Updated to AI SDK v6.0.42 (+19 patches). Added React Strict Mode section. Expanded Issue #7 (stale body) with 3 workarounds. Added 6 new issues: TypeError with resume+onFinish (#13), concurrent sendMessage state corruption (#14), tool approval callback edge case (#15), ZodError on early stop (#16), convertToModelMessages tool approval bug (#17), undefined id infinite loop (#18). Error count: 12→18.\n",{"name":5,"description":43,"user-invocable":44},"Build React chat interfaces with Vercel AI SDK v6. Covers useChat\u002FuseCompletion\u002FuseObject hooks, message parts structure, tool approval workflows, and 18 UI error solutions. Prevents documented issues with React Strict Mode, concurrent requests, stale closures, and tool approval edge cases.\n\nUse when: implementing AI chat UIs, migrating v5→v6, troubleshooting \"useChat failed to parse stream\", \"stale body values\", \"React maximum update depth\", \"Cannot read properties of undefined (reading 'state')\", or tool approval workflow errors.\n",true,"main","e7e336ac628c3e3bd771aff1aaa469c93778f94a","skills\u002Fveeramanikandanr48\u002Fai-sdk-ui",0,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del","2026-08-23 22:39:37",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":44},[54,57,60],{"tool":55,"command":56},"npx","npx skills add kbarbel640-del\u002Fskills --skill ai-sdk-ui",{"tool":58,"command":59},"bunx","bunx skills add kbarbel640-del\u002Fskills --skill ai-sdk-ui",{"tool":61,"command":62},"pnpm","pnpm dlx skills add kbarbel640-del\u002Fskills --skill ai-sdk-ui","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002FSKILL.md",[65,71,75,79,83,87,91,95,99,103,109,115,119,123,127,131,135,139,143,147,151],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"_meta.json","REFERENCE","参考文档",282,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002F_meta.json",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},".claude-plugin\u002Fplugin.json",762,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002F.claude-plugin\u002Fplugin.json",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"README.md",8733,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002FREADME.md",{"path":80,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Flinks-to-official-docs.md",3471,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Freferences\u002Flinks-to-official-docs.md",{"path":84,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Fnextjs-integration.md",4922,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Freferences\u002Fnextjs-integration.md",{"path":88,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fstreaming-patterns.md",8489,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Freferences\u002Fstreaming-patterns.md",{"path":92,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Ftop-ui-errors.md",13589,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Freferences\u002Ftop-ui-errors.md",{"path":96,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fuse-chat-migration.md",8554,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Freferences\u002Fuse-chat-migration.md",{"path":100,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":101,"sourceHtmlUrl":102},"rules\u002Fai-sdk-ui.md",2288,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Frules\u002Fai-sdk-ui.md",{"path":104,"resourceType":105,"resourceTypeDesc":106,"sizeBytes":107,"sourceHtmlUrl":108},"scripts\u002Fcheck-versions.sh","SCRIPT","脚本",1650,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Fscripts\u002Fcheck-versions.sh",{"path":110,"resourceType":111,"resourceTypeDesc":112,"sizeBytes":113,"sourceHtmlUrl":114},"templates\u002Fcustom-message-renderer.tsx","OTHER","其他",8635,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Ftemplates\u002Fcustom-message-renderer.tsx",{"path":116,"resourceType":111,"resourceTypeDesc":112,"sizeBytes":117,"sourceHtmlUrl":118},"templates\u002Fmessage-persistence.tsx",8640,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Ftemplates\u002Fmessage-persistence.tsx",{"path":120,"resourceType":105,"resourceTypeDesc":106,"sizeBytes":121,"sourceHtmlUrl":122},"templates\u002Fnextjs-api-route.ts",6319,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Ftemplates\u002Fnextjs-api-route.ts",{"path":124,"resourceType":111,"resourceTypeDesc":112,"sizeBytes":125,"sourceHtmlUrl":126},"templates\u002Fnextjs-chat-app-router.tsx",7979,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Ftemplates\u002Fnextjs-chat-app-router.tsx",{"path":128,"resourceType":111,"resourceTypeDesc":112,"sizeBytes":129,"sourceHtmlUrl":130},"templates\u002Fnextjs-chat-pages-router.tsx",5160,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Ftemplates\u002Fnextjs-chat-pages-router.tsx",{"path":132,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":133,"sourceHtmlUrl":134},"templates\u002Fpackage.json",1219,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Ftemplates\u002Fpackage.json",{"path":136,"resourceType":111,"resourceTypeDesc":112,"sizeBytes":137,"sourceHtmlUrl":138},"templates\u002Fuse-chat-attachments.tsx",7351,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Ftemplates\u002Fuse-chat-attachments.tsx",{"path":140,"resourceType":111,"resourceTypeDesc":112,"sizeBytes":141,"sourceHtmlUrl":142},"templates\u002Fuse-chat-basic.tsx",3921,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Ftemplates\u002Fuse-chat-basic.tsx",{"path":144,"resourceType":111,"resourceTypeDesc":112,"sizeBytes":145,"sourceHtmlUrl":146},"templates\u002Fuse-chat-tools.tsx",5814,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Ftemplates\u002Fuse-chat-tools.tsx",{"path":148,"resourceType":111,"resourceTypeDesc":112,"sizeBytes":149,"sourceHtmlUrl":150},"templates\u002Fuse-completion-basic.tsx",4986,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Ftemplates\u002Fuse-completion-basic.tsx",{"path":152,"resourceType":111,"resourceTypeDesc":112,"sizeBytes":153,"sourceHtmlUrl":154},"templates\u002Fuse-object-streaming.tsx",8410,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fveeramanikandanr48\u002Fai-sdk-ui\u002Ftemplates\u002Fuse-object-streaming.tsx",[156,181,205,222,227,246],{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":38},"01M6G8J55967D6281ACMKAKTEQ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[],[163,164,165,166,167,168,169,170,171,172,173,32,174,175,176,177,178,179,180],"crowd prompting","prompting","api","with","tokens","domain","world","prompts","operations","instructions","text","system","improve","productivity","marketplace","https","content","ai agents",{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":187,"publishedAt":38},"01M6G8J0PKPAYVET6BWE8W4C26","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[],[188,165,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,170,204],"dilemm ai","arena","analyze","browser","openclaw agent","create","automation","browser automation","bot","openclaw","design","strategy","headless","compete","submit","matchmaking","use",{"skillNo":206,"name":207,"nameZh":6,"description":208,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":209,"categories":210,"keywords":211,"publishedAt":38},"01M6G8HWAF3K9SW7NP3Z83CPJ6","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, or submitting paper reviews via API at http:\u002F\u002F150.158.152.82:8000.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Fweak-accept\u002FSKILL.md",[],[212,213,214,215,216,217,218,166,219,202,204,31,165,220,221],"arxiv paper reviews","reviews","arxiv","paper","crawler","papers","comments","fetch","http","via",{"skillNo":223,"name":207,"nameZh":6,"description":208,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":224,"categories":225,"keywords":226,"publishedAt":38},"01M6G8HQJ7N7WMY6YV7D7SSJ16","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[],[215,214,213,212,221,217,218,166,216,202,204,219,31,165,220],{"skillNo":228,"name":229,"nameZh":6,"description":230,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":231,"categories":232,"keywords":233,"publishedAt":38},"01M6G8HM95Y64JNVFC2HN4E2BG","git-summary","Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzweack\u002Fgit-summary\u002FSKILL.md",[],[234,235,236,237,238,239,240,241,242,23,243,244,245],"git","summary","git summary","commits","repository","win32","status","linux","contributors","quick","get","branches",{"skillNo":247,"name":248,"nameZh":6,"description":249,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":250,"categories":251,"keywords":252,"publishedAt":38},"01M6G8HGEGF05CNEJCGVYFSC4R","agent-constitution","Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fztsalexey\u002Fagent-constitution\u002FSKILL.md",[],[253,254,255,256,166,257,258,45,259,31,260,261,262,263,264,178,265,266,267],"agent constitution","constitution","contracts","tree","query","base","log","check","Rules","projects","compliance","actions","state","governance","github"]