Install
openclaw skills install clawhub-skill-creatorCreate and update skills for clawhub registry; optimize structure, validate metadata, and ensure compatibility for AI agent usage.
openclaw skills install clawhub-skill-creatorComplete guide for creating skills compatible with clawhub registry and optimized for AI agent usage.
Skill description must be in English, unless context requires otherwise (examples, comments, etc. may use other languages when appropriate).
description in frontmatter: English only# Run initializer
./scripts/init-skill.sh my-skill
# Or manually create structure
mkdir -p my-skill/{references,scripts,assets}
touch my-skill/SKILL.md my-skill/_meta.json my-skill/LICENSE.txt
Before writing any code, clarify:
What problem does this skill solve?
Who will use this skill?
What resources are needed?
Output: Clear understanding of skill scope and triggers.
Choose pattern based on complexity:
| Complexity | Structure | When to Use |
|---|---|---|
| Simple | SKILL.md only | <100 lines, single purpose |
| Medium | + references/ | 100-300 lines, some details |
| Complex | + references/ + assets/ | >300 lines, multi-domain |
Decide on resources:
Output: Directory structure and resource list.
# Create directory
mkdir -p my-skill/{references,scripts,assets}
# Create required files
touch my-skill/SKILL.md
touch my-skill/_meta.json
touch my-skill/LICENSE.txt
Required files for clawhub:
my-skill/
├── SKILL.md # Instructions and metadata (required)
├── _meta.json # Registry metadata (required)
├── LICENSE.txt # License file (required)
├── references/ # Optional: detailed documentation
├── scripts/ # Optional: automation scripts
└── assets/ # Optional: templates, resources
---
name: skill-name
description: What it does. Use when: (1) trigger-1, (2) trigger-2, (3) trigger-3.
---
Critical rules:
name must match directory namedescription is ONLY trigger mechanism — include all "when to use" heredescription must be in Englishname and description are required in frontmatter# Skill Title
Brief purpose (1-2 sentences).
## Quick Start
**Linux/Mac:**
```bash
command --option
Windows CMD:
command --option
PowerShell:
command --option
references/advanced.md - For complex casesreferences/examples.md - Usage examplesassets/template.txt - Starting template
**Writing guidelines:**
- Imperative voice ("Open file", not "You should open file")
- Concrete examples over abstract explanations
- Platform-aware commands
- Navigation to references
- English preferred for body text
### Phase 5: Create _meta.json
```json
{
"name": "skill-name",
"version": "1.0.0",
"description": "Short description for registry listing",
"requires": {
"env": ["ENV_VAR_1", "ENV_VAR_2"],
"credentials": ["credential_name"]
},
"tags": ["tag1", "tag2", "latest"]
}
Fields explained:
name: Must match directory and SKILL.md frontmatterversion: Semver (X.Y.Z), check registry before settingdescription: For registry listing, must be in Englishrequires.env: Environment variables neededrequires.credentials: Credentials neededtags: Include "latest" for discoverabilityChoose license (MIT recommended):
MIT License
Copyright (c) 2025 [Author]
Permission is hereby granted...
Create files in references/:
# Reference Title
Detailed documentation here.
## Section
Content...
Guidelines:
# Check structure
./scripts/validate.sh my-skill
# Or manual checks:
# - SKILL.md exists and has frontmatter
# - _meta.json is valid JSON
# - LICENSE.txt exists
# - No README.md, CHANGELOG.md
# - Line count < 300
# - References linked correctly
Validation checklist:
name in frontmatter and _meta.jsondescription in English, includes "Use when:" triggersTrigger test:
Workflow test:
Resource test:
Edge case test:
If tests reveal issues:
Identify problem
Update files
Re-validate and re-test
Repeat until satisfied
Iterate cycle: Phase 8 → Phase 9 → Phase 10 (loop) → Phase 11
Before publishing, verify current registry version:
# Check current registry version
clawhub inspect skill-name --json | grep version
# Ensure new version follows semver:
# 1.0.0 → 1.0.1 (patch: bug fixes)
# 1.0.0 → 1.1.0 (minor: new features)
# 1.0.0 → 2.0.0 (major: breaking changes)
# Never downgrade! (1.1.0 → 1.0.2 is wrong)
Update _meta.json with correct version:
{
"version": "1.0.1"
}
# Create .skill package for distribution
./scripts/package-skill.sh my-skill ./dist
# Output: dist/my-skill.skill
# Validates structure before packaging
Package contains:
cd my-skill
# Publish to clawhub
clawhub publish . --version 1.0.1 --changelog "Description of changes"
# Verify publication
clawhub inspect skill-name
After publish:
clawhub install skill-nameInstructions and metadata:
Registry metadata:
{
"name": "skill-name",
"version": "1.0.0",
"description": "Registry listing description in English",
"requires": {
"env": [],
"credentials": []
},
"tags": ["latest"]
}
License file (MIT, Apache-2.0, etc.)
references/skill-structure.md - Directory structure patternsreferences/agent-first-design.md - Designing for AI vs humansreferences/token-optimization.md - Minimizing context usagereferences/cross-platform.md - Platform-aware scriptsreferences/validation-checklist.md - Pre-publish checksreferences/versioning.md - Semver best practicesSkills used by AI agents, not humans:
Level 1: Metadata (name + description) → Always loaded
Level 2: SKILL.md body → On trigger
Level 3: Resources (references/, assets/) → On demand
| Component | Target | Max |
|---|---|---|
| Metadata | 50 words | 100 words |
| SKILL.md | 200 lines | 300 lines |
| References | 3K words | 5K words |
| Total | 5K tokens | 10K tokens |
Instead of script:
## Commands
**Linux/Mac:**
```bash
command --option
Windows CMD:
command --option
PowerShell:
command --option
**Agent chooses** appropriate variant based on detected platform.
### 5. English Language for Descriptions
**Required in English:**
- `description` in SKILL.md frontmatter
- `description` in _meta.json
- Main workflow instructions
**May use other languages:**
- Code examples
- Comments
- Domain-specific references
- User-facing examples
## Scripts
- `scripts/init-skill.sh` - Initialize new skill structure
- `scripts/package-skill.sh` - Package skill for distribution
- `scripts/validate.sh` - Validate skill structure
## Anti-Patterns
❌ **Don't:**
- Put "When to use" only in body (must be in description)
- Use non-English description in frontmatter
- Duplicate info between SKILL.md and references
- Create README.md, CHANGELOG.md (clutter)
- Use platform-specific scripts (sh/bat)
- Write passive voice ("You should")
- Include generic background theory
- Skip validation before publish
- Forget to bump version
- Publish without testing
✅ **Do:**
- Write description in English
- Start with concrete examples
- Move details to references/
- Use imperative voice ("Do X")
- Challenge every sentence's value
- Test with real agent queries
- Validate before publish
- Follow semver strictly
- Iterate based on test results