vercel/ai/add-function-examples
Claude Code and agent skill by vercel/ai
- vendor
Checking that the SKILL.md file is still in the repository.
Guide for adding new AI function examples, for testing specific features against the actual provider APIs.
Install
npx vskill@latest install vercel/ai/add-function-examplesSKILL.md
The same SKILL.md was published earlier as vercel/ai/add-function-examples.
Adding Function Examples
Review the changes in the current branch, and identify new or modified behavior that would benefit from a reusable 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.
For bug reproductions, follow the bug-fix workflow in AGENTS.md: reproduce the failure end-to-end with a temporary script outside the checkout, then rerun it to verify the fix. Build and use the checkout's local packages for both runs. Publish reproduction-only code only in the PR description's End-to-End Verification section, in a collapsible <details> block with the complete runnable script, commands, and observed before/after results, following .github/pull_request_template.md. Never commit reproduction-only files, including under examples/ai-functions or elsewhere in the repository. Regression tests and reusable examples that demonstrate supported usage (including fixed behavior) still belong in the repository.
Place reusable examples under examples/ai-functions/src/<function>/<provider>/, such as examples/ai-functions/src/stream-text/openai/tool-call.ts. Use basic.ts for the provider entry example and descriptive kebab-case.ts names for additional examples. Do not create flat provider files such as src/stream-text/openai.ts.
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.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 15 Nov 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/add-function-examples/SKILL.md
Popularity
- Repository stars
- 27,986
- Repository forks
- 5,626
- 7-day trend score
- 50
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 30 Apr 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/vercel/ai/add-function-examples)