Skip to content
Dashboard

Use skills in your AI SDK agents via bash-tool

CTO, Vercel
import {
experimental_createSkillTool as createSkillTool,
createBashTool,
} from "bash-tool";
import { ToolLoopAgent } from "ai";
// Discover skills and get files to upload
const { skill, files, instructions } = await createSkillTool({
skillsDirectory: "./skills",
});
// Create bash tool with skill files
const { tools } = await createBashTool({
files,
extraInstructions: instructions,
});
// Use both tools with an agent
const agent = new ToolLoopAgent({
model,
tools: { skill, ...tools },
});

Example of using skills with bash-tool in an AI SDK ToolLoopAgent