add-function-examples
Guide for adding new AI function examples, for testing specific features against the actual provider APIs.
Guide for adding first-party AI provider packages to the AI SDK. Use when creating a provider package under packages/ to integrate an external AI service.
$ npx -y skills add vercel/ai --skill add-provider-package --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/add-provider-packageContext preview
The summary Claude sees to decide when to auto-load this skill.
Guide for adding first-party AI provider packages to the AI SDK. Use when creating a provider package under packages/ to integrate an external AI service.
name: add-provider-package description: Guide for adding first-party AI provider packages to the AI SDK. Use when creating a provider package under packages/ to integrate an external AI service. metadata: internal: true
Add a complete first-party `@ai-sdk/<provider>` package that follows the current provider interfaces, repository conventions, security requirements, and release process.
Before implementing anything, read:
Use [PR #18595](https://github.com/vercel/ai/pull/18595/changes) as a recent end-to-end example, but choose the current provider package whose API shape and model types most closely resemble the new provider as the implementation reference.
Third parties can publish provider packages outside this repository. A new first-party `@ai-sdk/<provider>` package requires prior discussion in an issue. Confirm that agreement exists before implementing the package.
Before designing model classes, look for an official, versioned OpenAPI or Swagger specification in the provider's documentation or repositories. Prefer first-party specifications and record the source URL plus its version, publication date, or commit in the implementation notes or pull request.
Use the specification and official documentation to identify:
Treat an OpenAPI specification as implementation evidence, not unquestioned truth. Specifications are often incomplete for server-sent events, streaming deltas, polymorphic content, tool calls, nullable fields, and errors. Do not add a generated client or generated production types by default. Implement minimal hand-written types and Zod schemas, then verify them against official documentation and captured API responses.
If no official specification exists, derive the contract from official documentation and real response fixtures, and note that limitation in the pull request.
Determine which AI SDK model interfaces the provider supports, such as `LanguageModelV4`, `EmbeddingModelV4`, `ImageModelV4`, `SpeechModelV4`, `TranscriptionModelV4`, `RerankingModelV4`, or `Experimental_VideoModelV4`.
Before introducing a dependency, public API pattern, or new abstraction, read `contributing/decisions/README.md` and relevant accepted ADRs. Prefer existing provider utilities and implementation patterns.
Create `packages/<provider>/` by adapting a current, comparable provider package. A typical package contains:
packages/<provider>/ ├── src/ │ ├── index.ts │ ├── version.ts │ ├── <provider>-provider.ts │ ├── <provider>-provider.test.ts │ ├── <provider>-<model-type>-model.ts │ ├── <provider>-<model-type>-model.test.ts │ └── <provider>-<model-type>-options.ts ├── CHANGELOG.md ├── README.md ├── package.json ├── tsconfig.json ├── tsconfig.build.json ├── tsup.config.ts ├── turbo.json ├── vitest.node.config.js └── vitest.edge.config.js
Preserve current package conventions rather than recreating configuration from memory:
Run `pnpm update-references` after adding or changing workspace dependencies.
Follow the current provider factory pattern:
Implement each supported model using the appropriate interface from `@ai-sdk/provider` and shared utilities from `@ai-sdk/provider-utils`.
Provider option types and schemas must follow [the r
The AI Toolkit for TypeScript. From the creators of Next.js, the AI SDK is a free open-source library for building AI-powered applications and agents
Repo: vercel/ai
Guide for adding new AI function examples, for testing specific features against the actual provider APIs.
Guide for adding new AI SDK harness packages. Use when creating a new @ai-sdk/harness-<name> package that adapts a coding-agent runtime to HarnessV1.
Create and maintain Architecture Decision Records (ADRs) optimized for agentic coding workflows. Use when you need to propose, write, update, accept/reject,…
Capture API response test fixture.
Develop examples for AI SDK functions. Use when creating, running, or modifying examples under examples/ai-functions/src to validate provider support,…
List the contents of an npm package tarball before publishing. Use when the user wants to see what files are included in an npm bundle, verify package…