@agentskit/templates
v0.1.12
Published
Extension toolkit for creating custom AgentsKit skills, tools, and adapters.
Maintainers
Readme
@agentskit/templates
Create, validate, and scaffold custom AgentsKit extensions — tools, skills, and adapters — ready to publish and share.
Tags: ai · agents · llm · agentskit · ai-agents · scaffolding · templates · authoring · plugin · extension
Why templates
- Skip the boilerplate —
scaffold()generates a complete npm package with src, tests, tsconfig, and README in one call - Catch mistakes early —
createToolTemplate()validates required fields and gives clear error messages before your code runs - Extend, don't rewrite — inherit from built-in skills/tools and override only what you need
- Publish-ready output — scaffolded packages include the correct tsup config, dual CJS/ESM exports, and a contract test
Install
npm install @agentskit/templatesCreate a custom tool
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}`
},
})Extend a built-in skill
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,
})Scaffold a full package
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.mdFeatures
createToolTemplate— validated tool factory with type-safe schemacreateSkillTemplate— extend built-in skills with overridesscaffold({ type, name, dir })— generate a complete npm package ready to publish- All outputs align with
@agentskit/corecontracts — no manual ADR compliance required
Ecosystem
| 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 |
Contributors
License
MIT — see LICENSE.
