ai-sdk-core
Expert guidance for AI SDK Core: text generation, structured data, tool calling (tool/dynamicTool), MCP integration (createMCPClient, Experimental_StdioMCPTransport), embeddings/reranking, provider setup, middleware, telemetry, and error handling. Use when building with generateText/streamText, generateObject/streamObject, tools (needsApproval, strict, inputExamples, activeTools, toolChoice, experimental_context), embeddings (embed/embedMany/rerank), or MCP tools/resources/prompts/elicitation.
npx skills add majiayu000/claude-skill-registry --skill ai-sdk-core-bjornmelin-dev-skills --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# AI SDK Core Use AI SDK Core to generate text/structured output, call tools, and connect to MCP servers with consistent APIs across providers. ## Quick Start ```bash pnpm add ai @ai-sdk/openai zod@^4.3.5 ``` ```ts import { generateText } from 'ai'; const { text } = await generateText({ model: 'openai/gpt-4o', prompt: 'Explain quantum computing in one paragraph.', }); ``` ## Function Selection | Need | Function | Streaming | |------|----------|-----------| | Text response | `generateText` | No | | Streaming text | `streamText` | Yes | | Structured JSON | `generateObject` | No | | Streaming JSON | `streamObject` | Yes | | Embeddings | `embed` / `embedMany` | No | | Rerank | `rerank` | No | ## Core Patterns ### Generate Text ```ts import { generateText } from 'ai'; const { text, usage } = await generateText({ model: 'anthropic/claude-sonnet-4.5', system: 'You are a helpful assistant.', prompt: 'What is the capital of France?', }); ``` ### Stream Text ```ts import { streamText } from 'ai'; const result = streamText({ model: 'openai/gpt-4o', prompt: 'Write a short story.', }); for await (const chunk of result.textStream) { process.stdout.write(chunk); } ``` ### Generate Structured Data
- Quick Start
- Function Selection
- Core Patterns
- Generate Text
- Stream Text
- Generate Structured Data
- Tool Calling (Typed)
- Dynamic Tools (Runtime Schemas)
- Multi-Step Tool Execution
- Tooling Checklist
- MCP Integration (Model Context Protocol)
- Reference Files
- Error Handling
- Provider Setup
pnpm add ai @ai-sdk/openai zod@^4.3.5
What does the ai-sdk-core skill do?
Expert guidance for AI SDK Core: text generation, structured data, tool calling (tool/dynamicTool), MCP integration (createMCPClient, Experimental_StdioMCPTransport), embeddings/reranking, provider setup, middleware, telemetry, and error handling. Use when building with generateText/streamText, generateObject/streamObject, tools (needsApproval, strict, inputExamples, activeTools, toolChoice, experimental_context), embeddings (embed/embedMany/rerank), or MCP tools/resources/prompts/elicitation.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill ai-sdk-core-bjornmelin-dev-skills --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
