Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
vercel avatar

Add Function Examples

  • 161 installs
  • 26k repo stars
  • Updated August 5, 2026
  • vercel/ai

Vercel AI SDK skill for adding function examples that test provider API features live.

About

Guide for contributing function examples to the Vercel AI SDK repository. Focuses on adding examples that exercise specific provider API capabilities with real network calls rather than mocks. Ensures examples follow repo conventions for structure, imports, and runnable scripts that developers can copy when validating provider behavior. Used when extending the examples directory with new model features, tool calling patterns, or streaming behaviors that need live verification against provider APIs.

  • Adds AI SDK function examples for live provider API testing
  • Examples target specific provider features not covered elsewhere
  • Follows Vercel AI repo conventions for runnable example scripts
  • Validates behavior against actual provider endpoints
  • Supports provider feature matrix expansion in examples directory

Add Function Examples by the numbers

  • 161 all-time installs (skills.sh)
  • +10 installs in the week ending Jul 27, 2026 (Skillselion tracking)
  • Ranked #3,212 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

add-function-examples capabilities & compatibility

Capabilities
author ai examples · test provider features
Works with
openai · vercel
Use cases
api development · testing
From the docs

What add-function-examples says it does

Guide for adding new AI function examples, for testing specific features against the actual provider APIs.
SKILL.md
npx skills add https://github.com/vercel/ai --skill add-function-examples

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs161
repo stars26k
Last updatedAugust 5, 2026
Repositoryvercel/ai

How do I add a new AI SDK example that tests a specific provider feature?

Add new AI function examples to the Vercel AI SDK for testing specific provider API features against live endpoints.

Who is it for?

AI SDK contributors adding provider-specific examples with real API calls.

Skip if: Production app integration unrelated to the examples directory.

When should I use this skill?

User needs to add AI function examples for testing provider API features in vercel/ai repo.

What you get

Runnable function example added following repo conventions and verified against provider APIs.

Files

SKILL.mdMarkdownGitHub ↗

Adding Function Examples

Review the changes in the current branch, and identify new or modified features or bug fixes that would benefit from having an example in the examples/ai-functions directory. These examples are used for testing specific features against the actual provider APIs, and can also serve as documentation for users.

Determine for which kind of model and top-level function the example should be added. For a language model, the example should be added in two variants, one for generateText and one for streamText. For any other models kinds, add the example for the relevant top-level function (e.g. generateImage, generateSpeech).

After creating the example, run pnpm type-check:full; fix any errors encountered.

Related skills

FAQ

What kind of examples does this cover?

Function examples for testing specific features against actual provider APIs, not mocked unit tests.

Where do examples live?

In the Vercel AI SDK examples directory following existing repo structure conventions.

Why live API calls?

To validate provider behavior matches SDK expectations for the targeted feature.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.