← Back to Plugins
Tools

Clawhub

samyohuang-bit By samyohuang-bit 👁 65 views ▲ 0 votes

Open-source marketplace for OpenClaw agent skills and plugins

GitHub

Install

npm install

#

README

# ClawHub โ€” Open Source Agent Marketplace

The public registry for OpenClaw skills and plugins.

Browse, discover, install, and publish agent skills. Open-source frontend for [clawhub.ai](https://clawhub.ai).

## What is this?

ClawHub is a marketplace where AI agent skills are:
- **Published** as versioned bundles (files + metadata)
- **Discovered** via search, tags, and usage signals
- **Installed** into OpenClaw workspaces with one command
- **Reviewed** by the community (stars, comments, reports)

This repo contains the **open-source frontend** and **registry API reference** for the ClawHub platform.

## Features

- ๐Ÿ” **Semantic Search** โ€” Find skills by natural language description
- ๐Ÿ“ฆ **Versioned Packages** โ€” Every publish creates a semver version with changelog
- โญ **Community Signals** โ€” Stars, downloads, and comments for quality ranking
- ๐Ÿ›ก๏ธ **Moderation** โ€” Report abuse, auto-hide after 3+ reports, moderator tools
- ๐Ÿ”Œ **Plugin Support** โ€” Install plugins alongside skills
- ๐Ÿ“ฑ **Responsive UI** โ€” Works on desktop and mobile
- ๐ŸŒ **API-First** โ€” Full REST API for CLI and programmatic access

## Quick Start

```bash
# Install dependencies
npm install

# Set up environment
cp .env.example .env.local

# Run development server
npm run dev

# Open http://localhost:3000
```

## Architecture

```
clawhub/
โ”œโ”€โ”€ app/                    # Next.js App Router
โ”‚   โ”œโ”€โ”€ page.tsx            # Landing page
โ”‚   โ”œโ”€โ”€ search/             # Search & browse
โ”‚   โ”œโ”€โ”€ skill/[slug]/       # Skill detail pages
โ”‚   โ”œโ”€โ”€ user/[username]/    # User profiles
โ”‚   โ”œโ”€โ”€ publish/            # Publish wizard
โ”‚   โ””โ”€โ”€ api/                # Registry API routes
โ”‚       โ”œโ”€โ”€ skills/         # Skill CRUD
โ”‚       โ”œโ”€โ”€ search/         # Search endpoint
โ”‚       โ”œโ”€โ”€ auth/           # Authentication
โ”‚       โ””โ”€โ”€ moderation/     # Report & moderate
โ”œโ”€โ”€ components/             # React components
โ”œโ”€โ”€ lib/                    # Shared utilities
โ”‚   โ”œโ”€โ”€ registry.ts         # Registry client
โ”‚   โ”œโ”€โ”€ search.ts           # Search logic
โ”‚   โ””โ”€โ”€ auth.ts             # Auth helpers
โ”œโ”€โ”€ types/                  # TypeScript definitions
โ””โ”€โ”€ public/                 # Static assets
```

## API Reference

### Skills

| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/api/skills` | List skills (paginated) |
| GET | `/api/skills/[slug]` | Get skill details |
| POST | `/api/skills` | Publish a new skill |
| PUT | `/api/skills/[slug]` | Update a skill |
| DELETE | `/api/skills/[slug]` | Delete a skill (owner/admin) |
| POST | `/api/skills/[slug]/versions` | Publish a new version |
| GET | `/api/skills/[slug]/versions` | List all versions |

### Search

| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/api/search?q=...` | Full-text + vector search |
| GET | `/api/search/tags?tag=...` | Search by tag |

### Auth

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/api/auth/login` | GitHub OAuth login |
| POST | `/api/auth/token` | API token generation |
| GET | `/api/auth/me` | Current user info |

### Moderation

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/api/moderation/report` | Report a skill |
| GET | `/api/moderation/queue` | Moderator queue |
| POST | `/api/moderation/action` | Hide/unhide/delete/ban |

## Data Model

```typescript
interface Skill {
  slug: string;           // URL-friendly identifier
  name: string;           // Display name
  summary: string;        // Short description
  description: string;    // Full SKILL.md content
  tags: string[];         // Searchable tags
  author: User;           // Publisher
  versions: SkillVersion[];
  stars: number;          // Community stars
  downloads: number;      // Install count
  createdAt: Date;
  updatedAt: Date;
  status: 'active' | 'hidden' | 'deleted' | 'banned';
}

interface SkillVersion {
  semver: string;         // e.g., "1.2.3"
  changelog: string;      // What changed
  files: SkillFile[];     // Bundle contents
  publishedAt: Date;
  publishedBy: User;
}

interface User {
  username: string;
  githubId: string;       // GitHub-linked auth
  displayName: string;
  avatarUrl: string;
  skills: Skill[];        // Published skills
  createdAt: Date;
}
```

## CLI Integration

The ClawHub website is designed to work with the `clawhub` CLI and native `openclaw` commands:

```bash
# Search from CLI
clawhub search "calendar"
# โ†’ Calls GET /api/search?q=calendar

# Install from CLI
clawhub install my-skill
# โ†’ Downloads from GET /api/skills/my-skill/versions/latest/download

# Publish from CLI
clawhub publish ./my-skill --slug my-skill --version 1.0.0
# โ†’ Calls POST /api/skills/my-skill/versions
```

## Environment Variables

```env
# Database
DATABASE_URL=postgresql://...

# Auth
GITHUB_CLIENT_ID=...
GITHUB_CLIENT_SECRET=...
JWT_SECRET=...

# Search
OPENAI_API_KEY=...          # For vector embeddings

# Storage
S3_BUCKET=...
S3_REGION=...
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...
```

## Development

```bash
# Install dependencies
npm install

# Run dev server
npm run dev

# Run tests
npm test

# Lint
npm run lint

# Build for production
npm run build
```

## Contributing

1. Fork the repo
2. Create a feature branch
3. Make your changes
4. Add tests
5. Submit a PR

## License

MIT
tools

Comments

Sign in to leave a comment

Loading comments...