@lythos/skill-deck 0.7.1 → 0.7.2

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.
Files changed (3) hide show
  1. package/README.md +3 -0
  2. package/package.json +1 -1
  3. package/src/link.ts +14 -7
package/README.md CHANGED
@@ -55,6 +55,7 @@ skills = ["github.com/anthropics/skills/skills/pdf"]
55
55
  | Sync working set with `skill-deck.toml` | `bunx @lythos/skill-deck link` |
56
56
  | Validate `skill-deck.toml` before committing | `bunx @lythos/skill-deck validate` |
57
57
  | Download a skill to cold pool and add to deck | `bunx @lythos/skill-deck add owner/repo` |
58
+ | Pull latest versions of declared skills | `bunx @lythos/skill-deck update` |
58
59
  | Use a custom deck file or working dir | `bunx @lythos/skill-deck link --deck ./my-deck.toml --workdir /path/to/project` |
59
60
 
60
61
  ### Commands
@@ -64,6 +65,7 @@ skills = ["github.com/anthropics/skills/skills/pdf"]
64
65
  | `link` | `[--deck <path>] [--workdir <dir>]` | Sync working set. Removes undeclared skills (deny-by-default). |
65
66
  | `validate` | `[deck.toml] [--workdir <dir>]` | Validate deck config without modifying files. |
66
67
  | `add` | `<locator> [--via <backend>] [--deck <path>]` | Download skill to cold pool and append to skill-deck.toml. |
68
+ | `update` | `[--deck <path>]` | Pull latest versions of declared skills from upstream git repos. |
67
69
 
68
70
  ### Options
69
71
 
@@ -138,6 +140,7 @@ Different agents look for skills in different directories. `skill-deck.toml` con
138
140
  |---------|-------|-----|
139
141
  | `❌ Skill not found: <name>` | Skill declared in deck but not in cold pool | `bunx @lythos/skill-deck add github.com/owner/repo/skill` or clone manually into cold pool |
140
142
  | `link` skips entries with warnings | Real files/directories exist in working set (not symlinks) | Delete the real directories in `working_set` and re-run `link`. Never create directories manually there |
143
+ | `update` reports "Not a git repository" | Skill was copied (not cloned) into cold pool | Re-clone with `git clone` or use `deck add` which clones by default |
141
144
  | `link` refuses with "budget exceeded" | Declared skills > `max_cards` | Increase `max_cards` in `skill-deck.toml` or remove unused skills |
142
145
  | `link` refuses with "unsafe working_set" | `working_set` resolves to `~` or `/` | Check `skill-deck.toml` has correct relative path (e.g. `.claude/skills/`) |
143
146
  | Agent doesn't see skills after `link` | `working_set` path doesn't match agent's scan location | Claude Code: `.claude/skills/`; Cursor: `.cursor/skills/`; Kimi: check your platform docs. Set `working_set` correctly |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lythos/skill-deck",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Declarative skill deck governance — cold pool, working set, deny-by-default",
5
5
  "keywords": [
6
6
  "ai-agent",
package/src/link.ts CHANGED
@@ -175,8 +175,10 @@ const deckRaw = readFileSync(DECK_PATH, "utf-8");
175
175
  const deckHash = hashContent(deckRaw);
176
176
  const deck = parseToml(deckRaw) as any;
177
177
 
178
- const WORKING_SET = expandHome(deck.deck?.working_set || ".claude/skills", PROJECT_DIR);
179
- const COLD_POOL = expandHome(deck.deck?.cold_pool || "~/.agents/skill-repos", PROJECT_DIR);
178
+ const WORKING_SET_RAW = deck.deck?.working_set || ".claude/skills";
179
+ const COLD_POOL_RAW = deck.deck?.cold_pool || "~/.agents/skill-repos";
180
+ const WORKING_SET = expandHome(WORKING_SET_RAW, PROJECT_DIR);
181
+ const COLD_POOL = expandHome(COLD_POOL_RAW, PROJECT_DIR);
180
182
  const MAX_CARDS = Number(deck.deck?.max_cards || 10);
181
183
 
182
184
  // ── 收集声明 ────────────────────────────────────────────────
@@ -396,12 +398,17 @@ for (const item of declared) {
396
398
  contentHash = hashContent(readFileSync(skillMdPath, "utf-8"));
397
399
  } catch {}
398
400
 
401
+ // source: relative to cold_pool (non-transient) or project dir (transient)
402
+ const sourceRel = item.type === "transient"
403
+ ? relative(PROJECT_DIR, item.sourcePath)
404
+ : relative(COLD_POOL, item.sourcePath);
405
+
399
406
  linkedSkills.push({
400
407
  name: item.name,
401
408
  deck_niche: niche,
402
409
  type: item.type,
403
- source: item.sourcePath,
404
- dest,
410
+ source: sourceRel,
411
+ dest: relative(PROJECT_DIR, dest),
405
412
  content_hash: contentHash,
406
413
  linked_at: new Date().toISOString(),
407
414
  ...(item.expires ? { expires: item.expires } : {}),
@@ -479,9 +486,9 @@ const constraints: ConstraintReport = {
479
486
  const lock: SkillDeckLock = {
480
487
  version: "1.0.0",
481
488
  generated_at: new Date().toISOString(),
482
- deck_source: { path: DECK_PATH, content_hash: deckHash },
483
- working_set: WORKING_SET,
484
- cold_pool: COLD_POOL,
489
+ deck_source: { path: relative(PROJECT_DIR, DECK_PATH), content_hash: deckHash },
490
+ working_set: WORKING_SET_RAW,
491
+ cold_pool: COLD_POOL_RAW,
485
492
  skills: linkedSkills,
486
493
  constraints,
487
494
  };