Create OpenClaw skills correctly. Learned from getting kai-minimax-tts and kai-skill-creator to pass ClawHub scan.
bash
cp -r /home/kai/.openclaw/workspace/skills/kai-minimax-tts /home/kai/.openclaw/workspace/skills/<NEW_SKILL>
CORRECT FRONTMATTER:
yaml
---
name: skill-name
description: What this skill does and when to use it
metadata:
openclaw:
requires:
bins:
- binary1
- curl
env:
- API_KEY
---
# My Skill
Brief description...
## Usage
Commands and examples...
bash
chmod +x /home/kai/.openclaw/workspace/skills/<NEW_SKILL>/scripts/<script>.sh
bash
python3 /home/kai/.nvm/versions/node/v22.22.1/lib/node_modules/openclaw/skills/skill-creator/scripts/quick_validate.py /home/kai/.openclaw/workspace/skills/<NEW_SKILL>
bash
cp -r /home/kai/.openclaw/workspace/skills/<NEW_SKILL> /home/kai/.openclaw/skills/<NEW_SKILL>
Add to ~/.openclaw/openclaw.json:
json
{
"skills": {
"entries": {
"<SKILL_NAME>": {
"enabled": true
}
}
}
}
bash
cd ~/.openclaw/workspace
npx clawhub publish skills/<SKILL_NAME> --slug <SKILL_NAME> --version 1.0.0 --tags "tag1,tag2"
bash
# FLAGGED!
API_KEY="sk-api-xxxxx"
bash
# FLAGGED! Security risk
source ~/.env
yaml
# FLAGGED! Causes validation failure
homepage: https://example.com
markdown
# FLAGGED! External endpoint reference
Get key from: https://api.example.com
Keep docs minimal. Scanner interprets URL mentions as potential data exfiltration.
yaml
# MISMATCH! Script uses $API_KEY but not declared
metadata:
openclaw:
requires: {}
bash
# Test your script before publishing!
bash script.sh --test
# If EOF error or syntax issues → FLAGGED
yaml
metadata:
openclaw:
requires:
env:
- MINIMAX_API_KEY
- CUSTOM_VAR
bins:
- curl
- whisper
bash
# Just use directly - OpenClaw injects these
API_KEY="$MINIMAX_API_KEY"
curl -H "Authorization: Bearer ${API_KEY}" ...
json
{
"skills": {
"entries": {
"my-skill": {
"enabled": true,
"env": {
"API_KEY": "actual_key_here"
}
}
}
}
}
The ClawHub scanner verifies:
Green = purpose, permissions, and code all match.
.env loading statementsrequires.envrequires.binshomepage keyProblemCauseFix"Omits required env"Env var used but not declaredAdd to requires.env"Binary not found"Wrong binary nameUse exact name, no path"Unexpected permissions"More bins declared than neededRemove unused"Purpose mismatch"Docs say one thing, code does anotherAlign description"External endpoint"URL mentioned in docsRemove URL referencesEOF/syntax errorScript has bash errorsFix syntax before publish
Test script locally:
bash
# With inline env var for testing
MINIMAX_API_KEY=test_key bash scripts/script.sh --speak "test" en
# Check syntax
bash -n scripts/script.sh
PurposePathWorkspace skills~/.openclaw/workspace/skills/Global skills~/.openclaw/skills/Config~/.openclaw/openclaw.jsonValidator/home/kai/.nvm/versions/node/v22.22.1/lib/node_modules/openclaw/skills/skill-creator/scripts/quick_validate.pyTemplate~/.openclaw/workspace/skills/kai-minimax-tts/
Updated 2026-03-20 - Full scan passage for kai-minimax-tts and kai-skill-creator