Skill: ai-sdk-core

SkillDocs & knowledge

This skill gives your AI accurate reference knowledge of Vercel AI SDK v7, so it can build AI features in your backend without writing code from memory. Once added, your AI can implement text generation, streaming replies, and tool-based agents that work with the current v7 API. It also helps track down and fix errors in existing AI SDK code.

Available today. Use it from your connected AI after setup.

Add the skill, then ask your AI to build or debug a feature that uses Vercel AI SDK v7. It will work from the reference material rather than relying on memory.

Then ask your AI: use the Skill: ai-sdk-core skill

What your AI can do with it

  • Write code that generates text with generateText
  • Build responses that stream as they are produced using streamText
  • Create ToolLoopAgent agents that work through tasks step by step
  • Attach tools so the AI can take actions, not just answer
  • Troubleshoot and fix errors in AI SDK code
  • Follow the actual v7 API instead of guessing outdated patterns

What this skill tells your AI

The instructions your AI receives, as published by blockmatic/basilic in .agents/skills/ai-sdk-core-v7/SKILL.md and read by ahel’s review.

Scope

  • Applies to: Backend AI with Vercel AI SDK v7 (ai package)
  • Does NOT cover: React chat UIs (see ai-sdk-ui)

Assumptions

Principles

  • generateText / streamText for request handlers and one-shot API routes; instructions for system-style prompt
  • Request-handler tool loops: stopWhen: isStepCount(n) on generateText / streamText — not maxSteps, not stepCountIs
  • ToolLoopAgent + generate() / stream() for durable agents — not hand-rolled loops, not new Agent()
  • UI streams: createUIMessageStreamResponse + toUIMessageStream({ stream: result.stream }) from 'ai'. Use these for new handlers and for dedicated stream/SDK updates
  • result.toUIMessageStreamResponse() still works in v7 (deprecated). Leave it only when the task is unrelated to streaming or the SDK
  • Tool results must be JSON-serializable (no Date)
  • System prompt lives in instructions. Client messages must not include { role: 'system' } unless the server fully trusts the payload

Constraints

MUST

  • Read bundled docs before writing calls
  • convertToModelMessages when the client sends UI messages
  • Reject untrusted { role: 'system' } in messages. Do not set allowSystemInMessages: true for client-supplied chat

AVOID

  • toDataStreamResponse / pipeDataStreamToResponse
  • stepCountIs / maxSteps / result.fullStream / top-level system: (use isStepCount, result.stream, instructions)
  • Guessing model IDs

Interactions

Templates

References

Signals

GitHub stars
89
Forks
11
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
ai-sdk-core-v7
Source
github.com/blockmatic/basilic