Back to Blog
2026-03-22

OpenClaw Skills: How to Extend Your AI Agent with Custom Capabilities

OpenClaw Skills are modular instruction packages that give your AI agent new capabilities — from camera control to email automation to social posting. Learn how the skill system works and how to install from ClawHub.

Out of the box, an AI agent can reason, write, and use basic tools. But it doesn't know about your camera system, your email provider, your specific content workflows, or how your business runs. Skills are how you fix that.

OpenClaw Skills are versioned, portable instruction packages that teach your agent a specific domain. Install a skill and your agent gains the vocabulary, tool usage patterns, and step-by-step procedures for that domain — without you having to explain it every session.

How Skills Work Internally

Every skill is a directory with a required SKILL.md file at its root. When the agent encounters a task that matches a skill's description, it reads the SKILL.md and follows it.

The matching logic is simple and explicit — the agent scans all available skill description entries, selects the most specific match, reads that SKILL.md, and executes. No fuzzy matching, no hallucinated procedures — it follows the documented steps exactly.

~/.openclaw/workspace/skills/
└── my-skill/
    ├── SKILL.md          ← required: instructions the agent follows
    ├── references/       ← optional: API docs, schemas, examples
    └── scripts/          ← optional: helper scripts the skill uses

A SKILL.md structure looks like this:

# SKILL.md — Email Outreach

## Description
Send professional outreach emails via SMTP. Use when: user asks to send
emails to leads, prospects, or contacts. NOT for: newsletters, bulk sends.

## Prerequisites
- `SMTP_HOST`, `SMTP_PORT`, `SMTP_USER`, `SMTP_PASS` in environment
- `himalaya` CLI installed (`brew install himalaya`)

## Steps

### 1. Load recipient context
Read the lead file at $LEADS_PATH. Extract: name, company, email, context.

### 2. Generate personalized message
Use the template in references/outreach-template.md. Fill in:
- {name}, {company}, {pain_point}, {solution}

### 3. Send via himalaya
\`\`\`bash
himalaya send --from "you@company.com" --to "{email}" \
  --subject "{subject}" --body "{body}"
\`\`\`

### 4. Log the send
Append to leads/sent-log.csv: timestamp, email, subject, outcome=sent

The agent reads this, understands the context, prerequisites, and exact steps — and executes without you having to re-explain the workflow.

The Skill Lifecycle

Skills follow a standard lifecycle:

  1. Install — copied to ~/.openclaw/workspace/skills/
  2. Active — agent picks them up automatically next session (no restart needed)
  3. Update — pull new version from ClawHub, replace directory
  4. Disable — rename the directory (prefix with _) to exclude from matching
  5. Publish — package your skill and push to ClawHub for others to use

Installing Skills from ClawHub

ClawHub is the public skill registry — the npm of AI agent skills. Install via the clawhub CLI:

# Install clawhub CLI
npm install -g clawhub

# Search for skills
clawhub search email

# Install a skill
clawhub install himalaya

# Install specific version
clawhub install himalaya@2.1.0

# List installed skills
clawhub list

# Update all skills to latest
clawhub update

# Update specific skill
clawhub update gh-issues

Skills install to ~/.openclaw/workspace/skills/ by default. The agent automatically discovers them on the next message — no config changes needed.

Writing a Skill from Scratch

The minimum viable skill is just a SKILL.md with:

  • A clear description (what triggers this skill)
  • Prerequisites (tools, env vars, paths)
  • Step-by-step procedures the agent can follow

For a skill that captures screenshots from RTSP cameras:

# SKILL.md — Camera Snapshot

## Description
Capture frames or clips from RTSP/ONVIF cameras. Use when user asks for
camera snapshot, doorbell image, or security feed capture.

## Prerequisites
- `ffmpeg` installed
- Camera URLs in TOOLS.md under "Cameras" section

## Steps

### 1. Read camera URLs from TOOLS.md
Parse the cameras section to get the target camera's RTSP URL.

### 2. Capture frame with ffmpeg
\`\`\`bash
ffmpeg -rtsp_transport tcp -i "{rtsp_url}" \
  -vframes 1 -q:v 2 /tmp/snapshot_{camera_name}_{timestamp}.jpg
\`\`\`

### 3. Return the image path
Respond with the file path and send the image if the channel supports it.

That's it. Your agent now knows how to take camera snapshots — and it'll follow this exact procedure every time, consistently.

Skill Best Practices

Be specific in descriptions. Vague descriptions cause wrong skill matches. "Handle emails" is bad. "Send outreach emails to sales leads via SMTP" is good.

List prerequisites explicitly. If the skill needs ffmpeg, gh, or an API key, say so upfront. The agent will check before proceeding and tell the user what's missing.

Use absolute paths in examples. Don't assume the working directory. Use ~/ paths or env vars.

Put reference docs in references/. If your skill needs API schemas, example responses, or template files, put them in references/ and reference them from SKILL.md. The agent can read these files as needed.

skills/lead-machine/
├── SKILL.md
├── references/
│   ├── apollo-api-schema.json
│   ├── outreach-template.md
│   └── company-types-to-target.txt
└── scripts/
    ├── scrape-leads.py
    └── enrich-company.sh

Version your skills. Add a version field to your SKILL.md header and update it when you make changes. ClawHub uses this for update tracking.

Skills vs. Hardcoded Tools

Skills are instructions the agent reads and follows. Tools are code the agent calls. They work together:

| | Skills | Tools | |---|---|---| | What they are | Instruction documents (Markdown) | Executable functions | | How they're added | Copy a directory | Register in tool config | | Who writes them | Anyone | Developers | | When to use | Workflows with human-like decision points | Deterministic operations | | Example | "How to send an outreach email" | web_search(query) |

A skill often uses tools internally. The lead-machine skill uses the web_search tool to find company info, then follows its own documented procedure to generate a personalized email.

Publishing Your Skill

Once you've built a skill that works reliably, you can share it on ClawHub:

# Initialize a clawhub package in your skill directory
cd ~/.openclaw/workspace/skills/my-skill
clawhub init

# This creates clawhub.json with name, version, description, author

# Publish
clawhub publish

# Update an existing published skill
clawhub publish --bump patch

Published skills are versioned, searchable, and installable by anyone running OpenClaw. If your skill solves a common problem — Notion integration, Linear ticket management, Stripe query — other developers will find and use it.

The Ecosystem Effect

The real value of skills becomes apparent at scale. A workspace with 10-15 well-written skills means your agent handles almost everything without you explaining context:

  • "Send an outreach email to the leads I added this week" → lead-machine + himalaya skills
  • "Post the new video to all accounts" → social-poster skill
  • "Check if there are open PRs with failing CI" → github skill
  • "Transcribe the recording and extract key points" → video-workspace skill

The agent reads the right SKILL.md, follows the procedure, and completes the task. Your job becomes specifying what you want — not how to do it.


The NEPA AI skill library gives you a full production-ready set of skills for content, outreach, coding, and automation — all pre-tested and ClawHub-published.

→ Browse the NEPA AI Skill Pack at /shop/openclaw-skill-pack

Install once. Your agent gets smarter immediately.