skill-tree 0.1.4 → 0.1.6

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
@@ -9,6 +9,7 @@ skill-tree helps you build and maintain a library of reusable skills for AI agen
9
9
  - **Storing skills** in a versioned, searchable format (OpenSkills-compatible)
10
10
  - **Evolving skills** through versioning, forking, and merging
11
11
  - **Serving skills** via dynamic loadouts with expand/collapse, profiles, and token budgeting
12
+ - **Materializing skills** to agent-discoverable paths (`.claude/skills/`, `.agent/skills/`) with auto-generated AGENTS.md
12
13
  - **Syncing skills** across agents with git-based multi-agent collaboration
13
14
  - **Federating skills** across repositories for cross-organization sharing
14
15
 
@@ -38,11 +39,7 @@ await bank.saveSkill({
38
39
  name: 'TypeScript ESM Import Fix',
39
40
  version: '1.0.0',
40
41
  description: 'Fix TypeScript ES module import errors',
41
- problem: 'TypeScript with ES modules requires explicit .js extensions',
42
- triggerConditions: [{ type: 'error', value: "Cannot find module './utils'" }],
43
- solution: 'Add .js extension to all relative imports.',
44
- verification: 'Run tsc --noEmit to verify no import errors',
45
- examples: [],
42
+ instructions: 'Add .js extension to all relative imports, even for .ts files.\n\nRun `tsc --noEmit` to verify no import errors.',
46
43
  author: 'me',
47
44
  tags: ['typescript', 'esm'],
48
45
  createdAt: new Date(),
@@ -70,19 +67,15 @@ A skill represents a reusable piece of knowledge:
70
67
 
71
68
  ```typescript
72
69
  interface Skill {
73
- id: string; // Unique identifier
70
+ id: string; // Unique identifier (kebab-case)
74
71
  name: string; // Human-readable name
75
72
  version: string; // Semantic version
76
- description: string; // For search and matching
77
- problem: string; // What problem this solves
78
- triggerConditions: TriggerCondition[]; // When to apply
79
- solution: string; // Step-by-step solution
80
- verification: string; // How to verify it worked
81
- examples: SkillExample[]; // Usage examples
73
+ description: string; // Short summary for discovery and matching
74
+ instructions: string; // Free-form markdown body (the SKILL.md content)
82
75
  tags: string[]; // Categorization
83
76
  status: SkillStatus; // 'draft' | 'active' | 'deprecated' | 'experimental'
84
77
  metrics: SkillMetrics; // Usage tracking
85
- // ... namespace, taxonomy, lineage
78
+ // ... namespace, taxonomy, lineage, serving metadata
86
79
  }
87
80
  ```
88
81
 
@@ -249,6 +242,48 @@ bank.getHookRegistry().register({
249
242
  });
250
243
  ```
251
244
 
245
+ ### Materialization
246
+
247
+ Make skills discoverable by agents following the [Agent Skills standard](https://agentskills.io). Skills stored in `.skilltree/` are symlinked to standard discovery paths and AGENTS.md is auto-regenerated on changes.
248
+
249
+ ```typescript
250
+ const bank = createSkillBank({
251
+ storage: { basePath: './my-project' },
252
+ materialization: {
253
+ enabled: true,
254
+ symlinkPaths: ['.claude/skills', '.agent/skills'],
255
+ agentsMdPath: './AGENTS.md',
256
+ agentsMdFormat: 'xml', // 'xml' | 'markdown' | 'json'
257
+ debounceMs: 500,
258
+ },
259
+ });
260
+
261
+ await bank.initialize();
262
+ // Symlinks created, AGENTS.md generated
263
+
264
+ await bank.saveSkill(mySkill);
265
+ // Symlinks updated, AGENTS.md regenerated automatically
266
+ ```
267
+
268
+ This creates:
269
+ ```
270
+ .claude/skills/
271
+ my-skill -> ../../.skilltree/skills/my-skill (symlink)
272
+ .agent/skills/
273
+ my-skill -> ../../.skilltree/skills/my-skill (symlink)
274
+ AGENTS.md (auto-generated with <!-- SKILLTREE_START/END --> markers)
275
+ ```
276
+
277
+ Agents activate skills on demand via the CLI:
278
+
279
+ ```bash
280
+ # Read a skill to stdout (OpenSkills-compatible progressive disclosure)
281
+ skill-tree read my-skill
282
+
283
+ # Read multiple skills
284
+ skill-tree read skill-one,skill-two
285
+ ```
286
+
252
287
  ### AGENTS.md Integration
253
288
 
254
289
  Bidirectional sync between skill bank and AGENTS.md files:
@@ -331,7 +366,7 @@ satisfiesRange('1.5.0', '^1.2.0'); // true
331
366
 
332
367
  ## Skill Format
333
368
 
334
- Skills use YAML frontmatter + Markdown (OpenSkills-compatible):
369
+ Skills use YAML frontmatter + Markdown body ([Agent Skills](https://agentskills.io) compatible):
335
370
 
336
371
  ```markdown
337
372
  ---
@@ -348,22 +383,11 @@ tags:
348
383
  - imports
349
384
  ---
350
385
 
351
- ## Problem
352
-
353
386
  TypeScript with ES modules requires explicit .js extensions in imports.
354
387
 
355
- ## Trigger Conditions
356
-
357
- - **error**: `Cannot find module './utils'`
358
- - **pattern**: `import .* from '\./[^']+(?<!\.js)'`
359
-
360
- ## Solution
361
-
362
388
  1. Add `.js` extension to relative imports
363
389
  2. Even for `.ts` files, use `.js` in the import path
364
390
 
365
- ## Verification
366
-
367
391
  Run `tsc` and verify no module resolution errors.
368
392
  ```
369
393