Install any skill in seconds. Free to start, no credit card required.
Get Started Free →develop-ai-functions-example
Develop examples for AI SDK functions.
Passed 22 of 22 test cases with the skill, and 3 of 22 without it.
and 37 more in the full report
19 fixed3 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 19 test cases the skill fixed. Same model, same prompt, with and without the skill.
Write a single text embedding script for OpenAI following our repository's folder structure and runner conventions.
| Checked | Without skill | With skill |
|---|---|---|
| The file path is located under embed/openai/basic.ts. | Missed | Passed |
| The script calls embed from the ai package. | Missed | Passed |
The instructions your model reads when the skill loads.
The examples/ai-functions/ directory contains scripts for validating, testing, and iterating on AI SDK functions across providers.
Examples are organized by AI SDK function in examples/ai-functions/src/:
| Directory | Purpose |
|---|---|
generate-text/ | Non-streaming text generation with generateText() |
stream-text/ | Streaming text generation with streamText() |
generate-object/ | Structured output generation with generateObject() |
stream-object/ | Streaming structured output with streamObject() |
agent/ | ToolLoopAgent examples for agentic workflows |
embed/ | Single embedding generation with embed() |
embed-many/ | Batch embedding generation with embedMany() |
generate-image/ | Image generation with generateImage() |
generate-speech/ | Text-to-speech with generateSpeech() |
transcribe/ | Audio transcription with transcribe() |
rerank/ | Document reranking with rerank() |
middleware/ | Custom middleware implementations |
registry/ | Provider registry setup and usage |
telemetry/ | OpenTelemetry integration |
complex/ | Multi-component examples (agents, routers) |
lib/ | Shared utilities (not examples) |
tools/ | Reusable tool definitions |
Group examples by function and provider. Name the entry example basic.ts and use descriptive kebab-case.ts names for additional examples:
| Pattern | Example | Description |
|---|---|---|
<function>/<provider>/basic.ts | generate-text/openai/basic.ts | Basic provider usage |
<function>/<provider>/<feature>.ts | stream-text/openai/tool-call.ts | Specific feature |
<function>/<provider>/<sub-provider>.ts | stream-text/amazon-bedrock/anthropic.ts | Provider with sub-provider |
<function>/<provider>/<sub-provider>-<feature>.ts | stream-text/google/vertex-anthropic-cache-control.ts | Sub-provider with feature |
Do not create flat provider files such as generate-text/openai.ts.
test cases passed, vs 3 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.