> For the complete documentation index, see [llms.txt](https://www.openclawbook.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.openclawbook.xyz/en/ch29-skill-system/29.4-clawhub-skill-registry.md). Agents can also search and read this documentation through its [MCP server](https://www.openclawbook.xyz/~gitbook/mcp).

# 29.4 ClawHub Skill Registry

> **Generated by**: Claude Opus 4.6 (initial draft) / Claude Opus 5 (`v2026.3.9` revision) **Token usage**: Input \~430k tokens, Output \~5k tokens (this section) **Source baseline**: `v2026.3.9` (`v2026.3.8-170-g665f67726`)

***

Built-in skills and workspace skills cover most scenarios, but the true power of the skill system lies in **community ecosystem**. ClawHub is OpenClaw's skill registry, enabling developers to publish, search, and install third-party skills—similar to npm for Node.js or Homebrew for macOS.

***

## 29.4.1 ClawHub Design and Functionality

### Registry Architecture

ClawHub (clawhub.com) is a centralized skill hosting service providing the following core features:

| Feature                | Description                                                         |
| ---------------------- | ------------------------------------------------------------------- |
| **Search**             | Search skills by keyword (e.g., "postgres backup")                  |
| **Install**            | Download skills to local `~/.openclaw/skills/` directory            |
| **Version Management** | Semantic versioning support, install specific versions              |
| **Update**             | Hash-based incremental updates, batch update support                |
| **Publish**            | Developers upload skills to the registry                            |
| **Authentication**     | `clawhub login` for identity verification (required for publishing) |

### ClawHub CLI

ClawHub is interacted with through a standalone CLI tool, which is itself an OpenClaw skill (self-bootstrapping pattern):

```bash
# Install ClawHub CLI
npm i -g clawhub

# Authenticate (required for publishing)
clawhub login
clawhub whoami

# Search for skills
clawhub search "postgres backups"

# Install skills
clawhub install my-skill
clawhub install my-skill --version 1.2.3

# Update skills
clawhub update my-skill
clawhub update --all                    # Update all installed skills
clawhub update my-skill --force         # Force update (ignore hash matching)

# List installed skills
clawhub list

# Publish a skill
clawhub publish ./my-skill \
  --slug my-skill \
  --name "My Skill" \
  --version 1.2.0 \
  --changelog "Fixes + docs"
```

### Installation Directory

Skills installed by ClawHub are stored in `~/.openclaw/skills/` (the Managed Skills directory):

```
~/.openclaw/skills/
├── postgres-backup/
│   └── SKILL.md
├── linear-issues/
│   └── SKILL.md
└── custom-tool/
    ├── SKILL.md
    └── helper.sh
```

These skills have higher priority than Bundled (built-in), but lower than Workspace (project-level).

### Update Mechanism

ClawHub updates use **hash-based version comparison**:

1. Calculate the hash of local skill files
2. Send to the registry for matching
3. If hash matches a known version, upgrade to the latest version
4. If hash doesn't match (local modifications), skip update (unless `--force`)

This design balances automatic updates with local modification protection—if users manually modify installed skill files, `clawhub update` won't silently overwrite those changes.

### Registry Configuration

The default registry is `https://clawhub.com`, overridable via environment variable or parameter:

```bash
# Use private registry
CLAWHUB_REGISTRY=https://internal.example.com clawhub search "tools"

# Or via parameter
clawhub install my-skill --registry https://internal.example.com
```

The working directory defaults to the current directory (falling back to OpenClaw workspace), and the installation directory defaults to `./skills`:

```bash
# Custom working directory
CLAWHUB_WORKDIR=/path/to/workspace clawhub install my-skill
clawhub install my-skill --workdir /path/to/workspace
```

***

## 29.4.2 Automatic Skill Discovery and Installation

### Agent-Driven Skill Discovery

The most powerful use of ClawHub isn't manual operation—it's letting the Agent autonomously search and install skills. Since `clawhub` is itself a skill, the Agent knows how to use it:

**Scenario**: User says "Show me my Linear to-do items"

1. Agent checks the list of active skills, finds no Linear-related skill
2. Agent executes `clawhub search "linear"`
3. Search returns the `linear-issues` skill
4. Agent executes `clawhub install linear-issues`
5. Skill installs to `~/.openclaw/skills/linear-issues/`
6. On next session startup, `linear-issues` skill auto-activates
7. Agent follows the new skill's guidance to operate the Linear API

This achieves **runtime capability expansion**—the Agent can acquire new abilities during conversation without restart or manual configuration.

### Security Considerations

Third-party skills introduce security risks—malicious skills could contain harmful instructions. OpenClaw employs multiple layers of defense:

1. **Pre-installation scanning**: `scanDirectoryWithSummary` checks for suspicious code patterns in the skill directory
2. **Permission system**: After skill content is injected into the prompt, the Agent's actual operations are still constrained by tool permissions (e.g., bash command allowlists)
3. **Hash verification**: ClawHub records content hashes for each version, preventing tampering
4. **Audit commands**: `openclaw security audit --deep` can deeply scan all installed skills

### Skill Publishing Flow

The typical flow for developers to create and publish a new skill to ClawHub:

```bash
# 1. Create skill directory
mkdir my-awesome-skill && cd my-awesome-skill

# 2. Write SKILL.md (or use skill-creator skill for assistance)
cat > SKILL.md << 'EOF'
---
name: my-awesome-skill
description: Do amazing things with the Awesome API.
metadata:
  openclaw:
    requires: { env: ["AWESOME_API_KEY"] }
---

# My Awesome Skill

## Usage
...
EOF

# 3. Test (copy to project's skills/ directory to verify)
cp -r . ~/my-project/skills/my-awesome-skill/

# 4. Publish
clawhub login
clawhub publish . --slug my-awesome-skill --name "My Awesome Skill" --version 1.0.0
```

OpenClaw also includes the `skill-creator` skill, which can guide users through creating new skills in conversation—the Agent asks for skill name, description, dependencies, then generates a standard `SKILL.md` file.

***

## Section Summary

1. **ClawHub** is OpenClaw's skill registry, providing search, install, version management, update, and publish features, similar to the npm ecosystem.
2. **Hash-based updates** balance automatic updates with local modification protection—modified skills won't be silently overwritten.
3. **Agent-driven skill discovery** enables Agents to autonomously search and install new skills during conversation, achieving runtime capability expansion.
4. **Multi-layer security** covers pre-installation scanning, tool permission control, hash verification, and deep auditing to defend against malicious third-party skills.
5. **Self-bootstrapping ecosystem**: Both `clawhub` and `skill-creator` are skills, with the skill system using itself to manage and create skills, forming a virtuous cycle.

***

> ### 🔬 Going Deeper: 29.5 Source Deep Dive
>
> That's the end of the chapter's main text. If you're going to **modify this code**, or reproduce it in your own project, read on: [**29.5 Source Deep Dive: Progressive Disclosure and Three-Layer Loading**](https://www.openclawbook.xyz/en/ch29-skill-system/29.5-source-deep-dive-progressive-disclosure.md) traces the real implementation line by line along with the issues behind it, at a noticeably higher information density.
>
> **The main text is for understanding structure; the deep dive is for understanding trade-offs.**
