跳转到主要内容

技能

技能是提供特定领域知识给AI的markdown文件。当用户提出技能涵盖的话题时,AI会读取技能文件以给出知情的答案。

定义技能

kazzle.config.ts 中添加技能:
import { defineConfig } from './kazzle.types';

export default defineConfig({
  skills: [
    { name: 'API guide', path: './skills/api/SKILL.md' },
    { name: 'Data model', path: './skills/data-model/SKILL.md' }
  ]
});

技能文件格式

每个技能是一个markdown文件(通常命名为 SKILL.md),包含AI应该了解的说明、示例和上下文。
# API guide

This skill teaches the AI how to use the app's API.

## Endpoints

- `GET /items` — list all items
- `POST /items` — create an item

## Authentication

All requests require a Bearer token in the Authorization header.

AI如何使用技能

当AI遇到与具有技能的应用相关的问题时,它会读取相关的技能文件来支撑其回答。技能按需加载——AI不会预先读取所有技能。 技能纯粹是信息性的。它们不执行代码或触发操作。