|
1 | 1 | # Skillr |
2 | 2 |
|
3 | | -AI Agent Skill Registry - discover, install and manage skills. |
| 3 | +AI Agent Skill Registry — discover, install and manage skills for Claude Code, Codex, and more. |
4 | 4 |
|
5 | | -Follows the **Open Agent Skills Standard**, providing a unified skill discovery, aggregation, distribution and reuse platform for AI coding assistants like Claude Code, Codex, OpenClaw, etc. |
| 5 | +[](https://www.npmjs.com/package/skillr) |
6 | 6 |
|
7 | 7 | ## Quick Start |
8 | 8 |
|
9 | | -### Requirements |
10 | | - |
11 | | -- Node.js >= 18 |
12 | | -- pnpm >= 10 |
13 | | -- Docker & Docker Compose |
14 | | - |
15 | | -### Quick Start (One Command) |
16 | | - |
17 | 9 | ```bash |
18 | | -git clone <repo-url> && cd skillr |
19 | | -pnpm install |
20 | | -pnpm up # Builds and starts everything: PostgreSQL, MinIO, Backend, Frontend |
21 | | -``` |
| 10 | +# Install CLI |
| 11 | +npm install -g skillr |
22 | 12 |
|
23 | | -Open http://localhost:3000 — done! Default admin: `admin` / `admin123` |
| 13 | +# Login to registry |
| 14 | +skillr login https://api.skillhub.tokenroll.ai |
24 | 15 |
|
25 | | -```bash |
26 | | -pnpm logs # Tail all service logs |
27 | | -pnpm down # Stop all services (keep data) |
28 | | -pnpm down:clean # Stop and wipe all data |
| 16 | +# Search and install skills |
| 17 | +skillr search "code-review" |
| 18 | +skillr install @default/code-review |
29 | 19 | ``` |
30 | 20 |
|
31 | | -### Dev Mode (Manual Control) |
| 21 | +## Create & Publish Skills |
32 | 22 |
|
33 | 23 | ```bash |
34 | | -# Start only infrastructure (PostgreSQL + MinIO) |
35 | | -pnpm dev:infra |
36 | | - |
37 | | -# Database migration + seed data |
38 | | -pnpm --filter @skillr/backend db:migrate |
39 | | -pnpm --filter @skillr/backend db:seed |
40 | | - |
41 | | -# Start backend (port 3001) |
42 | | -pnpm --filter @skillr/backend dev |
| 24 | +# Scaffold a new skill project |
| 25 | +skillr init --name my-skill |
43 | 26 |
|
44 | | -# Start frontend (port 3000) |
45 | | -pnpm --filter @skillr/frontend dev |
| 27 | +# Or a workspace with multiple skills |
| 28 | +skillr init --workspace --name my-skills --namespace @myteam |
46 | 29 |
|
47 | | -# Build CLI |
48 | | -pnpm --filter @skillr/cli build |
| 30 | +# Publish |
| 31 | +skillr push |
49 | 32 | ``` |
50 | 33 |
|
51 | | -### CLI Usage |
| 34 | +### skill.json |
52 | 35 |
|
53 | | -```bash |
54 | | -# First-time setup: login to a server |
55 | | -skillr login http://localhost:3001 |
56 | | - |
57 | | -# Multi-server workflow |
58 | | -skillr login http://localhost:3001 # Dev server |
59 | | -skillr login https://skills.company.com # Production server |
60 | | -skillr source list # See all configured servers |
61 | | -skillr source set-default production |
| 36 | +Every skill project has a `skill.json` manifest: |
62 | 37 |
|
63 | | -# Multi-source management |
64 | | -skillr source add internal https://skills.company.com |
| 38 | +```json |
| 39 | +{ |
| 40 | + "name": "my-skill", |
| 41 | + "description": "What this skill does", |
| 42 | + "version": "1.0.0", |
| 43 | + "author": "you", |
| 44 | + "license": "MIT", |
| 45 | + "agents": ["claude-code", "codex"], |
| 46 | + "tags": ["utility"], |
| 47 | + "namespace": "@default" |
| 48 | +} |
| 49 | +``` |
65 | 50 |
|
66 | | -# Scan local skills |
67 | | -skillr scan ./my-skills/ |
| 51 | +Workspace mode (multiple skills): |
68 | 52 |
|
69 | | -# Publish skill (CLI or Web) |
70 | | -cd my-skill-dir/ |
71 | | -skillr push @default/my-skill -t v1.0.0 |
72 | | -# Or publish via browser: open http://localhost:3000/skills/publish |
| 53 | +```json |
| 54 | +{ |
| 55 | + "name": "@myteam/skills", |
| 56 | + "namespace": "@myteam", |
| 57 | + "version": "1.0.0", |
| 58 | + "skills": [ |
| 59 | + { "path": "skills/review", "name": "review", "description": "Code review" }, |
| 60 | + { "path": "skills/tdd", "name": "tdd", "description": "TDD workflow" } |
| 61 | + ] |
| 62 | +} |
| 63 | +``` |
73 | 64 |
|
74 | | -# Search skills (supports fuzzy matching, no namespace required) |
75 | | -skillr search "deploy" |
76 | | -skillr search "deploy" --namespace @frontend |
| 65 | +Each skill directory contains a `SKILL.md` with the actual skill content/instructions. |
77 | 66 |
|
78 | | -# Install skill (auto symlink to .claude/ or .agents/) |
79 | | -skillr install @default/my-skill |
| 67 | +## CLI Commands |
80 | 68 |
|
81 | | -# Update installed skills |
82 | | -skillr update |
83 | | -``` |
| 69 | +| Command | Description | |
| 70 | +|---------|-------------| |
| 71 | +| `skillr login <url>` | Login to a registry | |
| 72 | +| `skillr init` | Scaffold a new skill project | |
| 73 | +| `skillr scan` | Validate skill.json and SKILL.md files | |
| 74 | +| `skillr push [ref]` | Publish skill(s) to the registry | |
| 75 | +| `skillr search <query>` | Search for skills (`--agent`, `--tag` filters) | |
| 76 | +| `skillr install <ref>` | Install a skill (auto-symlinks to `.claude/` or `.agents/`) | |
| 77 | +| `skillr update` | Update installed skills | |
| 78 | +| `skillr source` | Manage registry sources | |
| 79 | +| `skillr auth` | Manage API keys | |
84 | 80 |
|
85 | 81 | ## Project Structure |
86 | 82 |
|
87 | 83 | ``` |
88 | 84 | skillr/ |
| 85 | +├── apps/ |
| 86 | +│ ├── api/ # Hono REST API on Cloudflare Workers (D1 + R2) |
| 87 | +│ └── web/ # Next.js frontend on CF Workers Static Assets |
89 | 88 | ├── packages/ |
90 | | -│ ├── shared/ # Shared types and constants |
91 | | -│ ├── cli/ # CLI tool (skillr) |
92 | | -│ ├── backend/ # Hono API server (includes built-in MCP endpoint) |
93 | | -│ │ └── src/runtime/ # Runtime Adapter Pattern (Node.js / CF Workers) |
94 | | -│ ├── frontend/ # Next.js Web UI |
95 | | -│ └── mcp/ # Standalone MCP server (stdio transport) |
96 | | -├── docker/ |
97 | | -│ ├── docker-compose.yml # Local dev environment |
98 | | -│ ├── Dockerfile.backend # Backend production image |
99 | | -│ └── Dockerfile.frontend # Frontend production image |
100 | | -└── docs/ # Architecture and task docs |
| 89 | +│ ├── shared/ # Shared types and constants |
| 90 | +│ ├── cli/ # CLI tool (npm: skillr) |
| 91 | +│ └── mcp/ # Standalone MCP server (stdio) |
| 92 | +└── docs/ # Specs and plans |
101 | 93 | ``` |
102 | 94 |
|
103 | 95 | ## Tech Stack |
104 | 96 |
|
105 | 97 | | Component | Technology | |
106 | 98 | |-----------|------------| |
107 | 99 | | Monorepo | pnpm workspaces | |
108 | | -| CLI | Commander.js + TypeScript | |
109 | | -| Backend | Hono + Drizzle ORM | |
110 | | -| Database | PostgreSQL (Node.js) / Cloudflare D1 (Workers) | |
111 | | -| Frontend | Next.js 15 + Tailwind CSS v4 | |
112 | | -| Object Storage | MinIO/S3 (Node.js) / Cloudflare R2 (Workers) | |
113 | | -| Password Hashing | argon2 (Node.js) / PBKDF2 Web Crypto (Workers) | |
114 | | -| MCP | @modelcontextprotocol/sdk (SSE built-in + stdio standalone) | |
| 100 | +| CLI | Commander.js, TypeScript | |
| 101 | +| Backend | Hono, Drizzle ORM, Cloudflare Workers | |
| 102 | +| Database | Cloudflare D1 (SQLite) | |
| 103 | +| Storage | Cloudflare R2 | |
| 104 | +| Frontend | Next.js 15, Tailwind CSS v4 | |
| 105 | +| Auth | JWT (HS256), PBKDF2 (Web Crypto), API Keys | |
| 106 | +| MCP | SSE (built-in) + stdio (standalone) | |
115 | 107 | | Testing | Vitest | |
116 | | -| Containers | Docker Compose | |
117 | | -| Edge Runtime | Cloudflare Workers | |
118 | 108 |
|
119 | 109 | ## Deployment |
120 | 110 |
|
121 | | -### Docker (Node.js) |
122 | | - |
123 | | -The default deployment mode. `pnpm up` starts everything locally. For production, use `docker/Dockerfile.backend` and `docker/Dockerfile.frontend`. |
124 | | - |
125 | | -### Cloudflare Workers (D1 + R2) |
| 111 | +Cloudflare-First architecture. No Docker required. |
126 | 112 |
|
127 | 113 | ```bash |
128 | | -# Prerequisites: wrangler CLI, Cloudflare account |
129 | | -wrangler d1 create skillr-db |
130 | | -wrangler r2 bucket create skillr-artifacts |
131 | | -wrangler d1 execute skillr-db --remote --file=packages/backend/d1-migration.sql |
132 | | -wrangler secret put JWT_SECRET |
133 | | -wrangler deploy |
| 114 | +# API |
| 115 | +cd apps/api && wrangler deploy |
| 116 | + |
| 117 | +# Web |
| 118 | +cd apps/web && next build && wrangler deploy |
134 | 119 | ``` |
135 | 120 |
|
136 | 121 | See `llmdoc/guides/deployment-guide.md` for full instructions. |
137 | 122 |
|
138 | | -**Runtime note:** Users created with argon2 (Node.js) cannot log in on CF Workers (PBKDF2). Password reset required after migration. |
139 | | - |
140 | 123 | ## API Key Authentication |
141 | 124 |
|
142 | | -For CI/CD and automation, create API Keys instead of relying on JWTs: |
143 | | - |
144 | | -1. Create via web UI (`/settings/keys`) or API (`POST /api/auth/apikeys`) |
145 | | -2. Use: `SKILLHUB_TOKEN=sk_live_xxx skillr push @ns/skill` |
146 | | -3. Rotate: `POST /api/auth/apikeys/:id/rotate` |
147 | | -4. Revoke: `DELETE /api/auth/apikeys/:id` |
148 | | - |
149 | | -## MCP Integration |
150 | | - |
151 | | -### Mode 1: Built-in SSE (recommended) |
152 | | - |
153 | | -MCP is built into the backend server -- no separate process required: |
| 125 | +For CI/CD and automation: |
154 | 126 |
|
155 | | -```json |
156 | | -// ~/.claude/settings.json |
157 | | -{ |
158 | | - "mcpServers": { |
159 | | - "skillr": { |
160 | | - "type": "sse", |
161 | | - "url": "http://localhost:3001/mcp/sse" |
162 | | - } |
163 | | - } |
164 | | -} |
| 127 | +```bash |
| 128 | +# Use API key with CLI |
| 129 | +SKILLHUB_TOKEN=sk_live_xxx skillr push @ns/skill |
165 | 130 | ``` |
166 | 131 |
|
167 | | -### Mode 2: Standalone stdio (@skillr/mcp) |
| 132 | +Create/manage keys via web UI (`/settings/keys`) or API (`POST /api/auth/apikeys`). |
168 | 133 |
|
169 | | -For Claude Desktop or tools requiring process-based MCP: |
| 134 | +## MCP Integration |
170 | 135 |
|
171 | 136 | ```json |
172 | 137 | { |
173 | 138 | "mcpServers": { |
174 | 139 | "skillr": { |
175 | | - "command": "npx", |
176 | | - "args": ["@skillr/mcp"], |
177 | | - "env": { |
178 | | - "SKILLHUB_BACKEND_URL": "http://localhost:3001", |
179 | | - "SKILLHUB_TOKEN": "sk_live_xxx" |
180 | | - } |
| 140 | + "type": "sse", |
| 141 | + "url": "https://api.skillhub.tokenroll.ai/mcp/sse" |
181 | 142 | } |
182 | 143 | } |
183 | 144 | } |
184 | 145 | ``` |
185 | 146 |
|
186 | | -Available MCP tools for agents: |
187 | | -- `search_skills` -- Search skills |
188 | | -- `get_skill_info` -- Get skill details |
189 | | -- `list_namespaces` -- List namespaces |
190 | | -- `get_install_instructions` -- Get install instructions |
| 147 | +Tools: `search_skills`, `get_skill_info`, `list_namespaces`, `get_install_instructions` |
191 | 148 |
|
192 | | -## Docker Local Dev |
193 | | - |
194 | | -```bash |
195 | | -# Start PostgreSQL + MinIO |
196 | | -docker compose -f docker/docker-compose.yml up -d |
197 | | - |
198 | | -# Verify |
199 | | -docker compose -f docker/docker-compose.yml exec postgres psql -U skillhub -d skillhub -c "SELECT 1;" |
200 | | -curl -sf http://localhost:9000/minio/health/live && echo "MinIO OK" |
201 | | - |
202 | | -# Stop (keep data) |
203 | | -docker compose -f docker/docker-compose.yml down |
204 | | - |
205 | | -# Stop (clear data) |
206 | | -docker compose -f docker/docker-compose.yml down -v |
207 | | -``` |
208 | | - |
209 | | -## Testing |
210 | | - |
211 | | -```bash |
212 | | -# Run all tests |
213 | | -pnpm test |
214 | | - |
215 | | -# Run CLI tests only |
216 | | -pnpm --filter @skillr/cli test |
217 | | - |
218 | | -# Watch mode |
219 | | -pnpm --filter @skillr/cli test:watch |
220 | | -``` |
| 149 | +## Live Instance |
221 | 150 |
|
222 | | -## Environment Variables |
223 | | - |
224 | | -| Variable | Default | Description | |
225 | | -|----------|---------|-------------| |
226 | | -| `DATABASE_URL` | `postgresql://skillhub:skillhub@localhost:5432/skillhub` | PostgreSQL connection string | |
227 | | -| `S3_ENDPOINT` | `http://localhost:9000` | MinIO/S3 endpoint | |
228 | | -| `S3_ACCESS_KEY` | `minioadmin` | S3 Access Key | |
229 | | -| `S3_SECRET_KEY` | `minioadmin` | S3 Secret Key | |
230 | | -| `S3_BUCKET` | `skillhub-artifacts` | S3 bucket name | |
231 | | -| `JWT_SECRET` | -- | JWT signing secret (required in production) | |
232 | | -| `SKILLHUB_TOKEN` | -- | CLI/Agent auth token (JWT or API Key `sk_live_*`) | |
233 | | -| `SKILLHUB_CONFIG_DIR` | `~/.skillr` | CLI config directory | |
| 151 | +- **Web**: https://skillhub.tokenroll.ai |
| 152 | +- **API**: https://api.skillhub.tokenroll.ai |
| 153 | +- **npm**: https://www.npmjs.com/package/skillr |
234 | 154 |
|
235 | 155 | ## License |
236 | 156 |
|
|
0 commit comments