What is a Claw Hub Skill?

Understanding the fundamental building blocks of OpenClaw hub functionality

Skill Definition

A Claw Hub skill is a versioned file package that teaches OpenClaw how to execute specific tasks. Think of it as a plugin or extension that enhances your OpenClaw hub's capabilities. Each skill is essentially a folder containing a SKILL.md file (required) plus any supporting files needed for execution.

๐Ÿ“ Folder Structure

A skill is a directory containing all necessary files for OpenClaw hub to understand and execute a specific task.

Core Concept

๐Ÿ“„ SKILL.md File

The required markdown file that defines metadata, interface, and execution logic for your Claw Hub skill.

Required

๐Ÿ”„ Versioned Package

Skills use semantic versioning (semver) in Claw Hub, allowing OpenClaw hub users to install specific versions.

npm-like

SKILL.md Structure for Claw Hub Skills

The three essential sections every OpenClaw hub skill must have

๐Ÿ“‹ 1. Metadata

Basic information about your skill including name, version, description, author, and tags for Claw Hub discovery.

Required

๐Ÿ”Œ 2. Interface Definition

Clear instructions for AI agents on how to call your skill, including parameters, return values, and usage examples.

Required

โš™๏ธ 3. Execution Logic

The actual code that runs when your skill is invoked - Python, Node.js, or Bash scripts for OpenClaw hub.

Required
SKILL.md - Example Structure
---
name: my-api-skill
version: 1.0.0
description: Fetches data from external APIs for OpenClaw hub
author: your-username
tags:
  - api
  - web
  - http
---

# Interface Definition

This skill fetches JSON data from any REST API endpoint.

Parameters:
- url (required): The API endpoint URL
- method (optional): HTTP method (default: GET)
- headers (optional): Custom headers as JSON

Returns:
- JSON response from the API

# Execution Logic

```python
import requests
import json

def execute(url, method="GET", headers=None):
    response = requests.request(method, url, headers=headers)
    return response.json()
```

Creating Your First Claw Hub Skill

Step-by-step tutorial to build a simple skill for OpenClaw hub

1 Create the Skill Folder

Start by creating a directory for your Claw Hub skill with a clear, descriptive name:

# Create skill directory
$ mkdir weather-skill
$ cd weather-skill

2 Write the SKILL.md File

Create the SKILL.md file with metadata, interface definition, and execution logic:

weather-skill/SKILL.md
---
name: weather
version: 1.0.0
description: Get current weather for any city
author: your-username
tags:
  - weather
  - location
  - api
---

# Weather Skill for OpenClaw Hub

Fetches current weather data for any city using OpenWeatherMap API.

Parameters:
- city (required): City name
- units (optional): metric or imperial (default: metric)

Returns:
- Temperature, humidity, weather description

# Execution

```python
import requests

def execute(city, units="metric"):
    api_key = "YOUR_API_KEY"
    url = f"https://api.openweathermap.org/data/2.5/weather"
    params = {"q": city, "appid": api_key, "units": units}
    response = requests.get(url, params=params)
    data = response.json()
    return {
        "temp": data["main"]["temp"],
        "humidity": data["main"]["humidity"],
        "description": data["weather"][0]["description"]
    }
```

3 Test Locally

Before publishing to Claw Hub, test your skill locally in your OpenClaw hub environment:

# Test skill locally
$ clawhub test ./weather-skill
Loading skill from ./weather-skill...
โœ“ SKILL.md validated
โœ“ Execution logic parsed
Running test with city="London"...
{"temp": 15, "description": "cloudy"}
โœ“ Skill test passed

Execution Types for Claw Hub Skills

Choose the right execution language for your OpenClaw hub skill

๐Ÿ Python Scripts

Ideal for data processing, API integrations, and machine learning tasks. Python is the most common choice for Claw Hub skills.

Best For

AI/ML skills, data analysis, web scraping, API clients

๐Ÿ“ฆ Node.js Scripts

Great for web-related tasks, real-time applications, and JavaScript-based integrations. NPM ecosystem available.

Best For

