Skills
Skills बनाना
Skills एजेंट को सिखाते हैं कि टूल्स का उपयोग कैसे और कब करना है। हर skill एक डायरेक्टरी होती है
जिसमें YAML frontmatter और markdown निर्देशों वाली SKILL.md फ़ाइल होती है।
OpenClaw कई roots से skills को एक निर्धारित precedence order में लोड करता है।
अपनी पहली skill बनाएँ
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-worldWrite SKILL.md
डायरेक्टरी के अंदर SKILL.md बनाएँ। frontmatter metadata परिभाषित करता है;
body एजेंट को निर्देश देता है।
---name: hello-worlddescription: A simple skill that prints a greeting.--- # Hello World When the user asks for a greeting, use the `exec` tool to run: ```bashecho "Hello from your custom skill!" नामकरण नियम:- `name` के लिए lowercase अक्षर, अंक और hyphens का उपयोग करें।- डायरेक्टरी नाम और frontmatter `name` को समान रखें।- `description` एजेंट को और slash-command discovery में दिखाया जाता है — इसे एक पंक्ति में और 160 वर्णों से कम रखें। OPENCLAW_DOCS_MARKER:stepClose: OPENCLAW_DOCS_MARKER:stepOpen:IHRpdGxlPSJWZXJpZnkgdGhlIHNraWxsIGxvYWRlZCI ```bashopenclaw skills listOpenClaw डिफ़ॉल्ट रूप से skills roots के अंतर्गत SKILL.md फ़ाइलों को देखता है। यदि
watcher अक्षम है या आप किसी मौजूदा session को जारी रख रहे हैं, तो एक नया
session शुरू करें ताकि एजेंट को refreshed सूची मिल सके:
# From chat — archive current session and start fresh/new # Or restart the gatewayopenclaw gateway restartTest it
ऐसा संदेश भेजें जिससे skill trigger होनी चाहिए:
openclaw agent --message "give me a greeting"या chat खोलें और एजेंट से सीधे पूछें। नाम से स्पष्ट रूप से invoke करने के लिए
/skill hello-world का उपयोग करें।
SKILL.md संदर्भ
आवश्यक fields
| Field | Description |
|---|---|
name |
lowercase अक्षरों, अंकों और hyphens वाला unique slug |
description |
एजेंट और discovery output में दिखाया जाने वाला एक-पंक्ति विवरण |
वैकल्पिक frontmatter keys
| Field | Default | Description |
|---|---|---|
user-invocable |
true |
skill को user slash command के रूप में expose करें |
disable-model-invocation |
false |
skill को एजेंट के system prompt से बाहर रखें (/skill के ज़रिए फिर भी चलता है) |
command-dispatch |
— | model को bypass करते हुए slash command को सीधे tool पर route करने के लिए tool पर set करें |
command-tool |
— | command-dispatch: tool set होने पर invoke किया जाने वाला tool नाम |
command-arg-mode |
raw |
tool dispatch के लिए raw args string को tool तक forward करता है |
homepage |
— | macOS 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-searchdescription: Search using Gemini CLI.metadata: { "openclaw": { "requires": { "bins": ["gemini"] }, "primaryEnv": "GEMINI_API_KEY" } }---Gating options
| Key | Description |
|---|---|
requires.bins |
सभी binaries PATH पर मौजूद होनी चाहिए |
requires.anyBins |
कम से कम एक binary PATH पर मौजूद होनी चाहिए |
requires.env |
हर env var process या config में मौजूद होना चाहिए |
requires.config |
हर openclaw.json path truthy होना चाहिए |
os |
Platform filter: ["darwin"], ["linux"], ["win32"] |
always |
सभी gates छोड़ने और skill को हमेशा शामिल करने के लिए true set करें |
पूरा संदर्भ: Skills — Gating।
Environment and API keys
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 skillopenclaw skills workshop propose-create \ --name "hello-world" \ --description "A simple skill that prints a greeting." \ --proposal ./PROPOSAL.md # Propose an update to an existing skillopenclaw 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 करना
Ensure your SKILL.md is complete
सुनिश्चित करें कि name, description, और कोई भी metadata.openclaw gating fields
set हैं। यदि आपके पास project page है तो homepage URL जोड़ें।
Install the ClawHub skill
ClawHub skill current publish command shape और आवश्यक metadata को document करती है:
openclaw skills install @openclaw/clawhub-publishPublish
clawhub publishपूरे flow के लिए ClawHub — Publishing देखें।
Best practices
संबंधित
Loading order, gating, allowlists, और SKILL.md format।
agent-drafted skills के लिए proposal queue।
पूरा skills.* config schema।
public registry पर skills browse और publish करें।
Plugins उन tools के साथ skills ship कर सकते हैं जिन्हें वे document करते हैं।