跳轉到主要內容

技能

技能是提供領域特定知識給 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 不會預先讀取所有技能。 技能純粹是資訊性的。它們不執行程式碼或觸發動作。