> ## 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.

# Skills

> AI को अपने ऐप के बारे में सिखाएं और इसे कॉल करने के लिए टूल दें।

# Skills

एक skill एक **फ़ोल्डर** है जो AI को बताता है कि वह आपके ऐप के साथ क्या जानता है और क्या कर सकता है। इसमें शामिल हैं:

* `SKILL.md` — निर्देश जो AI पढ़ता है (आवश्यक)।
* `tools.ts` — टूल की सूची जो AI कॉल कर सकता है (वैकल्पिक)।

`SKILL.md` ऐप और इसके टूल का वर्णन करता है; `tools.ts` टूल घोषित करता है; प्रत्येक टूल आपके ऐप के किसी एक कंपोनेंट में एक HTTP रूट द्वारा लागू किया जाता है।

## Skills को परिभाषित करना

`kazzle.config.ts` को प्रत्येक skill के `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

Frontmatter के साथ Markdown, फिर निर्देश जो AI को अनुसरण करने चाहिए।

```markdown theme={"theme":"material-theme-darker"}
---
name: API guide
description: इस ऐप के टूल का उपयोग कैसे करें।
alwaysActive: true
---

एक लिंक स्टोर करने के लिए `save_bookmark` का उपयोग करें। यह एक पुष्टिकरण लौटाता है।
```

## tools.ts

`SKILL.md` के बगल में `tools.ts` उन टूल को घोषित करता है जो वह skill कॉल कर सकता है। पूर्ण tool contract — घोषणा प्रकार, handler request/response shape, और `content` बनाम `markdown` result channels — [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: 'एक bookmark URL सेव करें और एक पुष्टिकरण लौटाएं।',
    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 कैसे skills का उपयोग करता है

AI अपने उत्तरों को आधार देने के लिए मांग पर `SKILL.md` पढ़ता है (सभी skills अग्रिम में नहीं), और `tools.ts` में घोषित टूल कॉल कर सकता है। कोई मेल खाने वाले रूट के बिना एक tool कुछ नहीं करता; दोनों को एक साथ जोड़ें। `tools.json` समर्थित नहीं है।
