All skills
vercel avatar

/add-function-examples

@2c6c74d official
by vercelvercel/ai27k stars
5,232

Guide for adding new AI function examples, for testing specific features against the actual provider APIs.

Use this Skill: https://skilld.dev/gh/vercel/ai/add-function-examples

This session only. Nothing lands on disk.

SKILL.md

≈32 tokens always: the name and description. ≈188 when used: this file.

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.

Source: SKILL.md on GitHub

No alerts6mo3 checks · Risk SAFE
  • Gen Agent Trust Hub6mo

    This skill provides clear guidelines for developers to add AI function examples for testing and documentation purposes. It follows standard development practices, such as running type checks, and does not exhibit any security concerns.

  • Socket6mo

    No alerts

  • Snyk6mo

    Risk: LOW · No issues

Signed by skilld at 2c6c74d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 11 hours ago.

Activeupdated 6 months ago
metadata
{
  "internal": true
}

README badge

README badge for vercel/ai/add-function-examples

Creates and maintains AI function examples in the Vercel AI SDK repository to test new features against actual provider APIs. Guides developers to add example variants for generateText, streamText, generateImage, and other top-level functions, then validate with type-checking.

Generated from the current SKILL.md.

What is this skill for?
This skill guides adding new AI function examples to the vercel/ai library's examples/ai-functions directory for testing features against actual provider APIs.
Which functions should I create examples for?
For language models, create two variants: one for generateText and one for streamText. For other model kinds, add examples for the relevant top-level function like generateImage or generateSpeech.
Do I need to run type checking after adding examples?
Yes. Run pnpm type-check:full after creating the example and fix any errors that appear.

Generated from the current SKILL.md. These answers refresh after source changes.