Web automation, API servers, real-time data, JSON processing

๐Ÿ–ฅ๏ธ Bash Scripts

Perfect for system administration, file operations, and command-line tool wrappers. Lightweight and fast.

Best For

System tasks, file operations, CLI wrappers, automation

๐Ÿ’ก Choosing the Right Execution Type

Consider your skill's primary function when choosing an execution type in Claw Hub:

  • โ†’ Python - Best for data-heavy or AI-powered OpenClaw hub skills
  • โ†’ Node.js - Best for web services and JavaScript ecosystems
  • โ†’ Bash - Best for simple system tasks and CLI integrations

Best Practices for Claw Hub Skills

Follow these guidelines to create high-quality, maintainable skills for OpenClaw hub

๐Ÿท๏ธ Clear Naming

Use descriptive, lowercase names with hyphens. Avoid special characters. Example: "web-scraper" not "WebScraper123".

๐Ÿ“š Documentation

Include comprehensive descriptions, usage examples, and parameter documentation in your SKILL.md for Claw Hub.

โš ๏ธ Error Handling

Implement robust error handling with clear error messages. Help users debug issues with your OpenClaw hub skill.

๐Ÿ”’ Security

Never hardcode credentials. Use environment variables. Avoid requesting unnecessary permissions in Claw Hub skills.

โšก Performance

Optimize for speed. Minimize dependencies. Cache results when appropriate for OpenClaw hub efficiency.

๐Ÿงช Testing

Test thoroughly before publishing to Claw Hub. Include edge cases and error scenarios in your tests.

Testing Your Claw Hub Skill

Ensure your skill works correctly before publishing to Claw Hub

4 Local Testing Commands

Use these CLI commands to test your skill locally before publishing to Claw Hub:

# Validate SKILL.md structure
$ clawhub validate ./my-skill
โœ“ Metadata section valid
โœ“ Interface definition valid
โœ“ Execution logic valid
# Run skill with test inputs
$ clawhub run ./my-skill --param city="Tokyo"
{"temp": 22, "humidity": 65}

๐Ÿ› Debugging Tips

Common issues and how to resolve them when developing Claw Hub skills:

  • ! Import errors - Ensure all dependencies are listed in requirements.txt or package.json
  • ! Permission denied - Check file permissions for executable scripts
  • ! API failures - Verify API keys are set as environment variables

Complete Skill Folder Structure for Claw Hub

Recommended file organization for your OpenClaw hub skill

๐Ÿ“„ SKILL.md

Required file containing metadata, interface definition, and execution logic. The heart of every Claw Hub skill.

Required

๐Ÿ“– README.md

Detailed documentation with usage examples, installation instructions, and troubleshooting guides.

Optional

๐Ÿ“‹ requirements.txt

Python dependencies for skills using Python execution. List all required packages with versions.

Optional

๐Ÿ“ฆ package.json

Node.js dependencies for skills using JavaScript execution. Define all npm packages needed.

Optional

๐Ÿ“ scripts/

Directory for supporting scripts, helper functions, and utility files used by your skill.

Optional

โš™๏ธ config.json

Configuration file for skill settings, default parameters, and environment-specific options.

Optional
Example: Complete Folder Structure
my-awesome-skill/
โ”œโ”€โ”€ SKILL.md              # Required: Main skill definition
โ”œโ”€โ”€ README.md             # Optional: Documentation
โ”œโ”€โ”€ requirements.txt      # Optional: Python dependencies
โ”œโ”€โ”€ package.json          # Optional: Node.js dependencies
โ”œโ”€โ”€ config.json           # Optional: Configuration
โ”œโ”€โ”€ .env.example          # Optional: Environment variables template
โ””โ”€โ”€ scripts/              # Optional: Supporting scripts
    โ”œโ”€โ”€ helper.py
    โ””โ”€โ”€ utils.py

Ready to Publish Your Claw Hub Skill?

Now that you've built your skill, learn how to publish it to Claw Hub and share it with the OpenClaw hub community.

Publish to Claw Hub โ†’ Installation Guide