uploadSkill()

Uploads a skill (a bundle of files) to a provider and returns a ProviderReference that can be used in subsequent inference calls.

import { uploadSkill } from 'ai';
import { anthropic } from '@ai-sdk/anthropic';
import { readFileSync } from 'fs';
const { providerReference } = await uploadSkill({
api: anthropic.skills(),
files: [
{
path: 'my-skill/SKILL.md',
content: readFileSync('./SKILL.md'),
},
],
displayTitle: 'My Skill',
});

Import

import { uploadSkill } from "ai"

API Signature

Parameters

api:

SkillsV4 | ProviderV4

files:

SkillsV4File[]

displayTitle?:

string

providerOptions?:

ProviderOptions

Returns

providerReference:

ProviderReference

displayTitle?:

string

name?:

string

description?:

string

latestVersion?:

string

providerMetadata?:

ProviderMetadata

warnings:

Warning[]