Agent Skillsvercel/ai › add-function-examples

add-function-examples

GitHub

指导为AI函数添加示例,用于测试特定功能及文档化。需识别新功能并生成对应模型变体,最后运行类型检查修复错误。

skills/add-function-examples/SKILL.md vercel/ai

Trigger Scenarios

需要为新的AI功能编写测试示例 需要更新或创建API功能的用户文档示例

Install

npx skills add vercel/ai --skill add-function-examples -g -y
More Options

Use without installing

npx skills use vercel/ai@add-function-examples

指定 Agent (Claude Code)

npx skills add vercel/ai --skill add-function-examples -a claude-code -g -y

安装 repo 全部 skill

npx skills add vercel/ai --all -g -y

预览 repo 内 skill

npx skills add vercel/ai --list

SKILL.md

Frontmatter
{
    "name": "add-function-examples",
    "metadata": {
        "internal": true
    },
    "description": "Guide for adding new AI function examples, for testing specific features against the actual provider APIs."
}

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.

Version History

  • c0595b4 Current 2026-08-20 17:56

Same Skill Collection

skills/add-harness-package/SKILL.md
skills/add-provider-package/SKILL.md
skills/adr-skill/SKILL.md
skills/develop-ai-functions-example/SKILL.md
skills/list-npm-package-content/SKILL.md
skills/major-version-mode/SKILL.md
skills/migrate-ai-sdk-v6-to-v7/SKILL.md
skills/update-harness-dependencies/SKILL.md
skills/update-provider-models/SKILL.md
skills/capture-api-response-test-fixture/SKILL.md
skills/use-ai-sdk/SKILL.md
examples/ai-e2e-next/data/island-rescue/SKILL.md
examples/ai-functions/data/island-rescue/SKILL.md

Metadata

Files
0
Version
1d9b13b
Hash
b4befbc5
Indexed
2026-08-20 17:56

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-31 21:03
浙ICP备14020137号-1 $Carte des visiteurs$