ai-sdk

Guide AI SDK development with functions, agents, and React hooks.

Updated Oct 20, 2025
One-click install
npx skills add https://github.com/pierregueroult/dot-files --skill ai-sdk-pierregueroult
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-sdk
Source: https://github.com/pierregueroult/dot-files/tree/main/opencode/skills/ai-sdk
Command: npx skills add https://github.com/pierregueroult/dot-files --skill ai-sdk-pierregueroult

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers build AI-powered features by providing guidance on using the AI SDK, including functions for text generation, streaming, agents, embeddings, and integrating with AI providers.

Core Features & Use Cases

  • AI SDK Guidance: Get help with AI SDK functions like generateText, streamText, ToolLoopAgent, embed, and tools.
  • AI Feature Development: Build AI agents, chatbots, RAG systems, or text generation features.
  • Provider Integration: Understand AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, and embeddings.
  • React Hooks: Learn about using React hooks like useChat or useCompletion.

Quick Start

Use the ai-sdk skill to find documentation for the useChat hook.

Frequently Asked Questions about ai-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a chatbot using React hooks for text generation?

To build a chatbot with React hooks for text generation, use the `useChat` and `useCompletion` functions provided by the AI SDK to manage streaming responses and UI state. This Skill provides comprehensive guidance on integrating these hooks.

How do I integrate AI providers like OpenAI and Anthropic for text generation?

You integrate AI providers like OpenAI and Anthropic for text generation by using the AI SDK's provider integration functions, enabling streaming, tool calling, and structured output across different models.

What is the best way to generate structured output and call tools with an AI SDK?

The best way to generate structured output and call tools with an AI SDK is using the `generateText`, `streamText`, and `tools` functions, which facilitate structured data extraction and multi-step agent interactions.

Does building AI agents with this SDK require TypeScript and API knowledge?

Building AI agents requires understanding JavaScript or TypeScript development, AI concepts, and provider APIs. The Skill guides creating agents like `ToolLoopAgent` and RAG systems using these foundations.

How do I create a RAG system and generate embeddings for AI features?

Create a RAG system and generate embeddings for AI features by using the AI SDK's `embed` function alongside text generation tools to process and retrieve relevant context from your data.