Agent skill · software engineering · vercel

develop-ai-functions-example

Develop examples for AI SDK functions. Use when creating, running, or modifying examples under examples/ai-functions/src to validate provider support, demonstrate features, or create test fixtures.

Why this skill is useful

Provides domain-specific examples and templates for AI SDK functions that the AI wouldn't reliably generate on its own.

What it needs

About 4k tokens when loaded. Last updated 2026-08-07. 26,057 stars on the source repository.

What this skill does

AI Functions Examples The examples/ai-functions/ directory contains scripts for validating, testing, and iterating on AI SDK functions across providers. Example Categories Examples are organized by AI SDK function in examples/ai-functions/src/: Directory Purpose ------------------ ---------------------------------------------------- generate-text/ Non-streaming text generation with generateText() stream-text/ Streaming text generation with streamText() generate-object/ Structured output generation with generateObject() stream-object/ Streaming structured output with streamObject() agent/ ToolLoopAgent examples for agentic workflows embed/ Single embedding generation with embed() embed-many/ Batch embedding generation with embedMany() generate-image/ Image generation with generateImage() generate-speech/ Text-to-speech with generateSpeech() transcribe/ Audio transcription with transcribe() rerank/ Document reranking with rerank() middleware/ Custom middleware implementations registry/ Provider registry setup and usage telemetry/ OpenTelemetry integration complex/ Multi-component examples (agents, routers) lib/ Shared utilities (not examples) tools/ Reusable tool definitions File Naming Convention Group examples by function and provider. Name the entry example basic.ts and use descriptive kebab-case.ts names for additional examples: Pattern Example Description --------------------------------------------------- ------------------------------------------------------ -------------------------- <function>/<provider>/basic.ts generate-text/openai/basic.ts Basic provider usage <function>/<provider>/<feature>.ts stream-text/openai/tool-call.ts Specific feature <function>/<provider>/<sub-provider>.ts stream-text/amazon-bedrock/anthropic.ts Provider with sub-provider <function>/<provider>/<sub-provider>-<feature>.ts stream-text/google/vertex-anthropic-cache-control.ts Sub-provider with feature Do not create flat provider files such as generate-text/openai.ts. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills vercel/develop-ai-functions-example

View the source on GitHub

Browse the @skills marketplace