skilllib 1.1.0 → 1.2.1

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
@@ -119,6 +119,7 @@ A repo has two lists:
119
119
  | Group | What it is | `space` |
120
120
  |---|---|---|
121
121
  | *From your skills* | Versioned skills you added from your library | Remove it from this repo |
122
+ | *From npx skills* | Skills `npx skills add` installed into this repo (listed in its `skills-lock.json`), with their source | Copy it into your skills; `npx skills` keeps managing this copy |
122
123
  | *The repo's own* | Skills committed to the repo (e.g. your team's `.agents/skills`) | Copy it into your skills, so other repos can use it |
123
124
  | *⚠ Global · yours, not reviewed* | Your global skills you haven't decided about: they load in every repo | Open the cleanup wizard |
124
125
  | *✓ Global · yours, on purpose* | Your global skills you chose to keep global | Open the cleanup wizard |
@@ -131,11 +132,10 @@ Each row tells you:
131
132
  | | Meaning |
132
133
  |---|---|
133
134
  | **✻ ⬡ ◎ ℤ** | Claude Code, Cursor, Codex, Zed. An icon in color means that agent loads the skill here; a faint one means it doesn't. |
134
- | `²` | Cursor reaches this skill through two folders, so it may list it twice |
135
135
  | `.claude` / `.agents` | The folder holding the real copy |
136
136
  | **✓ committed** · **± changed** · **+ not added** · **∅ ignored** | The skill's git state. `∅ ignored` means it only exists on your machine. |
137
137
  | `v2` · `v1 → v2` | The installed version, and whether a newer one exists |
138
- | **⧉ 3 copies** | The same skill reaches your agents from 3 places. The details panel lists them; keep one. |
138
+ | **⧉ 3 copies** | The same skill reaches your agents from 3 places. The details panel lists them, and Health has the fix. |
139
139
  | last column | Claude Code uses in the last 30 days |
140
140
 
141
141
  Related skills fold into one row: skills from the same plugin, the same source repo, or with the same name prefix (`design-*`). Press Enter on the group row for actions on all of them.
@@ -144,7 +144,10 @@ If some skills aren't visible to every agent you use, the top row offers **⇄ M
144
144
 
145
145
  ### Adding and removing skills
146
146
 
147
- - **Adding** (`space` in *Add skills*) copies the newest version into `.claude/skills/<name>`, which Claude Code and Cursor read. If you use Codex or Zed, it also links it into `.agents/skills`. The skill is recorded in `skilllib.json`. Agents pick it up in their next session.
147
+ - **Adding** (`space` in *Add skills*) copies the newest version into the fewest folders your agents read, and records it in `skilllib.json`. Agents pick it up in their next session. The layout matches `npx skills`' symlink option: the real copy lives in `.agents/skills`, which nearly every agent reads, and Claude Code gets a link.
148
+ - Claude Code (with or without Cursor): `.claude/skills/<name>`.
149
+ - Cursor, Codex or Zed without Claude Code: `.agents/skills/<name>`.
150
+ - Claude Code plus Codex or Zed: the copy goes in `.agents/skills`, with a link in `.claude/skills`. Claude Code only reads `.claude/skills`, and Codex and Zed only read `.agents/skills`.
148
151
  - **Removing** (`space` again) deletes that copy and its links. Your library and other repos aren't touched. If you edited it here, skilllib asks first; Enter → *Save local edits to Your skills* keeps them.
149
152
  - **The repo's own skills are never deleted by skilllib.** You can copy them into your library, or link them so every agent sees them.
150
153
  - **Git-tracked folders:** if the repo commits the folder a link would go into (common for `.agents/skills`), skilllib asks once and remembers your answer.
@@ -208,13 +211,33 @@ It's available from:
208
211
  - Enter on any skill or group → **Copy review prompt**
209
212
  - `p` inside the cleanup wizard
210
213
 
214
+ ### Duplicates
215
+
216
+ The same skill often reaches your agents more than once: a copy in `.claude/skills` *and* in `.agents/skills`, a global copy *and* a repo copy, a plugin *and* your skill. skilllib keeps **one real copy per skill, plus only the links your agents need**. Health shows each case, and `skilllib tidy` fixes the folder ones.
217
+
218
+ | What it finds | What it does |
219
+ |---|---|
220
+ | Identical copies in several folders | Keeps one and turns the others into links. In a repo, it keeps the committed copy. Globally, it keeps the one in `~/.agents/skills`. |
221
+ | Links no agent you use needs | Removes them. It keeps links that `skilllib.json` records, because teammates may use other agents. |
222
+ | **Copies that differ** | Shows which agent runs which copy (e.g. Claude Code and Cursor run `.claude`, Codex runs `.agents`), and lets you pick the one to keep. |
223
+ | A Claude Code plugin with the same skill | Your skill wins. skilllib copies all the plugin's skills into Your skills, then removes the plugin or turns it off (`claude plugin uninstall` / `disable`). If the plugin also brings MCP servers, hooks, agents or commands, turning it off is the default. |
224
+ | A Cursor plugin with the same skill | Reported only. Turn the plugin off in Cursor. |
225
+ | A repo copy of a skill you keep global | The repo copy is the extra one. Claude Code runs the global copy anyway. |
226
+
227
+ - **It never moves a real copy.** `skilllib.json` is shared, so a move for your agents could break a teammate's.
228
+ - **It never adds links.** That's **⇄ Make all usable** (`skilllib link`).
229
+ - **It asks before changing committed files.** You choose: *tidy, but keep git as it is*, or *tidy everything*. On the command line, pass `--allow-git`.
230
+ - **Cursor lists a skill once** even when it reaches it through several folders (tested September 2026). It lists a plugin's copy and your copy separately.
231
+
211
232
  ### Health and backups
