Create, validate, and scaffold custom AgentsKit extensions — tools, skills, and adapters — ready to publish and share.
scaffold() generates a complete npm package with src, tests, tsconfig, and README in one callcreateToolTemplate() validates required fields and gives clear error messages before your code runsnpm install @agentskit/templates
import { createToolTemplate } from '@agentskit/templates'
const slackTool = createToolTemplate({
name: 'slack-notify',
description: 'Send a message to a Slack channel',
schema: {
type: 'object',
properties: {
channel: { type: 'string' },
message: { type: 'string' },
},
required: ['channel', 'message'],
},
execute: async (args) => {
await fetch(webhookUrl, { method: 'POST', body: JSON.stringify({ channel: args.channel, text: args.message }) })
return `Sent to #${args.channel}`
},
})
import { createSkillTemplate } from '@agentskit/templates'
import { researcher } from '@agentskit/skills'
const myResearcher = createSkillTemplate({
base: researcher,
name: 'my-researcher',
systemPrompt: researcher.systemPrompt + '\nAlways cite sources with URLs.',
temperature: 0.3,
})
import { scaffold } from '@agentskit/templates'
await scaffold({
type: 'tool', // 'tool' | 'skill' | 'adapter'
name: 'my-search',
dir: './packages',
description: 'Custom search tool for AgentsKit',
})
// → packages/my-search/
// package.json, tsconfig.json, tsup.config.ts
// src/index.ts (template with ToolDefinition)
// tests/index.test.ts (contract test)
// README.md
@agentskit/runtime or useChat like any other tool or skill@agentskit/core types early — templates align with those definitions| Package | Role |
|---|---|
| @agentskit/core | ToolDefinition, SkillDefinition |
| @agentskit/tools | Reference implementations |
| @agentskit/skills | Skills you can extend with createSkillTemplate |
| @agentskit/runtime | Where custom tools/skills run |