Skip to content

How to Build Custom Skills for OpenClaw

I often find myself stuck when an AI assistant doesn’t know how to handle my specific workflow. It is frustrating to have the right tools but no way to bridge the gap between the LLM and my local environment. I want my assistant to follow my exact rules without having to repeat myself in every new chat session.

Custom skills are the answer here. They allow me to bake specific instructions and tool definitions directly into the assistant. If you want to make your assistant smarter or more specialized, follow this guide to get your first skill running.

  • OpenClaw installed on your machine.
  • A workspace directory located at ~/.openclaw/workspace/skills/.

You can set up a new skill in about five minutes. Here is the fastest path to getting a “Hello World” skill working.

Skills live in a specific folder. Open your terminal and create a new directory for your skill:

Terminal window
mkdir -p ~/.openclaw/workspace/skills/hello-world

Every skill needs a SKILL.md file. This file tells the assistant what the skill is called and how to use it. Create the file in your new folder and paste this content:

---
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!".

The assistant needs to index the new file. You can do this by asking the agent to “refresh skills” or by restarting the gateway.

To make sure everything is working, run a test command in your terminal:

Terminal window
openclaw agent --message "use my new skill"

If things aren’t working as expected, check these two common areas:

  • Skill not discovered: If the assistant doesn’t recognize your skill, ensure the SKILL.md is in the correct directory. Remember to trigger a “refresh skills” command or restart the gateway so OpenClaw can find the new directory.
  • Security risks with bash: If your skill uses the bash tool, be careful. Ensure your prompts do not allow the model to run arbitrary commands based on untrusted user input to avoid command injection.

Need more help getting your environment configured? Check out the AI Setup Assistant.

  • Browse existing skills on ClawHub.
  • Add custom tools to your YAML frontmatter.
OpenClaw

OpenClaw Expert

Still stuck?

If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.