# How do you create an OpenClaw skill?

Create a folder in your workspace skills directory with a SKILL.md file: a name, a one-line description and plain instructions. Then see how to test, gate and publish it.

Tool: OpenClaw. By Julien Lieben. Updated 2026-12-01. Source: https://coldiq.com/university/openclaw/create-openclaw-skill

## In short

- An OpenClaw skill is a folder with a SKILL.md file. The file has YAML frontmatter (a short header of settings) and Markdown instructions.
- Only two fields are required: name, in lowercase letters, digits and hyphens, and description, one line under 160 characters.
- Put your skill in ~/.openclaw/workspace/skills. OpenClaw watches that folder and picks up changes.
- Gating (load conditions) keeps a skill hidden until the program, key or operating system it needs is present.
- You can share a finished skill on ClawHub with the clawhub command line tool.

## Steps

1. Make a folder under ~/.openclaw/workspace/skills with the skill name.
2. Write SKILL.md with a name, a description and short instructions.
3. Run openclaw skills list, then test the skill with a real request.

## What is a skill, in practice?

A skill teaches the agent how and when to use a tool. Think of it as a short procedure you would give a new colleague: when this happens, do these steps, in this order, with these limits.

The OpenClaw docs define a skill as a directory with a SKILL.md file. The top of the file holds metadata. The rest is plain instructions in Markdown, a simple text format with headings and lists.

A good first skill is a task you repeat each week. For a sales team, that could be "prepare a one-page brief before a call" or "draft a follow-up after a demo". The agent already has the tools. The skill gives it your method.


## How do you create your first skill?

The official guide uses a hello-world example. These are the same steps, in order.

1. Create the folder: mkdir -p ~/.openclaw/workspace/skills/hello-world
2. Create a file named SKILL.md in that folder.
3. At the top, add a frontmatter block between two lines of three dashes, with name: hello-world and a one-line description.
4. Below the frontmatter, write the instructions, for example: when the user asks for a greeting, use the exec tool to print a greeting.
5. Check that OpenClaw sees it: openclaw skills list
6. Test it: openclaw agent --message "give me a greeting", or type /skill hello-world in a chat.

Tip: If you are in an existing chat session, the agent may not see the new skill yet. Type /new in the chat, or run openclaw gateway restart.


## What goes in the SKILL.md frontmatter?

The name must use lowercase letters, digits and hyphens, and should match the folder name. The description is shown to the agent and in the slash-command list, so keep it to one clear line under 160 characters.

You can group skills in subfolders. The skill is still named by its frontmatter, not by the folder path.

Optional keys change how the skill is used:

- user-invocable (default true): makes the skill a slash command you can type.
- disable-model-invocation (default false): keeps the skill out of the agent’s prompt, so it only runs when you call it with /skill.
- command-dispatch: set to tool to send the slash command straight to a tool, without the model.
- homepage: a link shown as Website in the macOS Skills screen.


## How do you make a skill load only when it can work?

Use gating. In the frontmatter, a metadata block can say what the skill needs. If a requirement is missing, the skill stays hidden, so the agent never tries a tool that is not there.

Inside a skill, write {baseDir} to point to the skill’s own folder. For example, "run the helper script at {baseDir}/scripts/run.sh". The agent replaces it with the real path.

- requires.bins: programs that must be installed, such as gh or gemini.
- requires.anyBins: at least one of these programs must be installed.
- requires.env: environment variables that must exist, such as an API key.
- requires.config: settings in openclaw.json that must be on.
- os: limit the skill to macOS, Linux or Windows.


## How do you write instructions the agent follows?

The docs give four best practices. Be concise: tell the model what to do, not how to be an AI. Put safety first: if the skill runs commands with exec, write it so untrusted input cannot inject a command. Test locally with openclaw agent before you share. Check ClawHub first, because someone may have built it already.

For business tasks, add the limits you care about. Say which sources to trust, what format to return, and what the agent must never do on its own, such as send an email or change a CRM record.

> Create a skill called call-brief. When I share a company name, find its website and recent news, then write a ten-line brief with what they sell, who buys it and two questions for my call. Never contact the company. Save the skill in my workspace and show me the SKILL.md.


## Can OpenClaw write skills for you?

Yes. The bundled skill-creator skill helps you write, fix and check SKILL.md files. You can also ask the agent to save a method it just used as a new skill.

Skill Workshop stores skills the agent learns from its own work. They apply at once and keep their earlier versions, so you can undo any change. Use openclaw skills workshop list to see them, show to read one, and archive or restore to remove or bring back a skill.


## How do you publish a skill on ClawHub?

ClawHub is the public registry of OpenClaw skills. Before you publish, check that name, description and any gating fields are set, and add a homepage if you have one.

Install the ClawHub command line tool with npm i -g clawhub, sign in with clawhub login, then publish with clawhub skill publish followed by the path to your skill folder. You can add --version or --owner to publish a given version or under an organization.

Every published skill is code that other people will trust. Remove secrets, private links and customer names before you publish.


## What to say

> Read the SKILL.md I just added in my workspace skills folder, tell me if the instructions are clear, and list anything that could make you run a command I did not ask for.

## Sources

- [OpenClaw docs: Creating skills](https://docs.openclaw.ai/tools/creating-skills)
- [OpenClaw docs: Skills](https://docs.openclaw.ai/tools/skills)
- [OpenClaw docs: Skill Workshop](https://docs.openclaw.ai/tools/skill-workshop)
- [OpenClaw docs: skills CLI](https://docs.openclaw.ai/cli/skills)
- [OpenClaw bundled skills (GitHub)](https://github.com/openclaw/openclaw/tree/main/skills)
- [ClawHub](https://clawhub.ai)

## Questions

**Where do OpenClaw skills go?** Your own skills go in the skills folder of your workspace, by default ~/.openclaw/workspace/skills. Each skill has its own folder with a SKILL.md file.

**Do I need to code to create a skill?** No. A skill is a text file with instructions. You only need code if the skill calls a helper script you write.

**Why does my new skill not show up?** Run openclaw skills list. If it is missing, check the name format and the frontmatter. If it is listed, start a new session with /new or restart the Gateway.

**Can I keep a skill private?** Yes. A skill in your workspace stays on your machine. It is only public if you publish it on ClawHub.


## Related

- [What are the best OpenClaw skills?](https://coldiq.com/university/openclaw/best-openclaw-skills)
- [Is OpenClaw safe? OpenClaw security explained](https://coldiq.com/university/openclaw/openclaw-security)

## Try ColdIQ free

ColdIQ gives new accounts up to 1,450 free credits as they get started, no credit card required.
One subscription covers 40+ B2B data providers for finding, enriching and verifying
contacts and companies, through the web app, the API or the MCP server for AI agents.

1. Create an account: https://coldiq.com/marketplace/sign-up?utm_source=ai-assistant&utm_medium=markdown&utm_content=university
2. Run a first search on your own market with the free credits.
3. Connect the MCP server to Claude, ChatGPT or Cursor: https://coldiq.com/mcp
