The Skill Creator's Guide: Building Custom Tools for Your OpenClaw Agent

A step-by-step tutorial on how to build, document, and deploy a custom 'Skill' for OpenClaw using the SKILL.md pattern.

Team · · 12 min read

You've deployed your OpenClaw agent. It can search the web, check your calendar, and manage your GitHub issues. But what if you need it to perform a task specific to your business? What if you need it to interact with a custom API, a proprietary database, or a specialized CLI?

The solution is to build a Custom Skill. This tutorial walks you through the 4-step process of creating, documenting, and deploying a new capability for your OpenClaw agent.

Step 1: Define the Folder and the Logic

An OpenClaw skill is simply a folder inside your skills/ directory.

  1. Create the folder: mkdir ~/.openclaw/workspace/skills/my-new-skill/
  2. Add the logic: This can be a Python script, a Node.js script, or even a simple Bash script. Let’s say you want a skill that checks your agency's "Credit Balance" on a custom dashboard.

Example scripts/check-balance.py:

import sys
import json

# Logic to query your custom API
balance = {"credits": 500, "plan": "Agency Pro"}
print(json.dumps(balance))

Step 2: Document the Skill with SKILL.md

This is the most important step. The SKILL.md is what the LLM reads to understand how to use your new tool.

Example SKILL.md:

# My Agency Dashboard Skill

Use this skill to check credit balances and plan details.

## Tools

### check-balance
Get current credit balance and plan status.

**Command:**
`python3 scripts/check-balance.py`

**Expected Output:**
A JSON object with "credits" and "plan".

**Notes:**
- Do not call this more than once per session unless the user asks for an update.

Step 3: Register and Validate (The ACP Harness)

OpenClaw automatically scans the skills/ directory at startup. If your SKILL.md is correctly formatted, the agent will immediately discover the new tool.

To verify your skill is working, you can use the OpenClaw CLI:

openclaw skill list

If your skill appears in the list, the ACP Harness has successfully parsed the metadata and registered the check-balance command.

Step 4: Testing the "Reasoning"

Now, test it from your agent's chat interface. Instead of telling the agent to "run the script," ask it a natural language question:

User: "Hey, how many credits do we have left on our agency dashboard?"

Agent Reasoning: "The user is asking about credit balances. I have a specialized skill called 'My Agency Dashboard Skill' with a tool called 'check-balance'. I will run that tool."

Agent Action: python3 scripts/check-balance.py

Agent Response: "We currently have 500 credits remaining on our Agency Pro plan."

Best Practices for Skill Creation

To make your skills "agent-friendly," follow these guidelines:

  • JSON for Computers, Markdown for Humans: Have your tools return JSON, but use the SKILL.md to explain what the fields mean.
  • Strict Parameterization: If your script needs input (e.g., --user_id), define it clearly in the SKILL.md. The ACP Harness will ensure the LLM provides it.
  • Fail Gracefully: If your API is down, have your script return a clear error message. The agent will read this and can try to troubleshoot or report the issue to you.

Why Custom Skills are the Agency "Moat"

At Hangryfeed, we don't just use off-the-shelf tools. We build Proprietary Skills that encode our unique marketing strategies.

  • Our sentiment-analyzer skill uses a custom-tuned local model.
  • Our lead-score skill uses our internal weighting system.

By building these into OpenClaw skills, we turn our agency's Standard Operating Procedures (SOPs) into Executable Code. This is how you build a "moat" in the AI age.

Conclusion: The Ultimate Extensibility

The SKILL.md pattern makes OpenClaw the most extensible agentic framework available. You don't need to wait for a "plugin" or an "integration." If you can write a script, you can teach your agent a new skill.

CTA Footer: "Hangryfeed helps founders and businesses scale with high-impact marketing. From Reddit and influencer campaigns to content strategy, UGC, and points programs, we build the systems that drive growth—including deploying AI employees to handle the heavy lifting."