docs/tools/creating-skills.md
Skills teach the agent how and when to use tools. Each skill is a directory
containing a SKILL.md file with YAML frontmatter and markdown instructions.
For how skills are loaded and prioritized, see Skills.
```bash
mkdir -p ~/.openclaw/workspace/skills/hello-world
```
```markdown
---
name: hello-world
description: A simple skill that says hello.
---
# Hello World Skill
When the user asks for a greeting, use the `echo` tool to say
"Hello from your custom skill!".
```
Use hyphen-case with lowercase letters, digits, and hyphens for the skill
`name`. Keep the folder name and frontmatter `name` aligned.
```bash
# From chat
/new
# Or restart the gateway
openclaw gateway restart
```
Verify the skill loaded:
```bash
openclaw skills list
```
```bash
openclaw agent --message "give me a greeting"
```
Or just chat with the agent and ask for a greeting.
The YAML frontmatter supports these fields:
| Field | Required | Description |
|---|---|---|
name | Yes | Unique identifier using lowercase letters, digits, and hyphens |
description | Yes | One-line description shown to the agent |
metadata.openclaw.os | No | OS filter (["darwin"], ["linux"], etc.) |
metadata.openclaw.requires.bins | No | Required binaries on PATH |
metadata.openclaw.requires.config | No | Required config keys |
exec, ensure prompts don't allow arbitrary command injection from untrusted inputopenclaw agent --message "..." to test before sharing| Location | Precedence | Scope |
|---|---|---|
\<workspace\>/skills/ | Highest | Per-agent |
\<workspace\>/.agents/skills/ | High | Per-workspace agent |
~/.agents/skills/ | Medium | Shared agent profile |
~/.openclaw/skills/ | Medium | Shared (all agents) |
| Bundled (shipped with OpenClaw) | Low | Global |
skills.load.extraDirs | Lowest | Custom shared folders |
skills.* config schema