> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kazzle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 스킬

> AI에게 앱에 대해 알려주고 호출할 수 있는 도구를 제공하세요.

# 스킬

스킬은 AI가 앱에 대해 알고 할 수 있는 일을 알려주는 **폴더**입니다. 다음을 포함합니다:

* `SKILL.md` — AI가 읽는 지침 (필수).
* `tools.ts` — AI가 호출할 수 있는 도구 목록 (선택사항).

`SKILL.md`는 앱과 그 도구를 설명하고, `tools.ts`는 도구를 선언하며, 각 도구는 앱의 컴포넌트 중 하나의 HTTP 경로로 구현됩니다.

## 스킬 정의하기

`kazzle.config.ts`에서 각 스킬의 `SKILL.md`를 가리킵니다. Kazzle은 폴더를 사용하므로 옆에 있는 `tools.ts`가 자동으로 선택됩니다.

```typescript theme={"theme":"material-theme-darker"}
import { defineConfig } from '@kazzle/app';

export default defineConfig({
  components: [{ name: 'api', type: 'process', path: './components/api/index.ts' }],
  skills: [
    { name: 'API guide', path: './skills/api/SKILL.md' },
  ],
});
```

## SKILL.md

프론트매터가 있는 마크다운, 그 다음 AI가 따라야 할 지침입니다.

```markdown theme={"theme":"material-theme-darker"}
---
name: API guide
description: How to use this app's tools.
alwaysActive: true
---

Use `save_bookmark` to store a link. It returns a confirmation.
```

## tools.ts

`SKILL.md` 옆의 `tools.ts`는 그 스킬이 호출할 수 있는 도구를 선언합니다. 전체 도구 계약 — 선언 타입, 핸들러 요청/응답 형태, `content` vs `markdown` 결과 채널 — 은 [Tools](/apps/tools)에 있습니다.

```ts theme={"theme":"material-theme-darker"}
import { z } from 'zod';
import type { KazzleTool } from '@kazzle/app/tools';

export const tools = [
  {
    name: 'save_bookmark',
    displayName: 'Save bookmark',
    description: 'Save a bookmark URL and return a confirmation.',
    input: z.object({ url: z.string().url(), title: z.string().optional() }).strict(),
    target: {
      type: 'app',
      component: 'api',
      path: '/tools/save-bookmark',
      method: 'POST',
      body: '${input}',
    },
  },
] as const satisfies readonly KazzleTool[];
```

## AI가 스킬을 사용하는 방식

AI는 답변을 근거 있게 하기 위해 필요에 따라 `SKILL.md`를 읽고 (모든 스킬을 미리 읽지 않음), `tools.ts`에 선언된 도구를 호출할 수 있습니다. 일치하는 경로가 없는 도구는 작동하지 않으므로 둘 다 함께 추가하세요. `tools.json`은 지원되지 않습니다.
