bmad-module-skill-forge 0.8.4 → 0.9.0
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 +5 -3
- package/docs/bmad-synergy.md +183 -0
- package/docs/concepts.md +30 -2
- package/docs/examples.md +57 -17
- package/docs/getting-started.md +17 -0
- package/docs/how-it-works.md +143 -29
- package/docs/index.md +1 -1
- package/docs/workflows.md +43 -5
- package/package.json +1 -1
- package/src/README.md +47 -0
- package/src/agents/forger.agent.yaml +8 -0
- package/src/knowledge/agentskills-spec.md +3 -0
- package/src/knowledge/overview.md +1 -0
- package/src/knowledge/provenance-tracking.md +3 -0
- package/src/knowledge/skf-knowledge-index.csv +1 -0
- package/src/knowledge/skill-lifecycle.md +19 -7
- package/src/knowledge/version-paths.md +243 -0
- package/src/module-help.csv +2 -0
- package/src/workflows/README.md +9 -1
- package/src/workflows/analyze-source/data/skill-brief-schema.md +4 -0
- package/src/workflows/audit-skill/steps-c/step-01-init.md +10 -6
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-03-structural-diff.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-05-severity-classify.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-06-report.md +1 -1
- package/src/workflows/brief-skill/data/skill-brief-schema.md +11 -0
- package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +24 -1
- package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +10 -0
- package/src/workflows/brief-skill/steps-c/step-04-confirm-brief.md +9 -0
- package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +14 -1
- package/src/workflows/create-skill/data/skill-sections.md +2 -0
- package/src/workflows/create-skill/data/source-resolution-protocols.md +40 -4
- package/src/workflows/create-skill/steps-c/step-03-extract.md +1 -1
- package/src/workflows/create-skill/steps-c/step-05-compile.md +1 -0
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +48 -32
- package/src/workflows/create-skill/steps-c/step-08-report.md +8 -7
- package/src/workflows/create-stack-skill/data/compose-mode-rules.md +12 -6
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +4 -1
- package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +11 -5
- package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +1 -1
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +1 -1
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +40 -23
- package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +6 -3
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +5 -3
- package/src/workflows/drop-skill/steps-c/step-01-select.md +298 -0
- package/src/workflows/drop-skill/steps-c/step-02-execute.md +290 -0
- package/src/workflows/drop-skill/steps-c/step-03-report.md +135 -0
- package/src/workflows/drop-skill/workflow.md +63 -0
- package/src/workflows/export-skill/data/managed-section-format.md +33 -8
- package/src/workflows/export-skill/data/snippet-format.md +16 -4
- package/src/workflows/export-skill/steps-c/step-01-load-skill.md +46 -7
- package/src/workflows/export-skill/steps-c/step-02-package.md +2 -2
- package/src/workflows/export-skill/steps-c/step-03-generate-snippet.md +39 -7
- package/src/workflows/export-skill/steps-c/step-04-update-context.md +185 -13
- package/src/workflows/export-skill/steps-c/step-05-token-report.md +2 -2
- package/src/workflows/export-skill/steps-c/step-06-summary.md +26 -7
- package/src/workflows/quick-skill/steps-c/step-01-resolve-target.md +10 -0
- package/src/workflows/quick-skill/steps-c/step-03-quick-extract.md +2 -0
- package/src/workflows/quick-skill/steps-c/step-05-validate.md +1 -1
- package/src/workflows/quick-skill/steps-c/step-06-write.md +30 -14
- package/src/workflows/refine-architecture/steps-c/step-01-init.md +8 -3
- package/src/workflows/rename-skill/steps-c/step-01-select.md +281 -0
- package/src/workflows/rename-skill/steps-c/step-02-execute.md +391 -0
- package/src/workflows/rename-skill/steps-c/step-03-report.md +132 -0
- package/src/workflows/rename-skill/workflow.md +64 -0
- package/src/workflows/test-skill/steps-c/step-01-init.md +14 -6
- package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +1 -1
- package/src/workflows/update-skill/data/remote-source-resolution.md +18 -4
- package/src/workflows/update-skill/steps-c/step-01-init.md +15 -8
- package/src/workflows/update-skill/steps-c/step-06-write.md +43 -13
- package/src/workflows/update-skill/steps-c/step-07-report.md +7 -5
- package/src/workflows/verify-stack/steps-c/step-01-init.md +8 -3
- package/tools/cli/lib/ui.js +24 -2
|
@@ -69,27 +69,155 @@ Auto-proceed immediately to {nextStepFile}.
|
|
|
69
69
|
|
|
70
70
|
Load {managedSectionData} and read the complete format template and three-case logic.
|
|
71
71
|
|
|
72
|
-
### 3. Determine Target File
|
|
72
|
+
### 3. Determine Target File(s)
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
Using the `target_platforms` list resolved in step-01, determine all target files:
|
|
75
75
|
|
|
76
76
|
| Platform | Target File |
|
|
77
77
|
|----------|-------------|
|
|
78
|
-
| `claude`
|
|
78
|
+
| `claude` | CLAUDE.md |
|
|
79
79
|
| `cursor` | .cursorrules |
|
|
80
80
|
| `copilot` | AGENTS.md |
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
For each platform in `target_platforms`, resolve target file path: `{project-root}/{target-file}`
|
|
83
|
+
|
|
84
|
+
**If multiple platforms:** Sections 4-9a execute as a loop — one full pass per target platform. Each iteration uses the same skill index but rewrites root paths per platform (section 4d) and writes to the platform-specific target file. Section 9b executes once after all iterations complete.
|
|
85
|
+
|
|
86
|
+
**Processing order:** Process platforms in the order listed in `target_platforms`.
|
|
87
|
+
|
|
88
|
+
#### 3b. Detect Orphaned Platform Files (Stale Managed Sections)
|
|
89
|
+
|
|
90
|
+
A platform file becomes orphaned when its IDE is removed from `config.yaml` after a prior export. The file still contains an SKF managed section pointing to stale skill versions, but no future export will rewrite it.
|
|
91
|
+
|
|
92
|
+
Build `orphaned_platform_files` — the set of platform context files that exist on disk with an `<!-- SKF:BEGIN -->` marker but whose platform is NOT in the current `target_platforms` list:
|
|
93
|
+
|
|
94
|
+
1. For each platform in the full set `{claude, cursor, copilot}`:
|
|
95
|
+
- If the platform is in `target_platforms`, skip (it will be rewritten in the main loop)
|
|
96
|
+
- Otherwise, check whether its target file exists (`CLAUDE.md`, `.cursorrules`, or `AGENTS.md`)
|
|
97
|
+
- If the file exists, read it and check for the `<!-- SKF:BEGIN -->` marker
|
|
98
|
+
- If the marker is present, add the file path to `orphaned_platform_files` along with the platform name
|
|
99
|
+
|
|
100
|
+
2. If `orphaned_platform_files` is non-empty, emit a warning:
|
|
101
|
+
|
|
102
|
+
"**Orphaned platform files detected.** The following files contain SKF managed sections but their platforms are no longer in `config.yaml` `ides`:
|
|
103
|
+
{list: platform → file path}
|
|
104
|
+
|
|
105
|
+
The managed sections in these files are stale. Options:
|
|
106
|
+
- **(a) clear** — remove the SKF managed section from each orphaned file (surgical marker replacement, leaves user content intact)
|
|
107
|
+
- **(b) keep** — leave them untouched (they will remain stale until you re-add the IDE or delete the file)
|
|
108
|
+
- **(c) rewrite** — also rewrite the orphaned files with the current skill index (use this if the IDE was removed by mistake)"
|
|
109
|
+
|
|
110
|
+
3. Wait for user choice. In non-interactive mode (dry-run or unattended), default to **(b) keep** and print the warning only.
|
|
111
|
+
|
|
112
|
+
4. If the user chose **(a) clear**: for each orphaned file, replace everything between `<!-- SKF:BEGIN` and `<!-- SKF:END -->` (inclusive) with an empty string, preserving surrounding content byte-exactly. Record the cleared files in `orphans_cleared`.
|
|
113
|
+
|
|
114
|
+
5. If the user chose **(c) rewrite**: add each orphaned platform to a separate `rewrite_platforms` list (kept distinct from `target_platforms` so the user's intent to only export to configured IDEs is preserved in the manifest's `platforms` field). Sections 4–9a will loop over `target_platforms + rewrite_platforms` for this run only. Record the rewritten files in `orphans_rewritten`.
|
|
115
|
+
|
|
116
|
+
6. If the user chose **(b) keep**: record nothing and proceed.
|
|
117
|
+
|
|
118
|
+
This cleanup only runs during interactive export. Drop-skill and rename-skill operate on the manifest's declared platforms and are not responsible for orphan detection.
|
|
83
119
|
|
|
84
120
|
### 4. Rebuild Complete Skill Index
|
|
85
121
|
|
|
86
|
-
|
|
122
|
+
#### 4a. Read Export Manifest (v2 — version-aware)
|
|
123
|
+
|
|
124
|
+
Read `{skills_output_folder}/.export-manifest.json` — see [knowledge/version-paths.md](../../../knowledge/version-paths.md) for the full v2 schema:
|
|
125
|
+
|
|
126
|
+
**If the file exists:** Parse JSON. Check for `schema_version` field:
|
|
127
|
+
|
|
128
|
+
**v2 manifest** (`schema_version: "2"`):
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"schema_version": "2",
|
|
132
|
+
"exports": {
|
|
133
|
+
"skill-name": {
|
|
134
|
+
"active_version": "0.6.0",
|
|
135
|
+
"versions": {
|
|
136
|
+
"0.1.0": {
|
|
137
|
+
"platforms": ["claude"],
|
|
138
|
+
"last_exported": "2026-01-15",
|
|
139
|
+
"status": "deprecated"
|
|
140
|
+
},
|
|
141
|
+
"0.5.0": {
|
|
142
|
+
"platforms": ["claude"],
|
|
143
|
+
"last_exported": "2026-03-15",
|
|
144
|
+
"status": "archived"
|
|
145
|
+
},
|
|
146
|
+
"0.6.0": {
|
|
147
|
+
"platforms": ["claude", "copilot"],
|
|
148
|
+
"last_exported": "2026-04-04",
|
|
149
|
+
"status": "active"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Status values:**
|
|
158
|
+
- `"active"` — currently exported; snippet appears in managed sections
|
|
159
|
+
- `"archived"` — previously exported, not active; files retained for rollback
|
|
160
|
+
- `"deprecated"` — dropped via drop-skill workflow; excluded from all exports (files may or may not exist on disk)
|
|
161
|
+
- `"draft"` — created but never exported
|
|
162
|
+
|
|
163
|
+
**v1 manifest** (no `schema_version` field — migrate in-place to v2):
|
|
164
|
+
1. For each entry in `exports`, read its `platforms` and `last_exported`
|
|
165
|
+
2. Resolve the skill's current version from `{resolved_skill_package}/metadata.json`
|
|
166
|
+
3. Wrap in v2 structure: set `active_version` to the resolved version, create a single entry in `versions` with `status: "active"`, the original `platforms`, and `last_exported`
|
|
167
|
+
4. Set `schema_version: "2"` at root
|
|
168
|
+
5. Hold the migrated structure in context (it will be written in section 9b)
|
|
169
|
+
|
|
170
|
+
**If the file does not exist** (first export or migration): Treat as empty — only the current export target will appear in the rebuilt index.
|
|
87
171
|
|
|
88
|
-
|
|
172
|
+
#### 4b. Build Exported Skill Set (version-aware)
|
|
89
173
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
174
|
+
Determine the set of skills to include in the rebuilt index:
|
|
175
|
+
|
|
176
|
+
1. Start with all skill names listed in the manifest's `exports` object (if manifest exists)
|
|
177
|
+
2. For each skill, record its `active_version` from the manifest (v2 schema)
|
|
178
|
+
3. **Integrity guard — `active_version` must resolve to a versions entry:** Check that `versions[active_version]` exists as a key. If `active_version` is set but there is no matching entry under `versions`, the manifest is inconsistent (possible corruption or a botched v1→v2 migration). Skip this skill and log a loud warning: "**Manifest integrity warning:** `{skill-name}.active_version = v{active_version}` has no matching entry under `versions`. Skipping. Re-run `[EX] Export Skill` on `{skill-name}` to repair the manifest entry."
|
|
179
|
+
4. **Exclude deprecated skills:** If the `active_version` entry in `versions.{active_version}` has `status: "deprecated"`, skip this skill entirely — it has been dropped via drop-skill workflow and must not appear in the managed section. Log: "Skipping {skill-name} — active version v{active_version} is deprecated"
|
|
180
|
+
5. Add the current export target skill name (ensures it is always included even before manifest is written) — use the version from `{resolved_skill_package}/metadata.json` as its `active_version`
|
|
181
|
+
6. This is the **exported skill set** — each entry has a skill name and its resolved `active_version`
|
|
182
|
+
|
|
183
|
+
#### 4c. Resolve and Filter Snippets (manifest-driven — replaces glob scan)
|
|
184
|
+
|
|
185
|
+
Instead of globbing `{skills_output_folder}/*/context-snippet.md`, resolve snippets from the exported skill set built in 4b:
|
|
186
|
+
|
|
187
|
+
**For each skill in the exported skill set:**
|
|
188
|
+
1. Resolve `{skill_package}` using the skill's `active_version`: `{skills_output_folder}/{skill-name}/{active_version}/{skill-name}/`
|
|
189
|
+
2. Read `{skill_package}/context-snippet.md`
|
|
190
|
+
3. **If snippet exists:** Add to skill index
|
|
191
|
+
4. **If snippet does not exist at the versioned path:** Check for `active` symlink at `{skills_output_folder}/{skill-name}/active/{skill-name}/context-snippet.md`. If still not found, skip with warning: "Snippet missing for {skill-name} v{active_version} — skipping from managed section"
|
|
192
|
+
|
|
193
|
+
**Skills NOT in the exported skill set are never scanned** — they have not been through export-skill and must not appear in the managed section (ADR-K).
|
|
194
|
+
|
|
195
|
+
**If no snippets pass the filter:** Generate managed section with zero skills — header only, no skill entries.
|
|
196
|
+
|
|
197
|
+
#### 4d. Rewrite Root Paths for Target Platform
|
|
198
|
+
|
|
199
|
+
The context-snippet.md files on disk contain root paths for the platform they were originally exported to. When assembling the managed section for the current target platform, rewrite root paths if they differ:
|
|
200
|
+
|
|
201
|
+
**Platform root path mapping:**
|
|
202
|
+
|
|
203
|
+
| Platform | Root Path Prefix |
|
|
204
|
+
|----------|-----------------|
|
|
205
|
+
| `claude` | `.claude/skills/` |
|
|
206
|
+
| `cursor` | `.cursor/skills/` |
|
|
207
|
+
| `copilot` | `.agents/skills/` |
|
|
208
|
+
| _(legacy)_ | `skills/` |
|
|
209
|
+
|
|
210
|
+
The legacy `skills/` prefix may appear in snippets exported before platform-aware root paths were introduced, or in draft snippets generated by create-skill/quick-skill.
|
|
211
|
+
|
|
212
|
+
For each snippet being included in the managed section:
|
|
213
|
+
|
|
214
|
+
1. Read the `root:` value from the snippet's first line
|
|
215
|
+
2. Detect the current root prefix by matching against the known prefixes above (check platform-specific prefixes first, then fall back to legacy `skills/`)
|
|
216
|
+
3. If the detected prefix does not match the current target platform's prefix, rewrite it
|
|
217
|
+
4. Example: if snippet has `root: .claude/skills/my-lib/` but target is `cursor`, rewrite to `root: .cursor/skills/my-lib/`
|
|
218
|
+
5. Example: if snippet has legacy `root: skills/my-lib/` and target is `copilot`, rewrite to `root: .agents/skills/my-lib/`
|
|
219
|
+
|
|
220
|
+
This ensures each platform's managed section points to the correct platform-specific skill directory, including during migration from pre-platform-aware exports.
|
|
93
221
|
|
|
94
222
|
**Sort skills alphabetically by name.**
|
|
95
223
|
|
|
@@ -139,7 +267,7 @@ Assemble the complete managed section:
|
|
|
139
267
|
|
|
140
268
|
### 7. Present Change Preview
|
|
141
269
|
|
|
142
|
-
"**Context update prepared
|
|
270
|
+
"**Context update prepared.{if multi-platform: ' (platform {i}/{total}: {platform})'}**
|
|
143
271
|
|
|
144
272
|
**Target:** `{project-root}/{target-file}`
|
|
145
273
|
**Case:** {1: Create / 2: Append / 3: Regenerate}
|
|
@@ -170,9 +298,16 @@ Auto-proceed to {nextStepFile}.
|
|
|
170
298
|
|
|
171
299
|
Display: "**Select:** [C] Continue — write changes to {target-file}"
|
|
172
300
|
|
|
301
|
+
**Multi-platform behavior:** When processing multiple platforms, present all platforms' previews together before asking for a single confirmation. After confirmation, write all target files sequentially, verifying each one.
|
|
302
|
+
|
|
303
|
+
"**Targets:** {list all platform → target-file pairs}
|
|
304
|
+
**Ready to write changes to all targets?**"
|
|
305
|
+
|
|
306
|
+
Display: "**Select:** [C] Continue — write changes to all targets"
|
|
307
|
+
|
|
173
308
|
#### Menu Handling Logic:
|
|
174
309
|
|
|
175
|
-
- IF C: Write the changes to target
|
|
310
|
+
- IF C: Write the changes to all target files (or single target), verify each write succeeded, then load, read entire file, then execute {nextStepFile}
|
|
176
311
|
- IF Any other: help user respond, then [Redisplay Menu Options](#8-present-menu-options)
|
|
177
312
|
|
|
178
313
|
#### EXECUTION RULES:
|
|
@@ -194,6 +329,38 @@ After user confirms with 'C':
|
|
|
194
329
|
**If verification fails:**
|
|
195
330
|
"**WARNING: Write verification failed.** {describe issue}. File may need manual review."
|
|
196
331
|
|
|
332
|
+
### 9b. Update Export Manifest (Non-Dry-Run Only)
|
|
333
|
+
|
|
334
|
+
**This section executes ONCE after all platform iterations complete** (outside the per-platform loop defined in section 3). Only platforms whose writes succeeded in section 9 are recorded.
|
|
335
|
+
|
|
336
|
+
1. Read `{skills_output_folder}/.export-manifest.json` (or start with `{"schema_version": "2", "exports": {}}` if it does not exist)
|
|
337
|
+
2. Ensure `schema_version` is `"2"` (if v1 was migrated in section 4a, the migrated structure is already in context)
|
|
338
|
+
3. Add or update the current skill's entry in v2 format:
|
|
339
|
+
```json
|
|
340
|
+
"{skill-name}": {
|
|
341
|
+
"active_version": "{version}",
|
|
342
|
+
"versions": {
|
|
343
|
+
"{version}": {
|
|
344
|
+
"platforms": ["{successfully-written platforms}"],
|
|
345
|
+
"last_exported": "{current-date}",
|
|
346
|
+
"status": "active"
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
```
|
|
351
|
+
- `{version}` is the version from `{resolved_skill_package}/metadata.json`
|
|
352
|
+
- Set `platforms` to only the platforms that were successfully written and verified in section 9
|
|
353
|
+
- If the skill already has a manifest entry:
|
|
354
|
+
- Set `active_version` to the current version
|
|
355
|
+
- If the version already exists in `versions`, update its `platforms` (merge, deduplicate), `last_exported`, and set `status: "active"`
|
|
356
|
+
- If this is a new version, add it to `versions` with `status: "active"` and set any previously-active version's status to `"archived"`
|
|
357
|
+
- Preserve all other version entries in `versions` (do not delete archived versions)
|
|
358
|
+
4. Write the updated manifest to `{skills_output_folder}/.export-manifest.json`
|
|
359
|
+
|
|
360
|
+
**Dry-run mode:** Do NOT update the manifest. Display: "**[DRY RUN] Export manifest would be updated for {skill-name} on platform(s) {platform-list}.**"
|
|
361
|
+
|
|
362
|
+
**Error handling:** If manifest write fails, warn but do not fail the workflow — the managed section was already written successfully.
|
|
363
|
+
|
|
197
364
|
## CRITICAL STEP COMPLETION NOTE
|
|
198
365
|
|
|
199
366
|
ONLY WHEN the user confirms changes by selecting 'C' (or auto-proceed in dry-run) and the write is verified will you load and read fully `{nextStepFile}` to execute the token report.
|
|
@@ -205,8 +372,11 @@ ONLY WHEN the user confirms changes by selecting 'C' (or auto-proceed in dry-run
|
|
|
205
372
|
### ✅ SUCCESS:
|
|
206
373
|
|
|
207
374
|
- Managed section format loaded from {managedSectionData}
|
|
208
|
-
- Target file correctly determined from platform flag
|
|
209
|
-
-
|
|
375
|
+
- Target file(s) correctly determined from platform flag or config.yaml ides list
|
|
376
|
+
- Multi-platform loop executed for all target_platforms
|
|
377
|
+
- Root paths rewritten per platform in managed section
|
|
378
|
+
- Complete skill index rebuilt from exported skills only (filtered via .export-manifest.json per ADR-K)
|
|
379
|
+
- Export manifest updated after successful write (non-dry-run only)
|
|
210
380
|
- Correct case detected (create/append/regenerate)
|
|
211
381
|
- Clear diff preview shown to user
|
|
212
382
|
- User confirmation received before writing
|
|
@@ -218,6 +388,8 @@ ONLY WHEN the user confirms changes by selecting 'C' (or auto-proceed in dry-run
|
|
|
218
388
|
|
|
219
389
|
- Modifying content outside `<!-- SKF:BEGIN/END -->` markers
|
|
220
390
|
- Not rebuilding the COMPLETE skill index (only adding current skill)
|
|
391
|
+
- Including un-exported skills in managed section (bypasses ADR-K publishing gate)
|
|
392
|
+
- Updating export manifest during dry-run
|
|
221
393
|
- Writing without user confirmation
|
|
222
394
|
- Not verifying write after completion
|
|
223
395
|
- Not detecting the correct case (create/append/regenerate)
|
|
@@ -72,14 +72,14 @@ For each artifact, estimate tokens using the heuristic: **words * 1.3** (approxi
|
|
|
72
72
|
| Artifact | Words | Est. Tokens | Notes |
|
|
73
73
|
|----------|-------|-------------|-------|
|
|
74
74
|
| context-snippet.md | {n} | ~{t} | Passive context (always-on) |
|
|
75
|
-
| Managed section (all skills) | {n} | ~{t} | In {target-file}, all {count} skills |
|
|
75
|
+
| Managed section (all skills) | {n} | ~{t} | In {target-file-list}, all {count} skills |
|
|
76
76
|
| SKILL.md | {n} | ~{t} | Active skill (on-trigger) |
|
|
77
77
|
| metadata.json | {n} | ~{t} | Machine-readable |
|
|
78
78
|
| references/ | {n} | ~{t} | {count} files |
|
|
79
79
|
| **Package total** | **{n}** | **~{t}** | **All artifacts combined** |
|
|
80
80
|
|
|
81
81
|
**Context Budget Impact:**
|
|
82
|
-
- **Always-on cost:** ~{managed-section-tokens} tokens (managed section in {target-file})
|
|
82
|
+
- **Always-on cost:** ~{managed-section-tokens} tokens (managed section in {target-file-list})
|
|
83
83
|
- **On-trigger cost:** ~{skill-tokens} tokens (when SKILL.md is loaded)
|
|
84
84
|
- **Full disclosure cost:** ~{total-tokens} tokens (if references/ also loaded)
|
|
85
85
|
|
|
@@ -55,7 +55,7 @@ To present a complete export summary showing all files written, token counts, an
|
|
|
55
55
|
|
|
56
56
|
**Skill:** {skill-name}
|
|
57
57
|
**Type:** {skill_type} | **Authority:** {source_authority} | **Tier:** {confidence_tier}
|
|
58
|
-
**Platform:** {platform} → {target-file}
|
|
58
|
+
**Platform(s):** {platform-list} → {target-file-list}
|
|
59
59
|
|
|
60
60
|
---
|
|
61
61
|
|
|
@@ -64,7 +64,8 @@ To present a complete export summary showing all files written, token counts, an
|
|
|
64
64
|
| File | Status | Tokens |
|
|
65
65
|
|------|--------|--------|
|
|
66
66
|
| context-snippet.md | {✅ written / ⚠️ skipped (passive off) / 👁️ previewed} | ~{t} |
|
|
67
|
-
| {target-file} managed section | {✅ updated (case {n}) / ⚠️ skipped / 👁️ previewed} | ~{t} |
|
|
67
|
+
| {target-file-1} managed section | {✅ updated (case {n}) / ⚠️ skipped / 👁️ previewed} | ~{t} |
|
|
68
|
+
| {target-file-N} managed section | {✅ updated (case {n}) / ⚠️ skipped / 👁️ previewed} | ~{t} |
|
|
68
69
|
| Package structure | ✅ validated | ~{t} total |
|
|
69
70
|
|
|
70
71
|
**Total context cost:** ~{always-on-tokens} tokens always-on, ~{on-trigger-tokens} tokens on-trigger"
|
|
@@ -102,7 +103,7 @@ Your skill is committed to the project's `skills/` directory and ships with your
|
|
|
102
103
|
|
|
103
104
|
**Team members** will automatically have access when they pull the latest changes.
|
|
104
105
|
|
|
105
|
-
**To update team context:** Ensure {target-file}
|
|
106
|
+
**To update team context:** Ensure all target files ({target-file-list}) are committed with the managed section updates."
|
|
106
107
|
|
|
107
108
|
**If `community`:**
|
|
108
109
|
|
|
@@ -110,12 +111,28 @@ Your skill is committed to the project's `skills/` directory and ships with your
|
|
|
110
111
|
|
|
111
112
|
Your skill is generated from an external dependency for local use.
|
|
112
113
|
|
|
113
|
-
**Location:** `{skills_output_folder}/{skill-name}/`
|
|
114
|
+
**Location:** `{skills_output_folder}/{skill-name}/{version}/{skill-name}/`
|
|
114
115
|
**Scope:** This project only — not for publishing to agentskills.io
|
|
115
116
|
|
|
116
117
|
**Note:** Community skills are generated from third-party source code. Only `official` skills (generated by the library maintainer) should be published to the ecosystem."
|
|
117
118
|
|
|
118
|
-
### 3.
|
|
119
|
+
### 3. Use It In This Project
|
|
120
|
+
|
|
121
|
+
Always show this section (regardless of `source_authority`) so the author can install the skill they just forged into the current project and try it immediately:
|
|
122
|
+
|
|
123
|
+
"### Use It In This Project
|
|
124
|
+
|
|
125
|
+
To install this skill into the current project right now:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
npx skills add {resolved_skill_package}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Replace `{resolved_skill_package}` with the absolute path to the package folder shown above (from step-02), e.g. `{skills_output_folder}/{skill-name}/{version}/{skill-name}/`.
|
|
132
|
+
|
|
133
|
+
For other source formats (registry name, git URL, tarball, etc.), see the **Installation → Source Formats** section at <https://www.npmjs.com/package/skills>."
|
|
134
|
+
|
|
135
|
+
### 4. Dry Run Reminder (If Applicable)
|
|
119
136
|
|
|
120
137
|
**If dry-run mode was active:**
|
|
121
138
|
|
|
@@ -125,7 +142,7 @@ No files were written. To run the export for real:
|
|
|
125
142
|
|
|
126
143
|
**Re-run without `--dry-run`** to write all files."
|
|
127
144
|
|
|
128
|
-
###
|
|
145
|
+
### 5. Recommended Next Steps
|
|
129
146
|
|
|
130
147
|
"### Next Steps
|
|
131
148
|
|
|
@@ -133,7 +150,7 @@ No files were written. To run the export for real:
|
|
|
133
150
|
- **update-skill** — After refactoring source code, regenerate the skill
|
|
134
151
|
- **test-skill** — Verify skill completeness and accuracy"
|
|
135
152
|
|
|
136
|
-
###
|
|
153
|
+
### 6. Workflow Complete
|
|
137
154
|
|
|
138
155
|
"---
|
|
139
156
|
|
|
@@ -152,6 +169,7 @@ This is the final step. The workflow is complete. No further steps to load.
|
|
|
152
169
|
- Complete summary with all files and their status
|
|
153
170
|
- Token counts included from step-05
|
|
154
171
|
- Distribution instructions appropriate for source_authority
|
|
172
|
+
- Local install command (`npx skills add {resolved_skill_package}`) displayed with npmjs.com/package/skills link for alternate source formats
|
|
155
173
|
- Dry-run correctly indicated (if applicable)
|
|
156
174
|
- Recommended next workflows listed
|
|
157
175
|
- Clear workflow completion signal
|
|
@@ -160,6 +178,7 @@ This is the final step. The workflow is complete. No further steps to load.
|
|
|
160
178
|
|
|
161
179
|
- Missing files from summary
|
|
162
180
|
- Wrong distribution instructions for source_authority
|
|
181
|
+
- Omitting the local install command / npmjs source-formats link
|
|
163
182
|
- Not indicating dry-run status
|
|
164
183
|
- Writing additional files (console-only step)
|
|
165
184
|
- Not ending the workflow cleanly
|
|
@@ -69,6 +69,16 @@ Provide a **GitHub URL** or **package name** and I'll resolve it to source and c
|
|
|
69
69
|
|
|
70
70
|
Wait for user input.
|
|
71
71
|
|
|
72
|
+
### 1b. Parse Version Targeting
|
|
73
|
+
|
|
74
|
+
**Version targeting:** If the user input contains `@` followed by a semver-like string (e.g., `cognee@0.5.0`, `https://github.com/org/repo@2.1.0-beta`), parse it as:
|
|
75
|
+
- **Package/URL:** everything before the last `@`
|
|
76
|
+
- **Target version:** everything after the last `@`
|
|
77
|
+
|
|
78
|
+
Store the target version as `target_version` in the extraction context. When present, this version overrides auto-detection (same behavior as `target_version` in the skill-brief schema).
|
|
79
|
+
|
|
80
|
+
If no `@version` suffix is present, proceed as today — version will be auto-detected.
|
|
81
|
+
|
|
72
82
|
### 2. Classify Input Type
|
|
73
83
|
|
|
74
84
|
**If input starts with `https://github.com/` or `github.com/`:**
|
|
@@ -54,6 +54,8 @@ To read the resolved GitHub repository source and extract the public API surface
|
|
|
54
54
|
|
|
55
55
|
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
|
56
56
|
|
|
57
|
+
**Ref-aware source reading:** When `source_ref` is set from tag resolution (see step-01), append `?ref={source_ref}` to all GitHub API content and tree requests (e.g., `gh api repos/{owner}/{repo}/contents/{path}?ref={source_ref}`) to read from the tagged version. When using web browsing, use the tagged URL format (e.g., `github.com/{owner}/{repo}/blob/{source_ref}/{path}`). This ensures extraction reads from the same source version resolved during tag resolution.
|
|
58
|
+
|
|
57
59
|
### 1. Read README
|
|
58
60
|
|
|
59
61
|
Read `README.md` from the repository root via web browsing.
|
|
@@ -105,7 +105,7 @@ Check that SKILL.md has these required sections populated:
|
|
|
105
105
|
Check context-snippet.md format compliance:
|
|
106
106
|
|
|
107
107
|
- [ ] **Vercel-aligned indexed format** — pipe-delimited with version, retrieval instruction, section anchors
|
|
108
|
-
- [ ] **First line** matches pattern: `[{name} v{version}]|root:
|
|
108
|
+
- [ ] **First line** matches pattern: `[{name} v{version}]|root: {prefix}{name}/` where prefix is `skills/` or a platform root (`.claude/skills/`, `.cursor/skills/`, `.agents/skills/`)
|
|
109
109
|
- [ ] **Second line** starts with: `|IMPORTANT:`
|
|
110
110
|
- [ ] **Approximate token count** is ~80-120 tokens
|
|
111
111
|
|
|
@@ -35,7 +35,7 @@ To write the compiled SKILL.md, context-snippet.md, and metadata.json to the ski
|
|
|
35
35
|
## EXECUTION PROTOCOLS:
|
|
36
36
|
|
|
37
37
|
- 🎯 Follow the MANDATORY SEQUENCE exactly
|
|
38
|
-
- 💾 Write three files to {
|
|
38
|
+
- 💾 Write three files to `{skill_package}` and create the `active` symlink
|
|
39
39
|
- 📖 File I/O required for directory creation and file writing
|
|
40
40
|
- 🚫 This is the final step — no next step to load
|
|
41
41
|
|
|
@@ -45,6 +45,7 @@ To write the compiled SKILL.md, context-snippet.md, and metadata.json to the ski
|
|
|
45
45
|
- Also available: resolved_url, repo_name, language, skills_output_folder
|
|
46
46
|
- Focus: file writing and completion only
|
|
47
47
|
- This is the FINAL step — workflow ends here
|
|
48
|
+
- Path resolution: See `knowledge/version-paths.md` for canonical path templates. Quick-skill uses `{repo_name}` as the skill name and defaults `{version}` to `1.0.0` if not detected from the extraction inventory
|
|
48
49
|
|
|
49
50
|
## MANDATORY SEQUENCE
|
|
50
51
|
|
|
@@ -52,15 +53,16 @@ To write the compiled SKILL.md, context-snippet.md, and metadata.json to the ski
|
|
|
52
53
|
|
|
53
54
|
### 1. Create Output Directory
|
|
54
55
|
|
|
55
|
-
Create the skill output
|
|
56
|
+
Resolve `{version}` from the extraction inventory's detected version, defaulting to `1.0.0` if not detected. Create the skill output directories:
|
|
56
57
|
|
|
57
58
|
```
|
|
58
|
-
{skills_output_folder}/{repo_name}/
|
|
59
|
+
{skill_group} # {skills_output_folder}/{repo_name}/
|
|
60
|
+
{skill_package} # {skills_output_folder}/{repo_name}/{version}/{repo_name}/
|
|
59
61
|
```
|
|
60
62
|
|
|
61
|
-
If
|
|
63
|
+
If `{skill_package}` already exists, confirm with user before overwriting:
|
|
62
64
|
|
|
63
|
-
"**Directory `{
|
|
65
|
+
"**Directory `{skill_package}` already exists.** Overwrite existing files? [Y/N]"
|
|
64
66
|
|
|
65
67
|
- **If user selects Y:** Proceed to section 2.
|
|
66
68
|
- **If user selects N:** Halt with: "Overwrite cancelled. Existing skill preserved. Run [QS] with a different skill name or remove the existing directory manually."
|
|
@@ -70,7 +72,7 @@ If directory already exists, confirm with user before overwriting:
|
|
|
70
72
|
Write the compiled SKILL.md content to:
|
|
71
73
|
|
|
72
74
|
```
|
|
73
|
-
{
|
|
75
|
+
{skill_package}/SKILL.md
|
|
74
76
|
```
|
|
75
77
|
|
|
76
78
|
Confirm: "Written: SKILL.md"
|
|
@@ -80,7 +82,7 @@ Confirm: "Written: SKILL.md"
|
|
|
80
82
|
Write the context snippet to:
|
|
81
83
|
|
|
82
84
|
```
|
|
83
|
-
{
|
|
85
|
+
{skill_package}/context-snippet.md
|
|
84
86
|
```
|
|
85
87
|
|
|
86
88
|
Confirm: "Written: context-snippet.md"
|
|
@@ -90,11 +92,23 @@ Confirm: "Written: context-snippet.md"
|
|
|
90
92
|
Write the metadata JSON to:
|
|
91
93
|
|
|
92
94
|
```
|
|
93
|
-
{
|
|
95
|
+
{skill_package}/metadata.json
|
|
94
96
|
```
|
|
95
97
|
|
|
96
98
|
Confirm: "Written: metadata.json"
|
|
97
99
|
|
|
100
|
+
### 4b. Create Active Symlink
|
|
101
|
+
|
|
102
|
+
Create or update the `active` symlink at `{skill_group}/active` pointing to `{version}`:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
{skill_group}/active -> {version}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
If the symlink already exists, remove it first and recreate.
|
|
109
|
+
|
|
110
|
+
Confirm: "Symlink: {skill_group}/active -> {version}"
|
|
111
|
+
|
|
98
112
|
### 5. Handle Write Failures
|
|
99
113
|
|
|
100
114
|
**If any file write fails — HARD HALT:**
|
|
@@ -112,16 +126,17 @@ Please check:
|
|
|
112
126
|
|
|
113
127
|
"**Quick Skill complete.**
|
|
114
128
|
|
|
115
|
-
**Skill:** {repo_name}
|
|
129
|
+
**Skill:** {repo_name} v{version}
|
|
116
130
|
**Language:** {language}
|
|
117
131
|
**Source:** {resolved_url}
|
|
118
132
|
**Authority:** community
|
|
119
133
|
**Confidence:** {extraction confidence}
|
|
120
134
|
|
|
121
135
|
**Files written:**
|
|
122
|
-
- `{
|
|
123
|
-
- `{
|
|
124
|
-
- `{
|
|
136
|
+
- `{skill_package}/SKILL.md`
|
|
137
|
+
- `{skill_package}/context-snippet.md`
|
|
138
|
+
- `{skill_package}/metadata.json`
|
|
139
|
+
- `{skill_group}/active` -> `{version}`
|
|
125
140
|
|
|
126
141
|
**Exports documented:** {count}
|
|
127
142
|
**Validation:** {pass / N issues (advisory)}
|
|
@@ -147,8 +162,9 @@ No next step to load. Session ends here.
|
|
|
147
162
|
|
|
148
163
|
### ✅ SUCCESS:
|
|
149
164
|
|
|
150
|
-
- Output directory created (or overwrite confirmed)
|
|
151
|
-
- All three files written successfully
|
|
165
|
+
- Output directory created (or overwrite confirmed) with version-nested structure
|
|
166
|
+
- All three files written successfully to {skill_package}
|
|
167
|
+
- Active symlink created at {skill_group}/active -> {version}
|
|
152
168
|
- Completion summary displayed with file paths
|
|
153
169
|
- Next step recommendations provided
|
|
154
170
|
- Workflow ends cleanly
|
|
@@ -74,9 +74,14 @@ Wait for user input. Store the validated architecture document path as `architec
|
|
|
74
74
|
|
|
75
75
|
### 2. Scan Skills Folder
|
|
76
76
|
|
|
77
|
-
Read the `{skills_output_folder}` directory.
|
|
77
|
+
Read the `{skills_output_folder}` directory. Skills use a version-nested directory structure (see [knowledge/version-paths.md](../../../knowledge/version-paths.md)).
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
**Version-aware skill discovery:**
|
|
80
|
+
1. Read `{skills_output_folder}/.export-manifest.json` if it exists. For each skill in `exports`, use `active_version` to resolve `{skill_package}` = `{skills_output_folder}/{skill-name}/{active_version}/{skill-name}/`
|
|
81
|
+
2. For any subdirectory not covered by the manifest, check for an `active` symlink at `{skills_output_folder}/{dir_name}/active` — resolve to `{skill_group}/active/{dir_name}/`
|
|
82
|
+
3. Fall back to flat path `{skills_output_folder}/{dir_name}/` for unmigrated skills
|
|
83
|
+
|
|
84
|
+
For each resolved skill package, check for the presence of `SKILL.md` and `metadata.json`.
|
|
80
85
|
|
|
81
86
|
**For each valid skill directory, extract from metadata.json:**
|
|
82
87
|
- `name` — skill name
|
|
@@ -87,7 +92,7 @@ For each subdirectory, check for the presence of `SKILL.md` and `metadata.json`.
|
|
|
87
92
|
|
|
88
93
|
**Build a skill inventory** as an internal list of all loaded skills with the fields above.
|
|
89
94
|
|
|
90
|
-
**If a
|
|
95
|
+
**If a resolved skill package lacks SKILL.md or metadata.json:**
|
|
91
96
|
- Log: "Skipping `{dir_name}` — missing SKILL.md or metadata.json"
|
|
92
97
|
- Do not include in inventory
|
|
93
98
|
|