मुख्य सामग्री पर जाएं
Skills एजेंट को सिखाते हैं कि टूल्स का उपयोग कैसे और कब करना है। हर skill एक डायरेक्टरी होती है जिसमें YAML frontmatter और markdown निर्देशों वाली SKILL.md फ़ाइल होती है। OpenClaw कई roots से skills को एक निर्धारित precedence order में लोड करता है।

अपनी पहली skill बनाएँ

1

Create the skill directory

Skills आपके workspace के skills/ फ़ोल्डर में रहती हैं। अपनी नई skill के लिए एक डायरेक्टरी बनाएँ:
mkdir -p ~/.openclaw/workspace/skills/hello-world
संगठन के लिए आप skills को subfolders में समूहित कर सकते हैं — फिर भी skill का नाम SKILL.md frontmatter से तय होता है, फ़ोल्डर path से नहीं:
mkdir -p ~/.openclaw/workspace/skills/personal/hello-world
# skill name is still "hello-world", invoked as /hello-world
2

Write SKILL.md

डायरेक्टरी के अंदर SKILL.md बनाएँ। frontmatter metadata परिभाषित करता है; body एजेंट को निर्देश देता है।
---
name: hello-world
description: A simple skill that prints a greeting.
---

# Hello World

When the user asks for a greeting, use the `exec` tool to run:

```bash
echo "Hello from your custom skill!"

नामकरण नियम:
- `name` के लिए lowercase अक्षर, अंक और hyphens का उपयोग करें।
- डायरेक्टरी नाम और frontmatter `name` को समान रखें।
- `description` एजेंट को और slash-command discovery में दिखाया जाता है —
  इसे एक पंक्ति में और 160 वर्णों से कम रखें।

</Step>

<Step title="Verify the skill loaded">
```bash
openclaw skills list
OpenClaw डिफ़ॉल्ट रूप से skills roots के अंतर्गत SKILL.md फ़ाइलों को देखता है। यदि watcher अक्षम है या आप किसी मौजूदा session को जारी रख रहे हैं, तो एक नया session शुरू करें ताकि एजेंट को refreshed सूची मिल सके:
# From chat — archive current session and start fresh
/new

# Or restart the gateway
openclaw gateway restart
3

Test it

ऐसा संदेश भेजें जिससे skill trigger होनी चाहिए:
openclaw agent --message "give me a greeting"
या chat खोलें और एजेंट से सीधे पूछें। नाम से स्पष्ट रूप से invoke करने के लिए /skill hello-world का उपयोग करें।

SKILL.md संदर्भ

आवश्यक fields

FieldDescription
namelowercase अक्षरों, अंकों और hyphens वाला unique slug
descriptionएजेंट और discovery output में दिखाया जाने वाला एक-पंक्ति विवरण

वैकल्पिक frontmatter keys

FieldDefaultDescription
user-invocabletrueskill को user slash command के रूप में expose करें
disable-model-invocationfalseskill को एजेंट के system prompt से बाहर रखें (/skill के ज़रिए फिर भी चलता है)
command-dispatchmodel को bypass करते हुए slash command को सीधे tool पर route करने के लिए tool पर set करें
command-toolcommand-dispatch: tool set होने पर invoke किया जाने वाला tool नाम
command-arg-moderawtool dispatch के लिए raw args string को tool तक forward करता है
homepagemacOS Skills UI में “Website” के रूप में दिखाया जाने वाला URL
Gating fields (requires.bins, requires.env, आदि) के लिए देखें Skills — Gating

{baseDir} का उपयोग

skill body में {baseDir} का उपयोग करके hardcoded paths के बिना skill डायरेक्टरी के अंदर की फ़ाइलों को reference करें:
Run the helper script at `{baseDir}/scripts/run.sh`.

conditional activation जोड़ना

अपनी skill को gate करें ताकि वह केवल तब load हो जब उसकी dependencies उपलब्ध हों:
---
name: gemini-search
description: Search using Gemini CLI.
metadata: { "openclaw": { "requires": { "bins": ["gemini"] }, "primaryEnv": "GEMINI_API_KEY" } }
---
KeyDescription
requires.binsसभी binaries PATH पर मौजूद होनी चाहिए
requires.anyBinsकम से कम एक binary PATH पर मौजूद होनी चाहिए
requires.envहर env var process या config में मौजूद होना चाहिए
requires.configहर openclaw.json path truthy होना चाहिए
osPlatform filter: ["darwin"], ["linux"], ["win32"]
alwaysसभी gates छोड़ने और skill को हमेशा शामिल करने के लिए true set करें
पूरा संदर्भ: Skills — Gating
openclaw.json में किसी skill entry से API key जोड़ें:
{
  skills: {
    entries: {
      "gemini-search": {
        enabled: true,
        apiKey: { source: "env", provider: "default", id: "GEMINI_API_KEY" },
      },
    },
  },
}
key केवल उस agent turn के लिए host process में inject की जाती है। यह sandbox तक नहीं पहुँचती — देखें sandboxed env vars

Skill Workshop के ज़रिए प्रस्ताव दें

agent-drafted skills के लिए या जब आप किसी skill के live होने से पहले operator review चाहते हों, SKILL.md सीधे लिखने के बजाय Skill Workshop proposals का उपयोग करें।
# Propose a brand-new skill
openclaw skills workshop propose-create \
  --name "hello-world" \
  --description "A simple skill that prints a greeting." \
  --proposal ./PROPOSAL.md

# Propose an update to an existing skill
openclaw skills workshop propose-update hello-world \
  --proposal ./PROPOSAL.md \
  --description "Updated greeting skill"
जब proposal में support files शामिल हों, तो --proposal-dir का उपयोग करें:
openclaw skills workshop propose-create \
  --name "hello-world" \
  --description "A simple skill that prints a greeting." \
  --proposal-dir ./hello-world-proposal/
डायरेक्टरी में PROPOSAL.md होना चाहिए। Support files assets/, examples/, references/, scripts/, या templates/ में जा सकती हैं। review के बाद:
openclaw skills workshop inspect <proposal-id>
openclaw skills workshop apply <proposal-id>
पूरे proposal lifecycle के लिए Skill Workshop देखें।

ClawHub पर publish करना

1

Ensure your SKILL.md is complete

सुनिश्चित करें कि name, description, और कोई भी metadata.openclaw gating fields set हैं। यदि आपके पास project page है तो homepage URL जोड़ें।
2

Install the ClawHub skill

ClawHub skill current publish command shape और आवश्यक metadata को document करती है:
openclaw skills install @openclaw/clawhub-publish
3

Publish

clawhub publish
पूरे flow के लिए ClawHub — Publishing देखें।

Best practices

  • संक्षिप्त रहें — model को निर्देश दें कि क्या करना है, यह नहीं कि AI कैसे होना है।
  • Safety पहले — यदि आपकी skill exec का उपयोग करती है, तो सुनिश्चित करें कि prompts untrusted input से arbitrary command injection की अनुमति न दें।
  • स्थानीय रूप से test करें — share करने से पहले openclaw agent --message "..." का उपयोग करें।
  • ClawHub का उपयोग करें — scratch से बनाने से पहले clawhub.ai पर community skills browse करें।

संबंधित

Skills reference

Loading order, gating, allowlists, और SKILL.md format।

Skill Workshop

agent-drafted skills के लिए proposal queue।

Skills config

पूरा skills.* config schema।

ClawHub

public registry पर skills browse और publish करें।

Building plugins

Plugins उन tools के साथ skills ship कर सकते हैं जिन्हें वे document करते हैं।