Install
openclaw skills install liuchang-skill-creatorCreate, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating against the AgentSkills spec). Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".
openclaw skills install liuchang-skill-creatorThis skill provides guidance for creating effective skills.
Skills are modular, self-contained packages that extend agent capabilities by providing specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific domains or tasks.
The context window is a public good. Skills share the context window with everything else the agent needs.
Default assumption: The agent is already very smart. Only add context it doesn't already have.
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter (name, description)
│ └── Markdown instructions
├── scripts/ - Executable code
├── references/ - Documentation to load as needed
└── assets/ - Files used in output
Understand concrete examples of how the skill will be used. Ask:
Analyze each example to identify:
Run the init script:
scripts/init_skill.py <skill-name> --path <output-directory> [--resources scripts,references,assets]
---
name: skill-name
description: Clear description of what the skill does AND when to trigger it. Include specific contexts, use cases, and examples. This is the PRIMARY triggering mechanism - put all "when to use" info here, not in the body.
---
Description is for the model: When the agent starts a session, it scans all skill descriptions to decide "is there a skill for this request?" So the description must clearly state:
Keep under 500 lines. Use references/ for detailed content.
scripts/package_skill.py <path/to/skill-folder>
The highest-signal content in any skill is a Gotchas section. Build this from common failure points the agent runs into.
## Gotchas
- **File encoding**: Always use UTF-8, otherwise parsing fails
- **Large files**: Split files over 10MB before processing
- **API rate limits**: Add 1-second delay between requests
Best practice: Update gotchas over time as you encounter new failure points.
Skills can include memory by storing data within them:
## Memory
This skill stores data in `~/.my-skill/data.json`. On each run, the agent reads this file to understand previous context.
Storage options:
Important: Store data in a stable location outside the skill directory. Use ${CLAUDE_PLUGIN_DATA} if available - data in the skill directory may be deleted on upgrades.
Skills can include hooks that are only activated when called:
## Hooks
When activated, this skill registers:
- `/careful`: Blocks dangerous operations (rm -rf, DROP TABLE)
- `/freeze`: Only allows edits in specific directories
Use these for opinionated behaviors you don't want always on, but are extremely useful sometimes.
For skills requiring user-specific context, store configuration in a config file:
## Setup
This skill requires configuration in `config.json`:
- `api_key`: Your API key
- `channel`: Slack channel for notifications
If config is missing, ask the user for required fields.
For skills that need verification, include test patterns:
## Verification
After execution, verify the output:
1. Check file exists: `ls -la output/`
2. Run validation script: `scripts/validate.py output/file.json`
3. Take a screenshot for visual confirmation
Consider techniques:
For small teams, check skills into the repo (e.g., ./skills/ or ./.claude/skills).
For larger teams, create an internal marketplace where users can install skills. Document how to submit and review skills.
Track skill usage with a PreToolUse hook:
# Log when skill is triggered
@hook("PreToolUse")
def log_skill_usage(agent, tool_name, input):
if tool_name == "Skill":
log(f"Skill used: {input['skill_name']}")
return input
This helps identify:
# PDF Processing
## Quick Start
[basic example]
## Advanced Features
- **Form filling**: See [references/forms.md](forms.md)
- **API reference**: See [references/api.md](api.md)
bigquery-skill/
├── SKILL.md
└── references/
├── finance.md
├── sales.md
└── product.md
## Editing Documents
For simple edits, modify XML directly.
**For tracked changes**: See [references/redlining.md](redlining.md)
| Pattern | When to Use |
|---|---|
| scripts/ | Deterministic code, repeatedly rewritten |
| references/ | Documentation, schemas, examples |
| assets/ | Templates, images, output files |
| gotchas | Common failure points |
| hooks | Conditional behaviors |
| memory | Persistent context across runs |
| config.json | User-specific settings |
Tip: Most skills begin as a few lines and a single gotcha. They get better because people keep adding to them as the agent hits new edge cases.