Install
openclaw skills install skill-dev-guideComprehensive tutorial for building reusable AI Skills with instructions, scripts, security best practices, and examples on ClawHub and OpenClaw platforms.
openclaw skills install skill-dev-guideA comprehensive guide to creating Skills for ClawHub and OpenClaw.
一份完整的 Skill 开发教程,适用于 ClawHub 和 OpenClaw 平台。
A Skill is a reusable prompt template that extends AI capabilities. Every Skill needs a SKILL.md file.
Skill 是一个可复用的提示词模板,用于扩展 AI 能力。每个 Skill 都需要一个 SKILL.md 文件。
# My Skill Name
Short description of what this skill does.
---
instructions: |
You are a helpful assistant that...
## Your Task
1. Step one
2. Step two
The instructions field defines AI behavior:
instructions: |
You are an expert at [task].
## Guidelines
- Be concise
- Focus on accuracy
Tips / 提示:
Add automation with bash scripts:
scripts:
- name: validate
description: Validate input data
command: ./scripts/validate.sh
Security Rules / 安全规则:
set -a (exports all variables) / 禁止使用 set -aDeclare which commands your skill needs:
allowed_commands:
- curl
- jq
- node
| Do / 推荐 | Don't / 避免 |
|---|---|
| Explicit variable exports | set -a or export * |
| Documented API calls | Hidden external requests |
| Clear script descriptions | Vague or missing descriptions |
| User-facing outputs | Silent background operations |
Be Specific / 具体明确
Provide Context / 提供上下文
Set Boundaries / 设定边界
See examples/minimal.md for a starter template.
See examples/with-script.md for automation patterns.
For a complete MCP + Skill implementation example, check out:
| Issue | Solution |
|---|---|
| Skill not found | Check file is named SKILL.md (case-sensitive) |
| Script permission denied | Add chmod +x to your script |
| Security scan failed | Review scripts for set -a, hardcoded secrets |
| Instructions too long | Break into sections, use bullet points |
Q: How do I test my skill locally?
A: Use the ClawHub CLI or import directly in OpenClaw.
Q: Can I use external APIs?
A: Yes, but document them clearly in your skill description.
Q: Where can I get help?
A: Open an issue for discussion and questions:
Created by @CCCpan
Found this helpful? Star the repo or open an issue to share your feedback!