@invariant.guru/cli 0.6.8 → 0.6.9

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/README.md CHANGED
@@ -46,7 +46,7 @@ Supported targets: `claude`, `codex`, `cursor`, `aider`, `copilot`.
46
46
 
47
47
  ### 2. `invariant install` — pull a package
48
48
 
49
- Packages come from the registry or straight from GitHub. Installing caches the package **and** activates its items.
49
+ Packages come from a GitHub repository, from the [skills.sh](https://www.skills.sh) catalogue, or from the registry. Installing caches the package **and** activates its items.
50
50
 
51
51
  ```bash
52
52
  # From GitHub (owner/repo, optional #ref)
@@ -55,6 +55,12 @@ invariant install github:invariant-guru/inv-nest-clean-architecture
55
55
  # Pin a branch or tag
56
56
  invariant install github:invariant-guru/inv-nest-clean-architecture#main
57
57
 
58
+ # From skills.sh — the repository is cached, that one skill is activated
59
+ invariant install skills:vercel-labs/skills/find-skills
60
+
61
+ # …or the whole catalogue source, activating every skill it ships
62
+ invariant install skills:anthropics/skills
63
+
58
64
  # From the registry (same package, published name)
59
65
  invariant install nest-clean-architecture
60
66
  ```
@@ -259,11 +265,13 @@ invariant init --hybrid
259
265
 
260
266
  ### `invariant install [packages...]`
261
267
 
262
- Install packages from the registry or GitHub and activate their items. If the package already has curated `active` entries in `invariant.json`, exactly those are restored; otherwise all items are added.
268
+ Install packages from GitHub, skills.sh or the registry and activate their items. If the package already has curated `active` entries in `invariant.json`, exactly those are restored; otherwise all items are added.
263
269
 
264
270
  ```bash
265
271
  invariant install github:invariant-guru/inv-nest-clean-architecture
266
272
  invariant install github:invariant-guru/inv-nest-clean-architecture#v1.2.0
273
+ invariant install skills:vercel-labs/skills/find-skills
274
+ invariant install https://www.skills.sh/vercel-labs/skills/find-skills
267
275
  invariant install nest-clean-architecture
268
276
  invariant install nest-clean-architecture@1.0.0
269
277
 
@@ -282,6 +290,38 @@ Source syntax:
282
290
  | `name@version` | Registry package, pinned version |
283
291
  | `github:owner/repo` | GitHub repo, default branch |
284
292
  | `github:owner/repo#ref` | GitHub repo at a branch, tag, or commit |
293
+ | `skills:owner/repo` | A skills.sh source, whole. Every skill it ships is cached and activated |
294
+ | `skills:owner/repo/skill` | The same source, cached whole, with **only that skill** activated |
295
+ | `https://www.skills.sh/owner/repo/skill` | The page URL, accepted as-is |
296
+
297
+ #### Installing from skills.sh
298
+
299
+ [skills.sh](https://www.skills.sh) indexes ~9,700 agent skills, all of them
300
+ living in public GitHub repositories. Installing from it fetches **the
301
+ repository**, because that is what a package is here — one source, many items —
302
+ and then activates the one skill you asked for. `invariant add` turns the rest
303
+ on later, without a second download.
304
+
305
+ Two consequences worth knowing before the first install:
306
+
307
+ - **The package is `@owner/repo`.** Half the catalogue's repositories are called
308
+ `skills`; the owner is what keeps `@vercel-labs/skills` and
309
+ `@anthropics/skills` apart.
310
+ - **The skill lands under its package-prefixed name** — `find-skills` from
311
+ `vercel-labs/skills` installs to
312
+ `.agents/skills/vercel-labs-skills-find-skills`, mirrored into `.claude/`.
313
+ That is [ADR-024](docs/ADR.md) working as designed; see
314
+ [docs/package-naming.md](docs/package-naming.md).
315
+
316
+ Skill folders are copied whole — `scripts/`, `references/`, licences and all.
317
+ Binary files and anything over 256 KB are skipped and named in the output.
318
+ Nothing is executed at install time.
319
+
320
+ Two environment variables exist for testing and for self-hosted mirrors:
321
+ `INVARIANT_SKILLS_API_URL` (default `https://www.skills.sh`) and
322
+ `INVARIANT_SKILLS_DOWNLOAD_URL` (default `https://skills.sh`). `GITHUB_TOKEN` /
323
+ `GH_TOKEN`, when set, is used for the repository metadata call that supplies
324
+ star counts.
285
325
 
286
326
  | Option | Description |
287
327
  |--------|-------------|
@@ -564,8 +604,15 @@ runs. It never writes `invariant.json` itself.
564
604
  like; the bar at the bottom shows what will run, and **Apply** issues one
565
605
  `remove` and one `add` for the whole batch. Optionally a `sync` after.
566
606
  - **Install** takes a GitHub repository (the default — `owner/repo`, or a pasted
567
- URL, plus an optional ref) or a registry name, and previews the exact
568
- `invariant install …` line including `--no-add` and `--sync`.
607
+ URL, plus an optional ref) or a skills.sh skill (search as you type, or paste
608
+ `owner/repo/skill`), and previews the exact `invariant install …` line
609
+ including `--no-add` and `--sync`.
610
+ - **Browse skills** opens the catalogue at `/packages/skills`: ranked by
611
+ Popular / Trending / Hot, searchable, with a preview pane carrying the
612
+ install count, the weekly trend, the GitHub stars, the licence, the file list
613
+ and the rendered SKILL.md — plus the path the skill will actually occupy on
614
+ disk, before you install it. `/` focuses search, `j`/`k` move, `Esc` goes
615
+ back.
569
616
  - **Sync** runs from the top bar, with a **Check only** dry run that reports
570
617
  drift the way CI does.
571
618
  - **A package the config declares but this checkout never installed** shows as
@@ -722,18 +769,42 @@ After `init` + `install` + `sync`:
722
769
  │ │ └── .archive/ # sessions archived from the UI
723
770
  │ └── codegraph/ # `invariant scan` output
724
771
  ├── .agents/ # canonical store — the only physical copy
725
- │ ├── skills/<name>/SKILL.md
726
- │ ├── agents/<name>.md
727
- │ ├── commands/<name>.md
728
- │ └── rules/<name>.md
772
+ │ ├── skills/<pkg>-<name>/SKILL.md
773
+ │ ├── agents/<pkg>-<name>.md
774
+ │ ├── commands/<pkg>-<name>.md
775
+ │ └── rules/<pkg>-<name>.md
729
776
  ├── CLAUDE.md # generated by `invariant sync`
730
777
  └── .claude/ # symlinks into .agents/
731
- ├── agents/<name>.md -> ../../.agents/agents/<name>.md
732
- ├── skills/<name> -> ../../.agents/skills/<name>
733
- ├── commands/<name>.md
734
- └── rules/<name>.md
778
+ ├── agents/<pkg>-<name>.md -> ../../.agents/agents/<pkg>-<name>.md
779
+ ├── skills/<pkg>-<name> -> ../../.agents/skills/<pkg>-<name>
780
+ ├── commands/<pkg>-<name>.md
781
+ └── rules/<pkg>-<name>.md
782
+ ```
783
+
784
+ ### Item names carry their package
785
+
786
+ An item is stored under `<package-slug>-<item>`: the `frontend` skill of package
787
+ `docs` lands at `.agents/skills/docs-frontend`, linked as
788
+ `.claude/skills/docs-frontend`. Two packages can therefore ship a `frontend`
789
+ skill without one clobbering the other, and removing one never touches the
790
+ other's files.
791
+
792
+ The name is a pure function of the package and the item — never of install order
793
+ — so a package author can write the installed path by hand in an instruction;
794
+ invariant does not rewrite content. An item already named `docs-frontend` inside
795
+ package `docs` stays exactly that.
796
+
797
+ You keep addressing items by their own name:
798
+
799
+ ```bash
800
+ invariant add skill:docs/frontend # installs .agents/skills/docs-frontend
801
+ invariant remove skill:docs/frontend
802
+ invariant inspect docs --paths # prints the installed names and paths
735
803
  ```
736
804
 
805
+ Full rules, including how the package name itself is resolved for GitHub
806
+ installs: [docs/package-naming.md](docs/package-naming.md).
807
+
737
808
  ### One copy, many views
738
809
 
739
810
  `.agents/` holds the single physical copy of every activated item. What each
@@ -743,8 +814,8 @@ target gets depends on how it reads skills:
743
814
  |---|---|---|
744
815
  | `claude` | symlink into `.agents/` | symlink into `.agents/` |
745
816
  | `codex` | reads `.agents/skills/` — nothing written | embedded in `AGENTS.md` |
746
- | `cursor` | reads `.agents/skills/` — nothing written | `.cursor/rules/<name>.mdc` |
747
- | `copilot` | reads `.agents/skills/` — nothing written | `.github/instructions/<name>.instructions.md` |
817
+ | `cursor` | reads `.agents/skills/` — nothing written | `.cursor/rules/<pkg>-<name>.mdc` |
818
+ | `copilot` | reads `.agents/skills/` — nothing written | `.github/instructions/<pkg>-<name>.instructions.md` |
748
819
  | `aider` | embedded in `CONVENTIONS.md` | embedded in `CONVENTIONS.md` |
749
820
 
750
821
  Two consequences worth knowing: