add-function-examples

SkillCloud & infra

The add-function-examples skill guides an AI agent through adding new AI function examples that test specific features against actual provider APIs. It reviews changes in the current branch, finds new or modified features or bug fixes that need an example in the examples/ai-functions directory, and creates the example. These examples also serve as documentation for users.

Then ask your AI: use the add-function-examples skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Have the skill available to your AI agent.

What your AI can do with it

  • Reviews changes in the current branch to find features needing examples
  • Identifies new or modified features and bug fixes for examples
  • Chooses the right model type and top-level function for each example
  • Creates examples in the examples/ai-functions directory
  • Adds generateText and streamText variants for language models
  • Runs pnpm type-check:full and fixes any errors

Getting started

  1. Have the skill available to your AI agent.
  2. Make sure the repository has an examples/ai-functions directory.
  3. Ensure pnpm is installed so the type-check command can run.
  4. Ask the agent to add function examples for the changes in the current branch.

What this skill tells your AI

The instructions your AI receives, as published by vercel/ai in skills/add-function-examples/SKILL.md and read by Ahel’s review.

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.

Signals

GitHub stars
27k
Forks
5k
Last commit
Oct 2026

Others that do the same job

Questions

What kind of model and top-level function should the example use?
For a language model, add two variants, one for generateText and one for streamText. For other model kinds, use the relevant top-level function such as generateImage or generateSpeech.
Where are the examples placed?
Examples go in the examples/ai-functions directory.
What command checks the examples after they are created?
Run pnpm type-check:full and fix any errors encountered.
What are these examples used for?
They test specific features against the actual provider APIs and can also serve as documentation for users.
Advanced
Item type
skill
Key
add-function-examples-vercel
Source
github.com/vercel/ai