skillex 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,64 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.2.0] - 2026-04-07
11
+
12
+ ### Added
13
+ - Multi-source catalogs with workspace-managed source lists and a default official source at `lgili/skillex@main`
14
+ - `source add`, `source remove`, and `source list` commands for managing configured catalog sources
15
+ - Bootstrapped `create-skills` flow for scaffolding full skill-catalog repositories with automatic root catalog registration
16
+ - Helper scripts for `create-skills` repository bootstrap and root catalog validation
17
+ - Symlink sync mode: skills stored once in `.agent-skills/skills/<id>/` and symlinked to adapter targets with relative paths
18
+ - `run` command: execute skill scripts defined in `skill.json` via `scripts.<name>`
19
+ - Direct GitHub install: `skillex install owner/repo/path@ref` installs skills without a catalog
20
+ - Interactive TUI for `list` and `search` using `@inquirer/prompts`
21
+ - Context auto-inject: skills with `autoInject: true` are included automatically on every sync
22
+ - Compatibility aliases for all major AI agents: `codex`, `copilot`, `cline`, `cursor`, `claude`, `gemini`, `windsurf`
23
+ - `doctor` command with 6 read-only workspace health checks (lockfile, repo, adapter, GitHub reachability, token status, cache freshness)
24
+ - `config get <key>` / `config set <key> <value>` commands for persistent global preferences stored in `~/.askillrc.json` (XDG-aware)
25
+ - `src/output.ts` module with `success()`, `info()`, `warn()`, `error()`, `debug()` helpers; respects `NO_COLOR` env and `isTTY`
26
+ - `--verbose` / `-v` global flag; enables debug-level HTTP logging
27
+ - `--json` flag on `list`, `search`, `doctor` commands for machine-readable output
28
+ - Command aliases: `ls` → `list`, `rm` / `uninstall` → `remove`
29
+ - Per-command `--help` flag
30
+ - Catalog disk cache with 5-minute TTL stored at `.agent-skills/.cache/<hash>.json`; bypass with `--no-cache`
31
+ - `GITHUB_TOKEN` environment variable support in all HTTP requests to raise API rate limit from 60 to 5,000 req/hr
32
+ - Install progress output: `[N/total] Installing <skill-id>...`
33
+ - Post-`init` onboarding summary with repo, adapter, and "Next steps" guidance
34
+ - `.agent-skills/.gitignore` auto-created on `skillex init` (excludes `.cache/` and `*.log`)
35
+ - `onProgress` callback in `installSkills()` for programmatic progress reporting
36
+
37
+ ### Changed
38
+ - Full TypeScript migration: all source files converted to `.ts` with `strict: true`, `noUncheckedIndexedAccess`, `exactOptionalPropertyTypes`
39
+ - Module resolution updated to `NodeNext` with explicit `.js` import extensions
40
+ - All user-facing strings translated from Portuguese to English
41
+ - HTTP error messages rewritten to be actionable (rate limit, 404 with repo hint, 5xx retry suggestion)
42
+ - `--verbose` HTTP logging: URL and status code logged via `debug()` on every request
43
+
44
+ ### Fixed
45
+ - `AdapterNotFoundError` message was in Portuguese; now reads "Unknown adapter: <id>"
46
+
47
+ ## [0.1.1] - 2026-04-06
48
+
49
+ ### Fixed
50
+ - Restored executable bit on `bin/skillex.js`
51
+
52
+ ## [0.1.0] - 2026-04-06
53
+
54
+ ### Added
55
+ - Initial release of the Skillex CLI
56
+ - `init`, `list`, `search`, `install`, `update`, `remove`, `sync`, `status` commands
57
+ - GitHub-hosted skill catalog support via `catalog.json` or repository tree inspection
58
+ - Adapter detection and managed-block sync for Copilot, Cline, Cursor, Claude, Gemini, Windsurf, Codex
59
+ - Lockfile-based workspace state at `.agent-skills/skills.json`
60
+
61
+ [Unreleased]: https://github.com/lgili/skillex/compare/v0.2.0...HEAD
62
+ [0.2.0]: https://github.com/lgili/skillex/compare/v0.1.1...v0.2.0
63
+ [0.1.1]: https://github.com/lgili/skillex/compare/v0.1.0...v0.1.1
64
+ [0.1.0]: https://github.com/lgili/skillex/releases/tag/v0.1.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Luiz Carlos Gili
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,631 @@
1
+ # Skillex
2
+
3
+ [![CI](https://github.com/lgili/skillex/actions/workflows/ci.yml/badge.svg)](https://github.com/lgili/skillex/actions/workflows/ci.yml)
4
+ [![npm version](https://img.shields.io/npm/v/skillex)](https://www.npmjs.com/package/skillex)
5
+ [![Node.js >=20](https://img.shields.io/badge/node-%3E%3D20-brightgreen)](https://nodejs.org)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
+
8
+ **Skillex** is a CLI that installs and synchronizes AI agent skills from a GitHub-hosted catalog into your workspace. It automatically injects skill instructions into the configuration file of whichever AI agent you use — Codex, Copilot, Cline, Cursor, Claude, Gemini, or Windsurf.
9
+
10
+ ---
11
+
12
+ ## Table of Contents
13
+
14
+ - [Quick Start](#quick-start)
15
+ - [Installation](#installation)
16
+ - [Commands](#commands)
17
+ - [Adapters](#adapters)
18
+ - [Skill Catalog Format](#skill-catalog-format)
19
+ - [Skill Format](#skill-format)
20
+ - [GitHub Token](#github-token)
21
+ - [Global Configuration](#global-configuration)
22
+ - [Workspace Structure](#workspace-structure)
23
+ - [Auto-sync](#auto-sync)
24
+ - [Troubleshooting](#troubleshooting)
25
+ - [Publishing Your Own Catalog](#publishing-your-own-catalog)
26
+ - [Contributing](#contributing)
27
+ - [License](#license)
28
+
29
+ ---
30
+
31
+ ## Quick Start
32
+
33
+ Get up and running in under two minutes using the built-in first-party skills catalog:
34
+
35
+ ```bash
36
+ # 1. Initialize your workspace (auto-detects your AI agent)
37
+ npx skillex@latest init
38
+
39
+ # 2. Browse available skills
40
+ npx skillex@latest list
41
+
42
+ # 3. Install a skill
43
+ npx skillex@latest install create-skills
44
+
45
+ # 4. Sync skills into your agent's config file
46
+ npx skillex@latest sync
47
+ ```
48
+
49
+ After `init`, Skillex saves the configured source list in the local lockfile. New workspaces start with `lgili/skillex@main` by default, and you can add more sources later with `skillex source add`.
50
+
51
+ ---
52
+
53
+ ## Installation
54
+
55
+ ### Option 1 — Run without installing (recommended for most users)
56
+
57
+ ```bash
58
+ npx skillex@latest <command>
59
+ ```
60
+
61
+ ### Option 2 — Install globally
62
+
63
+ ```bash
64
+ npm install -g skillex
65
+ skillex --help
66
+ ```
67
+
68
+ ### Option 3 — Install as a dev dependency (pin the version per project)
69
+
70
+ ```bash
71
+ npm install -D skillex
72
+ npx skillex <command>
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Commands
78
+
79
+ ### `init`
80
+
81
+ Initialize (or re-initialize) the workspace. Creates `.agent-skills/skills.json`, detects your adapter, and writes `.agent-skills/.gitignore`.
82
+
83
+ ```bash
84
+ skillex init
85
+ skillex init --repo <owner/repo>
86
+ skillex init --repo lgili/skillex --adapter cursor
87
+ skillex init --repo lgili/skillex --auto-sync
88
+ ```
89
+
90
+ | Flag | Description |
91
+ |------|-------------|
92
+ | `--repo <owner/repo>` | Optional. Overrides the default first-party source for this workspace. |
93
+ | `--adapter <id>` | Force a specific adapter instead of auto-detecting. |
94
+ | `--auto-sync` | Automatically run `sync` after every install, update, and remove. |
95
+ | `--ref <branch>` | Use a specific branch or tag (default: `main`). |
96
+
97
+ ---
98
+
99
+ ### `list`
100
+
101
+ List all skills available across the configured sources.
102
+
103
+ ```bash
104
+ skillex list
105
+ skillex list --json
106
+ skillex list --repo myorg/my-skills
107
+ ```
108
+
109
+ | Flag | Description |
110
+ |------|-------------|
111
+ | `--repo <owner/repo>` | Limit the command to a single source instead of aggregating all configured sources. |
112
+ | `--json` | Print raw JSON instead of formatted output. |
113
+ | `--no-cache` | Bypass the local catalog cache and fetch fresh data. |
114
+
115
+ ---
116
+
117
+ ### `search`
118
+
119
+ Search skills by keyword, adapter compatibility, or tag.
120
+
121
+ ```bash
122
+ skillex search git
123
+ skillex search --compatibility cursor
124
+ skillex search --tags workflow
125
+ skillex search review --compatibility claude --tags code-quality
126
+ skillex search code-review --repo myorg/my-skills
127
+ ```
128
+
129
+ | Flag | Description |
130
+ |------|-------------|
131
+ | `--repo <owner/repo>` | Limit the command to a single source instead of aggregating all configured sources. |
132
+ | `--compatibility <adapter>` | Filter by adapter (e.g. `cursor`, `claude`, `codex`). |
133
+ | `--tags <tag>` | Filter by tag. |
134
+ | `--json` | Print raw JSON. |
135
+
136
+ ---
137
+
138
+ ### `install`
139
+
140
+ Install one or more skills by ID, or all skills from the catalog.
141
+
142
+ ```bash
143
+ # Install by ID
144
+ skillex install git-master
145
+
146
+ # Install multiple skills
147
+ skillex install git-master code-review
148
+
149
+ # Install all skills from the catalog
150
+ skillex install --all
151
+
152
+ # Install from one specific source when an id exists in multiple sources
153
+ skillex install code-review --repo myorg/my-skills
154
+
155
+ # Install directly from a GitHub repository (no catalog needed)
156
+ skillex install owner/repo/path/to/skill@main --trust
157
+ ```
158
+
159
+ | Flag | Description |
160
+ |------|-------------|
161
+ | `--all` | Install every skill in the catalog. |
162
+ | `--repo <owner/repo>` | Limit resolution to a single source when needed. |
163
+ | `--trust` | Skip confirmation prompt for direct GitHub installs. |
164
+
165
+ ---
166
+
167
+ ### `update`
168
+
169
+ Update installed skills to their latest catalog version.
170
+
171
+ ```bash
172
+ # Update all installed skills
173
+ skillex update
174
+
175
+ # Update a specific skill
176
+ skillex update git-master
177
+ ```
178
+
179
+ ---
180
+
181
+ ### `remove`
182
+
183
+ Remove one or more installed skills. Aliases: `rm`, `uninstall`.
184
+
185
+ ```bash
186
+ skillex remove git-master
187
+ skillex rm git-master code-review
188
+ ```
189
+
190
+ ---
191
+
192
+ ### `sync`
193
+
194
+ Write all installed skills into the active adapter's config file.
195
+
196
+ ```bash
197
+ # Sync to the detected adapter
198
+ skillex sync
199
+
200
+ # Preview changes without writing (shows a diff)
201
+ skillex sync --dry-run
202
+
203
+ # Force a specific adapter
204
+ skillex sync --adapter codex
205
+
206
+ # Copy files instead of using symlinks
207
+ skillex sync --mode copy
208
+ ```
209
+
210
+ | Flag | Description |
211
+ |------|-------------|
212
+ | `--dry-run` | Show what would change without writing anything. |
213
+ | `--adapter <id>` | Override the active adapter for this sync. |
214
+ | `--mode copy\|symlink` | File write strategy (default: `symlink` for dedicated-file adapters). |
215
+
216
+ ---
217
+
218
+ ### `run`
219
+
220
+ Execute a script declared in a skill's `skill.json`.
221
+
222
+ ```bash
223
+ skillex run git-master:cleanup
224
+ skillex run git-master:cleanup --yes # skip confirmation
225
+ ```
226
+
227
+ ---
228
+
229
+ ### `ui`
230
+
231
+ Open an interactive terminal UI to browse and install skills.
232
+
233
+ ```bash
234
+ skillex ui
235
+ ```
236
+
237
+ ---
238
+
239
+ ### `status`
240
+
241
+ Show the current local workspace state: adapter, installed skills, last sync.
242
+
243
+ ```bash
244
+ skillex status
245
+ ```
246
+
247
+ ---
248
+
249
+ ### `doctor`
250
+
251
+ Run a health check on your workspace and report any issues.
252
+
253
+ ```bash
254
+ skillex doctor
255
+ skillex doctor --json
256
+ ```
257
+
258
+ Checks performed:
259
+
260
+ | # | Check | What it verifies |
261
+ |---|-------|-----------------|
262
+ | 1 | Lockfile | `.agent-skills/skills.json` exists |
263
+ | 2 | Source | At least one catalog source is configured in the lockfile |
264
+ | 3 | Adapter | At least one adapter is detected or active |
265
+ | 4 | GitHub | `api.github.com` is reachable |
266
+ | 5 | Token | `GITHUB_TOKEN` present → 5,000 req/hr; absent → 60 req/hr |
267
+ | 6 | Cache | Catalog cache exists and whether it is fresh or expired |
268
+
269
+ Exits with code `1` if any non-warning check fails.
270
+
271
+ ---
272
+
273
+ ### `config`
274
+
275
+ Read or write persistent global preferences stored in `~/.askillrc.json`.
276
+
277
+ ```bash
278
+ # Read a value
279
+ skillex config get defaultRepo
280
+
281
+ # Write a value
282
+ skillex config set defaultRepo lgili/skillex
283
+ skillex config set defaultAdapter cursor
284
+ skillex config set disableAutoSync true
285
+ ```
286
+
287
+ | Key | Description |
288
+ |-----|-------------|
289
+ | `defaultRepo` | Default `--repo` used when not specified on the CLI. |
290
+ | `defaultAdapter` | Default adapter when auto-detection is ambiguous. |
291
+ | `githubToken` | GitHub personal access token (prefer `GITHUB_TOKEN` env var). |
292
+ | `disableAutoSync` | Set to `true` to globally disable auto-sync. |
293
+
294
+ ---
295
+
296
+ ### `source`
297
+
298
+ Manage multiple catalog sources in the current workspace.
299
+
300
+ ```bash
301
+ skillex source list
302
+ skillex source add myorg/my-skills --label work
303
+ skillex source remove myorg/my-skills
304
+ ```
305
+
306
+ Typical flow:
307
+
308
+ ```bash
309
+ # starts with lgili/skillex by default
310
+ skillex init
311
+
312
+ # add your team catalog
313
+ skillex source add myorg/my-skills --label work
314
+
315
+ # browse both together
316
+ skillex list
317
+ ```
318
+
319
+ ---
320
+
321
+ ### Global Flags
322
+
323
+ These flags work with every command:
324
+
325
+ | Flag | Description |
326
+ |------|-------------|
327
+ | `--verbose`, `-v` | Print debug output including HTTP requests and responses. |
328
+ | `--json` | Machine-readable JSON output (where supported). |
329
+ | `--no-cache` | Skip the catalog cache and fetch from GitHub. |
330
+ | `--help` | Show help for the current command. |
331
+
332
+ ---
333
+
334
+ ## Adapters
335
+
336
+ Skillex auto-detects the AI agent you use by looking for known marker files in your workspace.
337
+
338
+ | Adapter ID | Agent | Detection Markers | Sync Target |
339
+ |------------|-------|-------------------|-------------|
340
+ | `codex` | OpenAI Codex | `AGENTS.md`, `.codex/` | `AGENTS.md` |
341
+ | `copilot` | GitHub Copilot | `.github/copilot-instructions.md` | `.github/copilot-instructions.md` |
342
+ | `cline` | Cline / Roo Code | `.cline/`, `.roo/`, `.clinerules` | `.clinerules/skillex-skills.md` |
343
+ | `cursor` | Cursor | `.cursor/`, `.cursorrules` | `.cursor/rules/skillex-skills.mdc` |
344
+ | `claude` | Claude Code | `CLAUDE.md`, `.claude/` | `CLAUDE.md` |
345
+ | `gemini` | Gemini CLI | `GEMINI.md`, `.gemini/` | `GEMINI.md` |
346
+ | `windsurf` | Windsurf | `.windsurf/`, `.windsurf/rules/` | `.windsurf/rules/skillex-skills.md` |
347
+
348
+ **Shared-file adapters** (`codex`, `copilot`, `claude`, `gemini`) use a **managed block** — Skillex writes between `<!-- SKILLEX:START -->` and `<!-- SKILLEX:END -->` markers while preserving everything else in the file.
349
+
350
+ **Dedicated-file adapters** (`cline`, `cursor`, `windsurf`) generate a file in `.agent-skills/generated/` and create a relative symlink at the adapter's target path. Use `--mode copy` to write directly instead.
351
+
352
+ Compatibility aliases are normalized automatically: `claude-code` → `claude`, `github-copilot` → `copilot`, `roo-code` → `cline`, `gemini-cli` → `gemini`.
353
+
354
+ ---
355
+
356
+ ## Skill Catalog Format
357
+
358
+ A catalog can be hosted in any public GitHub repository. Skillex looks for skills in this order:
359
+
360
+ 1. **`catalog.json`** at the repository root (fastest, recommended for larger catalogs)
361
+ 2. **`skills/*/skill.json`** manifest files discovered via the GitHub tree API
362
+ 3. **`skills/*/SKILL.md`** files as a final fallback (reads frontmatter for metadata)
363
+
364
+ ### `catalog.json`
365
+
366
+ ```json
367
+ {
368
+ "formatVersion": 1,
369
+ "repo": "your-org/your-skills",
370
+ "ref": "main",
371
+ "skills": [
372
+ {
373
+ "id": "git-master",
374
+ "name": "Git Master",
375
+ "version": "1.0.0",
376
+ "description": "Teaches the agent to write semantic commits and manage branches.",
377
+ "author": "your-name",
378
+ "tags": ["git", "workflow"],
379
+ "compatibility": ["codex", "copilot", "cline", "cursor", "claude", "gemini", "windsurf"],
380
+ "path": "skills/git-master",
381
+ "entry": "SKILL.md",
382
+ "files": ["SKILL.md", "tools/git-cleanup.js"]
383
+ }
384
+ ]
385
+ }
386
+ ```
387
+
388
+ ### Recommended repository layout
389
+
390
+ ```
391
+ skills/
392
+ git-master/
393
+ SKILL.md ← main skill content (required)
394
+ skill.json ← skill manifest
395
+ tools/
396
+ git-cleanup.js ← optional scripts
397
+ catalog.json ← optional but recommended
398
+ ```
399
+
400
+ ---
401
+
402
+ ## Skill Format
403
+
404
+ ### `skill.json`
405
+
406
+ ```json
407
+ {
408
+ "id": "git-master",
409
+ "name": "Git Master",
410
+ "version": "1.0.0",
411
+ "description": "Teaches the agent to write semantic commits and manage branches.",
412
+ "author": "your-name",
413
+ "tags": ["git", "workflow"],
414
+ "compatibility": ["codex", "copilot", "cline", "cursor", "claude", "gemini", "windsurf"],
415
+ "entry": "SKILL.md",
416
+ "files": ["SKILL.md", "tools/git-cleanup.js"],
417
+ "scripts": {
418
+ "cleanup": "node tools/git-cleanup.js"
419
+ }
420
+ }
421
+ ```
422
+
423
+ ### `SKILL.md` frontmatter
424
+
425
+ ```markdown
426
+ ---
427
+ name: "git-master"
428
+ description: "Git workflow instructions"
429
+ autoInject: true
430
+ activationPrompt: "Always apply Git Master rules when the user asks for Git help."
431
+ ---
432
+
433
+ # Git Master
434
+
435
+ Your skill content goes here...
436
+ ```
437
+
438
+ When `autoInject: true` and `activationPrompt` are set, `skillex sync` injects the activation prompt in a separate managed block at the top of the adapter's config file so the agent always has that context loaded.
439
+
440
+ ---
441
+
442
+ ## GitHub Token
443
+
444
+ Without authentication, the GitHub API allows **60 requests per hour**. With a token, this rises to **5,000 requests per hour**.
445
+
446
+ Set the token via environment variable (recommended):
447
+
448
+ ```bash
449
+ export GITHUB_TOKEN=ghp_your_token_here
450
+ ```
451
+
452
+ Or store it in the global config (convenient for personal machines):
453
+
454
+ ```bash
455
+ skillex config set githubToken ghp_your_token_here
456
+ ```
457
+
458
+ The environment variable always takes precedence over the config file value.
459
+
460
+ To generate a token: **GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens**. The token only needs read access to public repositories (`Contents: Read`).
461
+
462
+ ---
463
+
464
+ ## Global Configuration
465
+
466
+ Persistent preferences are stored in `~/.askillrc.json` (respects `XDG_CONFIG_HOME`).
467
+
468
+ ```json
469
+ {
470
+ "defaultRepo": "lgili/skillex",
471
+ "defaultAdapter": "cursor",
472
+ "githubToken": "ghp_...",
473
+ "disableAutoSync": false
474
+ }
475
+ ```
476
+
477
+ **Precedence order** (highest to lowest):
478
+
479
+ ```
480
+ CLI flags > GITHUB_TOKEN env var > ~/.askillrc.json > defaults
481
+ ```
482
+
483
+ ---
484
+
485
+ ## Workspace Structure
486
+
487
+ After `init` and a few installs, your workspace will look like this:
488
+
489
+ ```
490
+ .agent-skills/
491
+ skills.json ← lockfile: adapter state, installed skills, sync metadata
492
+ .gitignore ← auto-created; excludes .cache/ and *.log
493
+ skills/
494
+ git-master/
495
+ SKILL.md
496
+ skill.json
497
+ tools/
498
+ git-cleanup.js
499
+ generated/
500
+ cline/
501
+ skillex-skills.md
502
+ .cache/
503
+ <sha256>.json ← catalog cache (5-min TTL, excluded from git)
504
+ ```
505
+
506
+ The `skills.json` lockfile records:
507
+
508
+ - Configured source list with repo, ref, and optional label
509
+ - Active adapter and all detected adapters
510
+ - `autoSync` setting
511
+ - Last sync: adapter, target path, timestamp, and write mode (`symlink` or `copy`)
512
+ - All installed skills with their versions, tags, compatibility, and install timestamps
513
+ - Installation source (e.g. `github:owner/repo@ref` for direct installs)
514
+
515
+ > **Tip:** Commit `.agent-skills/skills.json` and `.agent-skills/skills/` to version-control your skill setup. The `.cache/` directory is automatically excluded.
516
+
517
+ ---
518
+
519
+ ## Auto-sync
520
+
521
+ When `--auto-sync` is enabled at `init`, Skillex runs `sync` automatically after every `install`, `update`, and `remove`. This keeps your agent's config file always up to date.
522
+
523
+ ```bash
524
+ # Enable at init time
525
+ skillex init --auto-sync
526
+
527
+ # Or re-initialize to enable it
528
+ skillex init --repo lgili/skillex --auto-sync
529
+ ```
530
+
531
+ ---
532
+
533
+ ## Troubleshooting
534
+
535
+ Run `skillex doctor` first — it checks the six most common issues and tells you exactly what to fix:
536
+
537
+ ```bash
538
+ $ skillex doctor
539
+
540
+ ✓ Lockfile found at .agent-skills/skills.json
541
+ ✓ Source configured: lgili/skillex @ main
542
+ ✓ Adapter active: cursor
543
+ ✓ GitHub API reachable
544
+ ⚠ Token: unauthenticated (60 req/hr) — set GITHUB_TOKEN to raise limit
545
+ ✓ Cache: fresh (expires in 4m 12s)
546
+ ```
547
+
548
+ ### Common issues
549
+
550
+ | Symptom | Fix |
551
+ |---------|-----|
552
+ | `GitHub API rate limit exceeded` | Set `GITHUB_TOKEN` in your environment |
553
+ | `Repository or file not found` | Check `--repo` value; ensure the repo is public |
554
+ | `No adapter detected` | Run `skillex init --adapter <id>` with an explicit adapter |
555
+ | `Skill "..." exists in multiple sources` | Re-run with `--repo owner/repo` to choose the source |
556
+ | `skillex sync` shows no changes | Run `skillex install --all` first to install skills |
557
+ | Slow catalog fetch | Use `--no-cache` once, then the 5-min cache takes over |
558
+
559
+ For verbose HTTP logs, add `--verbose`:
560
+
561
+ ```bash
562
+ skillex list --verbose
563
+ ```
564
+
565
+ ---
566
+
567
+ ## Publishing Your Own Catalog
568
+
569
+ 1. Create a local repository folder for your catalog.
570
+ 2. Use the bundled `create-skills` automation to bootstrap the repository structure:
571
+
572
+ ```bash
573
+ node skills/create-skills/scripts/bootstrap_skill_repo.js \
574
+ --root /path/to/your-skills \
575
+ --repo your-org/your-skills
576
+ ```
577
+
578
+ 3. Create additional skills in that repository as needed:
579
+
580
+ ```bash
581
+ node /path/to/your-skills/skills/create-skills/scripts/init_repo_skill.js \
582
+ --root /path/to/your-skills \
583
+ --skill-id review-helper \
584
+ --name "Review Helper" \
585
+ --description "Help review pull requests consistently."
586
+ ```
587
+
588
+ 4. Validate the root catalog before publishing:
589
+
590
+ ```bash
591
+ node /path/to/your-skills/skills/create-skills/scripts/check_catalog.js \
592
+ --root /path/to/your-skills
593
+ ```
594
+
595
+ 5. Publish the repository to GitHub and point users at your catalog:
596
+
597
+ ```bash
598
+ npx skillex@latest init --repo your-org/your-skills
599
+ npx skillex@latest list
600
+ ```
601
+
602
+ ### Releasing via GitHub Actions
603
+
604
+ If you use this repository as a template, the included workflow publishes to npm automatically:
605
+
606
+ 1. Add `NPM_TOKEN` as a repository secret (GitHub → Settings → Secrets).
607
+ 2. Update the version in `package.json`.
608
+ 3. Push a tag matching the version:
609
+
610
+ ```bash
611
+ git tag v1.0.0
612
+ git push origin main --tags
613
+ ```
614
+
615
+ The workflow validates the tag, runs tests, packs the tarball, publishes to npm, and creates a GitHub Release with automatic release notes.
616
+
617
+ ---
618
+
619
+ ## Contributing
620
+
621
+ We welcome contributions of all kinds — bug fixes, new features, documentation improvements, and new skills.
622
+
623
+ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for development setup instructions, PR guidelines, and commit conventions.
624
+
625
+ To report a security vulnerability, see [SECURITY.md](SECURITY.md).
626
+
627
+ ---
628
+
629
+ ## License
630
+
631
+ [MIT](LICENSE) © 2026 Luiz Carlos Gili