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 +49 -25
- package/dist/cli/index.js +3230 -2168
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/index.mjs +9629 -1833
- package/dist/cli/index.mjs.map +1 -0
- package/dist/index.d.mts +444 -206
- package/dist/index.d.ts +444 -206
- package/dist/index.js +2960 -1644
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +9615 -69
- package/dist/index.mjs.map +1 -0
- package/package.json +2 -1
- package/dist/chunk-3SRB47JW.mjs +0 -8344
- package/dist/chunk-43YOKLZP.mjs +0 -6081
- package/dist/chunk-4AGZU52D.mjs +0 -7918
- package/dist/chunk-4OC5QFIF.mjs +0 -11267
- package/dist/chunk-55SMGVTP.mjs +0 -7126
- package/dist/chunk-6FX4IK4Z.mjs +0 -5368
- package/dist/chunk-7EGDKOHV.mjs +0 -9439
- package/dist/chunk-7LMOQW5H.mjs +0 -4893
- package/dist/chunk-7QIQJVNP.mjs +0 -14206
- package/dist/chunk-7VB4ZRZO.mjs +0 -7127
- package/dist/chunk-BPVRW25O.mjs +0 -6089
- package/dist/chunk-CI4476KM.mjs +0 -6607
- package/dist/chunk-DDXYQ74I.mjs +0 -13969
- package/dist/chunk-DQOFJXBX.mjs +0 -6595
- package/dist/chunk-E2CVK23F.mjs +0 -8751
- package/dist/chunk-FKJJ4RJG.mjs +0 -13874
- package/dist/chunk-II7DECZQ.mjs +0 -9111
- package/dist/chunk-INKVOZXK.mjs +0 -15898
- package/dist/chunk-K6NRCSAZ.mjs +0 -4355
- package/dist/chunk-OYHYXKXO.mjs +0 -7297
- package/dist/chunk-PDPN7FW7.mjs +0 -1045
- package/dist/chunk-Y54UK2J3.mjs +0 -13071
- package/dist/chunk-ZQVS7MQK.mjs +0 -6081
- package/dist/sqlite-OLU72GHB.mjs +0 -6
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
|
-
|
|
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; //
|
|
77
|
-
|
|
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 (
|
|
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
|
|