2026-01-31 16:04:03 -05:00
---
title: "Creating Skills"
2026-02-22 20:36:39 +01:00
summary: "Build and test custom workspace skills with SKILL.md"
read_when:
- You are creating a new custom skill in your workspace
- You need a quick starter workflow for SKILL.md-based skills
2026-01-31 16:04:03 -05:00
---
2026-01-25 14:54:48 +02:00
# Creating Custom Skills 🛠
2026-01-30 03:15:10 +01:00
OpenClaw is designed to be easily extensible. "Skills" are the primary way to add new capabilities to your assistant.
2026-01-25 14:54:48 +02:00
## What is a Skill?
2026-01-31 21:13:13 +09:00
2026-01-25 14:54:48 +02:00
A skill is a directory containing a `SKILL.md` file (which provides instructions and tool definitions to the LLM) and optionally some scripts or resources.
## Step-by-Step: Your First Skill
### 1. Create the Directory
2026-01-31 21:13:13 +09:00
2026-01-30 03:15:10 +01:00
Skills live in your workspace, usually `~/.openclaw/workspace/skills/` . Create a new folder for your skill:
2026-01-31 21:13:13 +09:00
2026-01-25 14:54:48 +02:00
```bash
2026-01-30 03:15:10 +01:00
mkdir -p ~/.openclaw/workspace/skills/hello-world
2026-01-25 14:54:48 +02:00
```
### 2. Define the `SKILL.md`
2026-01-31 21:13:13 +09:00
2026-01-25 14:54:48 +02:00
Create a `SKILL.md` file in that directory. This file uses YAML frontmatter for metadata and Markdown for instructions.
```markdown
---
name: hello_world
description: A simple skill that says hello.
---
# Hello World Skill
2026-01-31 21:13:13 +09:00
2026-01-25 14:54:48 +02:00
When the user asks for a greeting, use the `echo` tool to say "Hello from your custom skill!".
```
### 3. Add Tools (Optional)
2026-01-31 21:13:13 +09:00
2026-01-25 14:54:48 +02:00
You can define custom tools in the frontmatter or instruct the agent to use existing system tools (like `bash` or `browser` ).
2026-01-30 03:15:10 +01:00
### 4. Refresh OpenClaw
2026-01-31 21:13:13 +09:00
2026-01-30 03:15:10 +01:00
Ask your agent to "refresh skills" or restart the gateway. OpenClaw will discover the new directory and index the `SKILL.md` .
2026-01-25 14:54:48 +02:00
## Best Practices
2026-01-31 21:13:13 +09:00
- **Be Concise**: Instruct the model on _what_ to do, not how to be an AI.
2026-01-25 14:54:48 +02:00
- **Safety First**: If your skill uses `bash` , ensure the prompts don't allow arbitrary command injection from untrusted user input.
2026-01-30 03:15:10 +01:00
- **Test Locally**: Use `openclaw agent --message "use my new skill"` to test.
2026-01-25 14:54:48 +02:00
## Shared Skills
2026-01-31 21:13:13 +09:00
2026-01-30 21:01:02 +01:00
You can also browse and contribute skills to [ClawHub ](https://clawhub.com ).