Catalog
vercel/add-function-examples

vercel

add-function-examples

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

global
internal:true
0installs0uses~215
v1.0Saved May 2, 2026

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.

Files1
1 files · 552 B

Select a file to preview

Overall Score

62/100

Grade

C

Adequate

Safety

88

Quality

58

Clarity

65

Completeness

48

Summary

This skill guides developers to add new function examples for AI model testing and documentation. It instructs the agent to identify features or bug fixes that need example code, create examples for the appropriate model type and function variant (generateText, streamText, generateImage, generateSpeech), and validate them with a type-check command.

Detected Capabilities

Code example generationProject file creation (examples/ai-functions directory)TypeScript type checking (pnpm type-check:full)Feature review and classificationMulti-variant example creation (generateText, streamText, etc.)

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

add function examplecreate ai exampledocument new featuretest provider integrationadd generateText exampleexample for api provider

Risk Signals

INFO

No destructive operations, privilege escalation, credential access, or remote code execution patterns detected

overall
INFO

Shell command execution (pnpm type-check:full) is scoped to type validation within the project

SKILL.md
INFO

File writes are scoped to examples/ai-functions directory, a standard project location

SKILL.md

Referenced Domains

External domains referenced in skill content, detected by static analysis.

www.apache.org

Use Cases

  • Adding documentation examples for new AI provider features
  • Creating test cases for language model functionality
  • Documenting image or speech generation capabilities
  • Validating new provider integrations with examples

Quality Notes

  • Scope is well-defined: file creation limited to examples/ai-functions directory
  • Clear model type classification guidance (language models vs. other kinds)
  • Instructions include validation step (type-check:full) to catch errors early
  • Instructions could be more detailed: missing guidance on example file structure, naming conventions, and content template
  • No error handling documented for type-check failures or common issues
  • Edge cases not addressed: e.g., what if no new features warrant examples? What if type-check fails?
  • Lacks concrete examples or templates to guide example creation
  • Missing documentation about which directory structure or file naming pattern to follow
Model: claude-haiku-4-5-20251001Analyzed: May 2, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Add vercel/add-function-examples to your library

Command Palette

Search for a command to run...