OpenClaw skills extend the AI's capabilities with custom commands, automations, and integrations. This guide walks you through creating a production-ready skill from scratch, covering the skill.md format, permission model, debugging techniques, and common pitfalls.
Why This Is Hard to Do Yourself
These are the common pitfalls that trip people up.
Undocumented format quirks
The skill.md format has implicit conventions, version differences, and edge cases not covered in official docs
Permission model confusion
Skills declare capabilities but the actual permission enforcement varies between OpenClaw versions
Debugging is painful
No built-in debugger for skills. Errors are cryptic and stack traces reference internal OpenClaw code, not your skill
Hot reload inconsistency
Sometimes skill changes require a full restart. Other times they hot-reload. No clear documentation on which is which.
Step-by-Step Guide
Understand the skill.md structure
Learn the required sections.
# skill.md has these sections:
# ---
# name: my-custom-skill
# version: 1.0.0
# description: What this skill does
# author: your-name
# permissions:
# - filesystem:read
# - network:outbound
# triggers:
# - command: /myskill
# - pattern: "when I say X do Y"
# ---
#
# ## Instructions
# Detailed instructions for the AI on how to use this skillCreate the skill directory
mkdir -p ~/.openclaw/skills/my-custom-skill
touch ~/.openclaw/skills/my-custom-skill/skill.mdWrite the skill manifest (frontmatter)
# In skill.md, start with YAML frontmatter:
---
name: daily-standup
version: 1.0.0
description: Collects standup updates from team members and posts a summary
author: your-name
permissions:
- filesystem:read
- filesystem:write
triggers:
- command: /standup
- schedule: "0 9 * * 1-5" # 9 AM weekdays
---Warning: Always declare the minimum permissions your skill needs. Requesting unnecessary permissions will cause ClawHub reviewers to reject your skill.
Write the skill instructions
# Below the frontmatter, write clear instructions:
## Instructions
You are a standup facilitator. When triggered:
1. Ask each team member (from the team list) three questions:
- What did you accomplish yesterday?
- What are you working on today?
- Any blockers?
2. Compile responses into a formatted summary
3. Save the summary to ./standups/YYYY-MM-DD.md
4. Post the summary to the configured channel
## Team List
- Alice (frontend)
- Bob (backend)
- Carol (design)
## Output Format
Use this markdown template for summaries:
...Add helper scripts (optional)
# For skills that need code execution:
mkdir -p ~/.openclaw/skills/my-custom-skill/scripts
# Create a helper script:
cat > ~/.openclaw/skills/my-custom-skill/scripts/format-standup.js << 'EOF'
export function formatStandup(responses) {
return responses.map(r =>
`### ${r.name} (${r.role})\n` +
`**Yesterday:** ${r.yesterday}\n` +
`**Today:** ${r.today}\n` +
`**Blockers:** ${r.blockers || 'None'}\n`
).join('\n');
}
EOFTest your skill locally
# Restart OpenClaw to load the new skill:
npm restart
# Test via the command trigger:
# In your OpenClaw chat, type: /standup
# Check logs for errors:
tail -f ~/.openclaw/logs/skills.log | grep daily-standupIterate and debug
# Common debugging steps:
# 1. Check skill loaded correctly:
curl http://localhost:3000/api/skills
# 2. Check skill logs:
grep "daily-standup" ~/.openclaw/logs/skills.log
# 3. Test permissions:
# Try actions that require each declared permission
# and verify they workNeed a Production-Quality Skill?
Writing a basic skill is one thing. Building a robust, error-handled, well-tested skill that works reliably in production is another. Our custom development experts build ClawHub skills every day.
Get matched with a specialist who can help.
Sign Up for Expert Help โ