212
233
 
213
- **Health** lists broken links, skills loaded twice, out-of-date repos and repo-only skills, each with a one-key fix. Below them is everything skilllib ever moved out, and `space` puts it back where it came from.
234
+ **Health** lists broken links, duplicates, copies that differ, skills some of your agents can't reach, out-of-date repos and repo-only skills. Each has a one-key fix, or a short list of fixes to pick from. Below them is everything skilllib ever moved out, and `space` puts it back where it came from.
214
235
 
215
236
  skilllib never really deletes anything:
216
237
  - removed library skills go to `~/.skilllib/trash`
217
238
  - removed global skills go to `~/.skilllib/global-backup`
239
+ - copies replaced by a link go to `~/.skilllib/tidy-backup`
240
+ - removed plugins are listed too; restoring one reinstalls it
218
241
 
219
242
  ---
220
243
 
@@ -286,6 +309,7 @@ skilllib sync [--all] install exactly the pinned versions
286
309
  skilllib outdated [--all] skills with a newer version
287
310
  skilllib update [name...] move to the newest versions
288
311
  skilllib link [--all] make every skill here usable by all your agents
312
+ skilllib tidy [--all|--global] one real copy per skill, plus only the links your agents need
289
313
 
290
314
  skilllib list | show <name> your library
291
315
  skilllib import <dir>... add skill folders to your library (--global: all your global skills)
@@ -298,7 +322,7 @@ skilllib restore [name] put back something skilllib moved out
298
322
  skilllib --version
299
323
  ```
300
324
 
301
- Flags: `--force` (overwrite local edits), `--allow-tracked` (link into git-tracked folders), `--days N`.
325
+ Flags: `--force` (overwrite local edits), `--allow-tracked` (link into git-tracked folders), `--days N`. For `tidy`: `--dry-run` (preview), `--allow-git` (also change committed files), `<name> --keep <folder>` (the copy that wins when copies differ).
302
326
 
303
327
  ## Files
304
328
 
@@ -308,21 +332,22 @@ Flags: `--force` (overwrite local edits), `--allow-tracked` (link into git-track
308
332
  | `~/.skilllib/library/` | Your skills (master copies). Worth putting under git. |
309
333
  | `~/.skilllib/store/` | Every version of every skill, immutable |
310
334
  | `~/.skilllib/config.json` | Your agents, project folders, hidden projects, skills you keep global |
311
- | `~/.skilllib/trash/`, `global-backup/` | Everything skilllib removed, restorable from Health |
335
+ | `~/.skilllib/trash/`, `global-backup/`, `tidy-backup/` | Everything skilllib removed, restorable from Health |
336
+ | `~/.skilllib/plugin-backup.json` | Plugins skilllib removed, so Health can reinstall them |
312
337
  | `~/.skilllib/review-prompt.md` | The last review prompt you copied |
313
338
 
314
339
  Environment variables: `SKILLLIB_HOME` moves `~/.skilllib`, `$VISUAL` / `$EDITOR` set the editor, and `CLAUDE_CONFIG_DIR` is honored.
315
340
 
316
341
  ## FAQ
317
342
 
318
- **Does it change my repos?** Only when you tell it to: adding, removing or linking a skill, which updates `skilllib.json`. It asks before writing into a folder git tracks, and it never deletes a repo's own skills.
343
+ **Does it change my repos?** Only when you tell it to: adding, removing, linking or tidying a skill, which updates `skilllib.json`. It asks before linking into a folder git tracks, and before tidy changes a committed file. It never deletes the only copy of a repo's own skill.
319
344
 
320
- **Can I share skills with my team?** Commit `skilllib.json` along with the copies in `.claude/skills`. Or keep your library in a git repo and point `SKILLLIB_HOME` at it.
345
+ **Can I share skills with my team?** Commit `skilllib.json` along with the skill folders (`.agents/skills`, and `.claude/skills` if you use Claude Code). Or keep your library in a git repo and point `SKILLLIB_HOME` at it.
321
346
 
322
347
  **Why does usage only count Claude Code?** It's the only agent here with local transcripts to read. Cursor doesn't keep them locally, and Codex's format hasn't been tested yet. That's why "unused" is a strong hint, not proof.
323
348
 
324
349
  **What's not supported yet?**
325
- - Cursor marketplace plugin skills: Cursor doesn't record which ones are enabled in a file skilllib can read.
350
+ - Turning off Cursor marketplace plugins: skilllib reports ones that duplicate your skills, but Cursor doesn't record which plugins are on in a file skilllib can read.
326
351
  - Unloading a `npx skills` skill doesn't update that tool's lock file.
327
352
  - Installing new skills straight from GitHub is coming. For now, `skilllib import <folder>` or copy one from a repo.
328
353
 
@@ -341,7 +366,7 @@ npm link # use your checkout as `skilllib`
341
366
  1. Bump `version` in `package.json` and merge to `main`.
342
367
  2. Tag and push:
343
368
  ```bash
344
- git tag v1.1.0 && git push --tags
369
+ git tag v1.2.1 && git push --tags
345
370
  ```
346
371
 
347
372
  CI then tests on Linux, macOS and Windows, publishes to npm through [trusted publishing](https://docs.npmjs.com/trusted-publishers) (no token; provenance is automatic), and creates a GitHub release.