skilld 1.7.4 → 2.0.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/dist/_chunks/add.mjs +66 -0
- package/dist/_chunks/add.mjs.map +1 -0
- package/dist/_chunks/agent-prompt.mjs +88 -0
- package/dist/_chunks/agent-prompt.mjs.map +1 -0
- package/dist/_chunks/agent.mjs +81 -57
- package/dist/_chunks/agent.mjs.map +1 -1
- package/dist/_chunks/args.mjs +42 -0
- package/dist/_chunks/args.mjs.map +1 -0
- package/dist/_chunks/assemble.mjs +10 -7
- package/dist/_chunks/assemble.mjs.map +1 -1
- package/dist/_chunks/author.mjs +33 -17
- package/dist/_chunks/author.mjs.map +1 -1
- package/dist/_chunks/cache.mjs +143 -183
- package/dist/_chunks/cache.mjs.map +1 -1
- package/dist/_chunks/cache2.mjs +7 -6
- package/dist/_chunks/cache2.mjs.map +1 -1
- package/dist/_chunks/client.mjs +117 -0
- package/dist/_chunks/client.mjs.map +1 -0
- package/dist/_chunks/core.mjs +5 -5
- package/dist/_chunks/detect.mjs +53 -43
- package/dist/_chunks/detect.mjs.map +1 -1
- package/dist/_chunks/eject.mjs +69 -0
- package/dist/_chunks/eject.mjs.map +1 -0
- package/dist/_chunks/embedding-cache2.mjs +1 -1
- package/dist/_chunks/env.mjs +19 -0
- package/dist/_chunks/env.mjs.map +1 -0
- package/dist/_chunks/install-many.mjs +376 -0
- package/dist/_chunks/install-many.mjs.map +1 -0
- package/dist/_chunks/install.mjs +81 -326
- package/dist/_chunks/install.mjs.map +1 -1
- package/dist/_chunks/intro.mjs +63 -0
- package/dist/_chunks/intro.mjs.map +1 -0
- package/dist/_chunks/list.mjs +2 -2
- package/dist/_chunks/list.mjs.map +1 -1
- package/dist/_chunks/lockfile.mjs +3 -2
- package/dist/_chunks/lockfile.mjs.map +1 -1
- package/dist/_chunks/login.mjs +233 -0
- package/dist/_chunks/login.mjs.map +1 -0
- package/dist/_chunks/logout.mjs +27 -0
- package/dist/_chunks/logout.mjs.map +1 -0
- package/dist/_chunks/map.mjs +11 -0
- package/dist/_chunks/map.mjs.map +1 -0
- package/dist/_chunks/markdown.mjs +79 -54
- package/dist/_chunks/markdown.mjs.map +1 -1
- package/dist/_chunks/menu.mjs +33 -0
- package/dist/_chunks/menu.mjs.map +1 -0
- package/dist/_chunks/model-picker.mjs +61 -0
- package/dist/_chunks/model-picker.mjs.map +1 -0
- package/dist/_chunks/monorepo.mjs +4 -2
- package/dist/_chunks/monorepo.mjs.map +1 -1
- package/dist/_chunks/package-json.mjs.map +1 -1
- package/dist/_chunks/paths.mjs +3 -5
- package/dist/_chunks/paths.mjs.map +1 -1
- package/dist/_chunks/{sync-pipeline.mjs → pipeline.mjs} +346 -313
- package/dist/_chunks/pipeline.mjs.map +1 -0
- package/dist/_chunks/pool2.mjs +1 -1
- package/dist/_chunks/portable.mjs +151 -0
- package/dist/_chunks/portable.mjs.map +1 -0
- package/dist/_chunks/prepare-hook.mjs +2 -0
- package/dist/_chunks/prepare-hook2.mjs +61 -0
- package/dist/_chunks/prepare-hook2.mjs.map +1 -0
- package/dist/_chunks/prepare.mjs +47 -3
- package/dist/_chunks/prepare.mjs.map +1 -1
- package/dist/_chunks/prepare2.mjs +7 -6
- package/dist/_chunks/prepare2.mjs.map +1 -1
- package/dist/_chunks/prompts.mjs +484 -74
- package/dist/_chunks/prompts.mjs.map +1 -1
- package/dist/_chunks/pull.mjs +219 -0
- package/dist/_chunks/pull.mjs.map +1 -0
- package/dist/_chunks/regex.mjs +19 -0
- package/dist/_chunks/regex.mjs.map +1 -0
- package/dist/_chunks/retriv.mjs +2 -171
- package/dist/_chunks/retriv2.mjs +159 -0
- package/dist/_chunks/retriv2.mjs.map +1 -0
- package/dist/_chunks/sanitize.mjs +12 -9
- package/dist/_chunks/sanitize.mjs.map +1 -1
- package/dist/_chunks/search-helpers.mjs +8 -6
- package/dist/_chunks/search-helpers.mjs.map +1 -1
- package/dist/_chunks/search-interactive.mjs +23 -20
- package/dist/_chunks/search-interactive.mjs.map +1 -1
- package/dist/_chunks/search.mjs +3 -3
- package/dist/_chunks/search.mjs.map +1 -1
- package/dist/_chunks/semver.mjs +2755 -1
- package/dist/_chunks/semver.mjs.map +1 -1
- package/dist/_chunks/skill-installer2.mjs +10 -11
- package/dist/_chunks/skill-installer2.mjs.map +1 -1
- package/dist/_chunks/skills.mjs +6 -7
- package/dist/_chunks/skills.mjs.map +1 -1
- package/dist/_chunks/store.mjs +107 -0
- package/dist/_chunks/store.mjs.map +1 -0
- package/dist/_chunks/sync.mjs +411 -910
- package/dist/_chunks/sync.mjs.map +1 -1
- package/dist/_chunks/sync2.mjs +2 -5
- package/dist/_chunks/telemetry.mjs +26 -0
- package/dist/_chunks/telemetry.mjs.map +1 -0
- package/dist/_chunks/uninstall.mjs +12 -9
- package/dist/_chunks/uninstall.mjs.map +1 -1
- package/dist/_chunks/update.mjs +171 -0
- package/dist/_chunks/update.mjs.map +1 -0
- package/dist/_chunks/upload.mjs +3 -3
- package/dist/_chunks/validate.mjs +1 -1
- package/dist/_chunks/version.mjs +16 -17
- package/dist/_chunks/version.mjs.map +1 -1
- package/dist/_chunks/whoami.mjs +21 -0
- package/dist/_chunks/whoami.mjs.map +1 -0
- package/dist/_chunks/wizard.mjs +2 -190
- package/dist/_chunks/wizard2.mjs +200 -0
- package/dist/_chunks/wizard2.mjs.map +1 -0
- package/dist/cli.mjs +72 -53
- package/dist/cli.mjs.map +1 -1
- package/dist/prepare.mjs +4 -3
- package/dist/prepare.mjs.map +1 -1
- package/dist/retriv/worker.d.mts +5 -1
- package/dist/retriv/worker.d.mts.map +1 -1
- package/dist/retriv/worker.mjs +1 -1
- package/package.json +19 -28
- package/dist/_chunks/author-group.mjs +0 -17
- package/dist/_chunks/author-group.mjs.map +0 -1
- package/dist/_chunks/cli-helpers.mjs +0 -335
- package/dist/_chunks/cli-helpers.mjs.map +0 -1
- package/dist/_chunks/cli-helpers2.mjs +0 -2
- package/dist/_chunks/index.d.mts +0 -344
- package/dist/_chunks/index.d.mts.map +0 -1
- package/dist/_chunks/index2.d.mts +0 -279
- package/dist/_chunks/index2.d.mts.map +0 -1
- package/dist/_chunks/index3.d.mts +0 -44
- package/dist/_chunks/index3.d.mts.map +0 -1
- package/dist/_chunks/index4.d.mts +0 -553
- package/dist/_chunks/index4.d.mts.map +0 -1
- package/dist/_chunks/package-registry.mjs +0 -465
- package/dist/_chunks/package-registry.mjs.map +0 -1
- package/dist/_chunks/retriv.mjs.map +0 -1
- package/dist/_chunks/setup.mjs +0 -17
- package/dist/_chunks/setup.mjs.map +0 -1
- package/dist/_chunks/sources.mjs +0 -2654
- package/dist/_chunks/sources.mjs.map +0 -1
- package/dist/_chunks/sync-pipeline.mjs.map +0 -1
- package/dist/_chunks/sync-registry.mjs +0 -65
- package/dist/_chunks/sync-registry.mjs.map +0 -1
- package/dist/_chunks/types.d.mts +0 -76
- package/dist/_chunks/types.d.mts.map +0 -1
- package/dist/_chunks/types2.d.mts +0 -88
- package/dist/_chunks/types2.d.mts.map +0 -1
- package/dist/_chunks/wizard.mjs.map +0 -1
- package/dist/agent/index.d.mts +0 -2
- package/dist/agent/index.mjs +0 -4
- package/dist/cache/index.d.mts +0 -2
- package/dist/cache/index.mjs +0 -5
- package/dist/index.d.mts +0 -6
- package/dist/index.mjs +0 -6
- package/dist/retriv/index.d.mts +0 -3
- package/dist/retriv/index.mjs +0 -2
- package/dist/sources/index.d.mts +0 -3
- package/dist/sources/index.mjs +0 -3
- package/dist/types.d.mts +0 -4
- package/dist/types.mjs +0 -1
package/dist/_chunks/prompts.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { a as targets } from "./detect.mjs";
|
|
2
|
+
import "./paths.mjs";
|
|
3
|
+
import { c as NPM_SCOPE_PREFIX_RE, f as SEMVER_MAJOR_MINOR_RE } from "./regex.mjs";
|
|
3
4
|
import { n as sanitizeMarkdown, t as repairMarkdown } from "./sanitize.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { a as targets, t as detectInstalledAgents } from "./detect.mjs";
|
|
5
|
+
import { t as yamlEscape } from "./yaml.mjs";
|
|
6
6
|
import { existsSync, lstatSync, mkdirSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
|
|
7
|
+
import { styleText } from "node:util";
|
|
8
|
+
import * as p from "@clack/prompts";
|
|
7
9
|
import { dirname, join, relative } from "pathe";
|
|
8
10
|
import { execSync } from "node:child_process";
|
|
9
|
-
import * as p from "@clack/prompts";
|
|
10
11
|
import { isWindows } from "std-env";
|
|
11
12
|
let cached;
|
|
12
13
|
function resolveSkilldCommand() {
|
|
@@ -19,6 +20,455 @@ function resolveSkilldCommand() {
|
|
|
19
20
|
}
|
|
20
21
|
return cached;
|
|
21
22
|
}
|
|
23
|
+
const REPO_REGISTRY = {
|
|
24
|
+
"vuejs/core": {
|
|
25
|
+
owner: "vuejs",
|
|
26
|
+
repo: "core",
|
|
27
|
+
docsRepo: "docs",
|
|
28
|
+
docsPath: "src",
|
|
29
|
+
homepage: "https://vuejs.org",
|
|
30
|
+
prereleaseChangelogRef: "minor",
|
|
31
|
+
packages: {
|
|
32
|
+
"vue": {
|
|
33
|
+
primary: true,
|
|
34
|
+
filePatterns: ["*.vue"],
|
|
35
|
+
rules: ["ALWAYS use `<script setup lang=\"ts\">`", "Use ```vue code fences for SFC examples containing `<script>` or `<template>` tags, ```ts for plain TypeScript"]
|
|
36
|
+
},
|
|
37
|
+
"@vue/compiler-core": {},
|
|
38
|
+
"@vue/compiler-dom": {},
|
|
39
|
+
"@vue/reactivity": {},
|
|
40
|
+
"@vue/runtime-core": {},
|
|
41
|
+
"@vue/runtime-dom": {},
|
|
42
|
+
"@vue/shared": {}
|
|
43
|
+
},
|
|
44
|
+
blogReleases: [
|
|
45
|
+
{
|
|
46
|
+
version: "3.5",
|
|
47
|
+
url: "https://blog.vuejs.org/posts/vue-3-5",
|
|
48
|
+
date: "2024-09-01"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
version: "3.4",
|
|
52
|
+
url: "https://blog.vuejs.org/posts/vue-3-4",
|
|
53
|
+
date: "2023-12-28"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
version: "3.3",
|
|
57
|
+
url: "https://blog.vuejs.org/posts/vue-3-3",
|
|
58
|
+
date: "2023-05-11"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
version: "3.2",
|
|
62
|
+
url: "https://blog.vuejs.org/posts/vue-3-2",
|
|
63
|
+
date: "2021-08-05"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
version: "3.1",
|
|
67
|
+
url: "https://blog.vuejs.org/posts/vue-3-1",
|
|
68
|
+
date: "2021-06-07"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
version: "3.0",
|
|
72
|
+
url: "https://blog.vuejs.org/posts/vue-3-0",
|
|
73
|
+
date: "2020-09-18"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"tailwindlabs/tailwindcss": {
|
|
78
|
+
owner: "tailwindlabs",
|
|
79
|
+
repo: "tailwindcss",
|
|
80
|
+
docsRepo: "tailwindcss.com",
|
|
81
|
+
docsPath: "src/docs",
|
|
82
|
+
homepage: "https://tailwindcss.com",
|
|
83
|
+
packages: { tailwindcss: { primary: true } }
|
|
84
|
+
},
|
|
85
|
+
"withastro/astro": {
|
|
86
|
+
owner: "withastro",
|
|
87
|
+
repo: "astro",
|
|
88
|
+
docsRepo: "docs",
|
|
89
|
+
docsPath: "src/content/docs/en",
|
|
90
|
+
homepage: "https://docs.astro.build",
|
|
91
|
+
packages: { astro: {
|
|
92
|
+
primary: true,
|
|
93
|
+
filePatterns: ["*.astro"]
|
|
94
|
+
} }
|
|
95
|
+
},
|
|
96
|
+
"vueuse/vueuse": {
|
|
97
|
+
owner: "vueuse",
|
|
98
|
+
repo: "vueuse",
|
|
99
|
+
docsPath: "packages",
|
|
100
|
+
packages: { "@vueuse/core": { primary: true } }
|
|
101
|
+
},
|
|
102
|
+
"sveltejs/svelte": {
|
|
103
|
+
owner: "sveltejs",
|
|
104
|
+
repo: "svelte",
|
|
105
|
+
packages: { svelte: {
|
|
106
|
+
primary: true,
|
|
107
|
+
filePatterns: ["*.svelte"],
|
|
108
|
+
rules: ["ALWAYS use runes syntax ($state, $derived, $effect, $props)"]
|
|
109
|
+
} }
|
|
110
|
+
},
|
|
111
|
+
"solidjs/solid": {
|
|
112
|
+
owner: "solidjs",
|
|
113
|
+
repo: "solid",
|
|
114
|
+
packages: { "solid-js": {
|
|
115
|
+
primary: true,
|
|
116
|
+
filePatterns: ["*.jsx", "*.tsx"]
|
|
117
|
+
} }
|
|
118
|
+
},
|
|
119
|
+
"QwikDev/qwik": {
|
|
120
|
+
owner: "QwikDev",
|
|
121
|
+
repo: "qwik",
|
|
122
|
+
packages: { qwik: {
|
|
123
|
+
primary: true,
|
|
124
|
+
filePatterns: ["*.tsx"]
|
|
125
|
+
} }
|
|
126
|
+
},
|
|
127
|
+
"marko-js/marko": {
|
|
128
|
+
owner: "marko-js",
|
|
129
|
+
repo: "marko",
|
|
130
|
+
packages: { marko: {
|
|
131
|
+
primary: true,
|
|
132
|
+
filePatterns: ["*.marko"]
|
|
133
|
+
} }
|
|
134
|
+
},
|
|
135
|
+
"riot/riot": {
|
|
136
|
+
owner: "riot",
|
|
137
|
+
repo: "riot",
|
|
138
|
+
packages: { riot: {
|
|
139
|
+
primary: true,
|
|
140
|
+
filePatterns: ["*.riot"]
|
|
141
|
+
} }
|
|
142
|
+
},
|
|
143
|
+
"microsoft/TypeScript": {
|
|
144
|
+
owner: "microsoft",
|
|
145
|
+
repo: "TypeScript",
|
|
146
|
+
packages: { typescript: {
|
|
147
|
+
primary: true,
|
|
148
|
+
filePatterns: [
|
|
149
|
+
"*.ts",
|
|
150
|
+
"*.tsx",
|
|
151
|
+
"*.mts",
|
|
152
|
+
"*.cts"
|
|
153
|
+
]
|
|
154
|
+
} },
|
|
155
|
+
blogReleases: [
|
|
156
|
+
{
|
|
157
|
+
version: "6.0",
|
|
158
|
+
url: "https://devblogs.microsoft.com/typescript/announcing-typescript-6-0-beta/",
|
|
159
|
+
date: "2026-02-11",
|
|
160
|
+
title: "Announcing TypeScript 6.0 Beta"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
version: "5.9",
|
|
164
|
+
url: "https://devblogs.microsoft.com/typescript/announcing-typescript-5-9/",
|
|
165
|
+
date: "2025-08-01",
|
|
166
|
+
title: "Announcing TypeScript 5.9"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
version: "5.8",
|
|
170
|
+
url: "https://devblogs.microsoft.com/typescript/announcing-typescript-5-8/",
|
|
171
|
+
date: "2025-02-28",
|
|
172
|
+
title: "Announcing TypeScript 5.8"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
version: "5.7",
|
|
176
|
+
url: "https://devblogs.microsoft.com/typescript/announcing-typescript-5-7/",
|
|
177
|
+
date: "2024-11-22",
|
|
178
|
+
title: "Announcing TypeScript 5.7"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
version: "5.6",
|
|
182
|
+
url: "https://devblogs.microsoft.com/typescript/announcing-typescript-5-6/",
|
|
183
|
+
date: "2024-09-09",
|
|
184
|
+
title: "Announcing TypeScript 5.6"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
version: "5.5",
|
|
188
|
+
url: "https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/",
|
|
189
|
+
date: "2024-06-20",
|
|
190
|
+
title: "Announcing TypeScript 5.5"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
"jashkenas/coffeescript": {
|
|
195
|
+
owner: "jashkenas",
|
|
196
|
+
repo: "coffeescript",
|
|
197
|
+
packages: { coffeescript: {
|
|
198
|
+
primary: true,
|
|
199
|
+
filePatterns: ["*.coffee"]
|
|
200
|
+
} }
|
|
201
|
+
},
|
|
202
|
+
"gkz/LiveScript": {
|
|
203
|
+
owner: "gkz",
|
|
204
|
+
repo: "LiveScript",
|
|
205
|
+
packages: { livescript: {
|
|
206
|
+
primary: true,
|
|
207
|
+
filePatterns: ["*.ls"]
|
|
208
|
+
} }
|
|
209
|
+
},
|
|
210
|
+
"elm/compiler": {
|
|
211
|
+
owner: "elm",
|
|
212
|
+
repo: "compiler",
|
|
213
|
+
packages: { elm: {
|
|
214
|
+
primary: true,
|
|
215
|
+
filePatterns: ["*.elm"]
|
|
216
|
+
} }
|
|
217
|
+
},
|
|
218
|
+
"sass/dart-sass": {
|
|
219
|
+
owner: "sass",
|
|
220
|
+
repo: "dart-sass",
|
|
221
|
+
packages: { sass: {
|
|
222
|
+
primary: true,
|
|
223
|
+
filePatterns: ["*.scss", "*.sass"]
|
|
224
|
+
} }
|
|
225
|
+
},
|
|
226
|
+
"less/less.js": {
|
|
227
|
+
owner: "less",
|
|
228
|
+
repo: "less.js",
|
|
229
|
+
packages: { less: {
|
|
230
|
+
primary: true,
|
|
231
|
+
filePatterns: ["*.less"]
|
|
232
|
+
} }
|
|
233
|
+
},
|
|
234
|
+
"stylus/stylus": {
|
|
235
|
+
owner: "stylus",
|
|
236
|
+
repo: "stylus",
|
|
237
|
+
packages: { stylus: {
|
|
238
|
+
primary: true,
|
|
239
|
+
filePatterns: ["*.styl"]
|
|
240
|
+
} }
|
|
241
|
+
},
|
|
242
|
+
"postcss/postcss": {
|
|
243
|
+
owner: "postcss",
|
|
244
|
+
repo: "postcss",
|
|
245
|
+
packages: { postcss: {
|
|
246
|
+
primary: true,
|
|
247
|
+
filePatterns: ["*.css", "*.pcss"]
|
|
248
|
+
} }
|
|
249
|
+
},
|
|
250
|
+
"pugjs/pug": {
|
|
251
|
+
owner: "pugjs",
|
|
252
|
+
repo: "pug",
|
|
253
|
+
packages: { pug: {
|
|
254
|
+
primary: true,
|
|
255
|
+
filePatterns: ["*.pug"]
|
|
256
|
+
} }
|
|
257
|
+
},
|
|
258
|
+
"mde/ejs": {
|
|
259
|
+
owner: "mde",
|
|
260
|
+
repo: "ejs",
|
|
261
|
+
packages: { ejs: {
|
|
262
|
+
primary: true,
|
|
263
|
+
filePatterns: ["*.ejs"]
|
|
264
|
+
} }
|
|
265
|
+
},
|
|
266
|
+
"handlebars-lang/handlebars.js": {
|
|
267
|
+
owner: "handlebars-lang",
|
|
268
|
+
repo: "handlebars.js",
|
|
269
|
+
packages: { handlebars: {
|
|
270
|
+
primary: true,
|
|
271
|
+
filePatterns: ["*.hbs", "*.handlebars"]
|
|
272
|
+
} }
|
|
273
|
+
},
|
|
274
|
+
"janl/mustache.js": {
|
|
275
|
+
owner: "janl",
|
|
276
|
+
repo: "mustache.js",
|
|
277
|
+
packages: { mustache: {
|
|
278
|
+
primary: true,
|
|
279
|
+
filePatterns: ["*.mustache"]
|
|
280
|
+
} }
|
|
281
|
+
},
|
|
282
|
+
"mozilla/nunjucks": {
|
|
283
|
+
owner: "mozilla",
|
|
284
|
+
repo: "nunjucks",
|
|
285
|
+
packages: { nunjucks: {
|
|
286
|
+
primary: true,
|
|
287
|
+
filePatterns: ["*.njk"]
|
|
288
|
+
} }
|
|
289
|
+
},
|
|
290
|
+
"Shopify/liquid": {
|
|
291
|
+
owner: "Shopify",
|
|
292
|
+
repo: "liquid",
|
|
293
|
+
packages: { liquid: {
|
|
294
|
+
primary: true,
|
|
295
|
+
filePatterns: ["*.liquid"]
|
|
296
|
+
} }
|
|
297
|
+
},
|
|
298
|
+
"eemeli/yaml": {
|
|
299
|
+
owner: "eemeli",
|
|
300
|
+
repo: "yaml",
|
|
301
|
+
packages: { yaml: {
|
|
302
|
+
primary: true,
|
|
303
|
+
filePatterns: ["*.yaml", "*.yml"]
|
|
304
|
+
} }
|
|
305
|
+
},
|
|
306
|
+
"nodeca/js-yaml": {
|
|
307
|
+
owner: "nodeca",
|
|
308
|
+
repo: "js-yaml",
|
|
309
|
+
packages: { "js-yaml": {
|
|
310
|
+
primary: true,
|
|
311
|
+
filePatterns: ["*.yaml", "*.yml"]
|
|
312
|
+
} }
|
|
313
|
+
},
|
|
314
|
+
"BinaryMuse/toml-node": {
|
|
315
|
+
owner: "BinaryMuse",
|
|
316
|
+
repo: "toml-node",
|
|
317
|
+
packages: {
|
|
318
|
+
"toml": {
|
|
319
|
+
primary: true,
|
|
320
|
+
filePatterns: ["*.toml"]
|
|
321
|
+
},
|
|
322
|
+
"@iarna/toml": { filePatterns: ["*.toml"] }
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"json5/json5": {
|
|
326
|
+
owner: "json5",
|
|
327
|
+
repo: "json5",
|
|
328
|
+
packages: { json5: {
|
|
329
|
+
primary: true,
|
|
330
|
+
filePatterns: ["*.json5"]
|
|
331
|
+
} }
|
|
332
|
+
},
|
|
333
|
+
"microsoft/node-jsonc-parser": {
|
|
334
|
+
owner: "microsoft",
|
|
335
|
+
repo: "node-jsonc-parser",
|
|
336
|
+
packages: { "jsonc-parser": {
|
|
337
|
+
primary: true,
|
|
338
|
+
filePatterns: ["*.jsonc"]
|
|
339
|
+
} }
|
|
340
|
+
},
|
|
341
|
+
"markdown-it/markdown-it": {
|
|
342
|
+
owner: "markdown-it",
|
|
343
|
+
repo: "markdown-it",
|
|
344
|
+
packages: { "markdown-it": {
|
|
345
|
+
primary: true,
|
|
346
|
+
filePatterns: ["*.md"]
|
|
347
|
+
} }
|
|
348
|
+
},
|
|
349
|
+
"markedjs/marked": {
|
|
350
|
+
owner: "markedjs",
|
|
351
|
+
repo: "marked",
|
|
352
|
+
packages: { marked: {
|
|
353
|
+
primary: true,
|
|
354
|
+
filePatterns: ["*.md"]
|
|
355
|
+
} }
|
|
356
|
+
},
|
|
357
|
+
"remarkjs/remark": {
|
|
358
|
+
owner: "remarkjs",
|
|
359
|
+
repo: "remark",
|
|
360
|
+
packages: { remark: {
|
|
361
|
+
primary: true,
|
|
362
|
+
filePatterns: ["*.md", "*.mdx"]
|
|
363
|
+
} }
|
|
364
|
+
},
|
|
365
|
+
"mdx-js/mdx": {
|
|
366
|
+
owner: "mdx-js",
|
|
367
|
+
repo: "mdx",
|
|
368
|
+
packages: { "@mdx-js/mdx": {
|
|
369
|
+
primary: true,
|
|
370
|
+
filePatterns: ["*.mdx"]
|
|
371
|
+
} }
|
|
372
|
+
},
|
|
373
|
+
"graphql/graphql-js": {
|
|
374
|
+
owner: "graphql",
|
|
375
|
+
repo: "graphql-js",
|
|
376
|
+
packages: {
|
|
377
|
+
"graphql": {
|
|
378
|
+
primary: true,
|
|
379
|
+
filePatterns: ["*.graphql", "*.gql"]
|
|
380
|
+
},
|
|
381
|
+
"graphql-tag": { filePatterns: ["*.graphql", "*.gql"] }
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
"dotansimha/graphql-code-generator": {
|
|
385
|
+
owner: "dotansimha",
|
|
386
|
+
repo: "graphql-code-generator",
|
|
387
|
+
packages: { "@graphql-codegen/cli": {
|
|
388
|
+
primary: true,
|
|
389
|
+
filePatterns: ["*.graphql", "*.gql"]
|
|
390
|
+
} }
|
|
391
|
+
},
|
|
392
|
+
"quasarframework/quasar": {
|
|
393
|
+
owner: "quasarframework",
|
|
394
|
+
repo: "quasar",
|
|
395
|
+
docsPath: "docs/src/pages",
|
|
396
|
+
docsRef: "dev",
|
|
397
|
+
homepage: "https://quasar.dev",
|
|
398
|
+
packages: { quasar: { primary: true } }
|
|
399
|
+
},
|
|
400
|
+
"motiondivision/motion-vue": {
|
|
401
|
+
owner: "motiondivision",
|
|
402
|
+
repo: "motion-vue",
|
|
403
|
+
homepage: "https://motion.dev",
|
|
404
|
+
crawlUrl: "https://motion.dev/docs/vue**",
|
|
405
|
+
packages: { "motion-v": { primary: true } }
|
|
406
|
+
},
|
|
407
|
+
"prisma/prisma": {
|
|
408
|
+
owner: "prisma",
|
|
409
|
+
repo: "prisma",
|
|
410
|
+
packages: {
|
|
411
|
+
"prisma": {
|
|
412
|
+
primary: true,
|
|
413
|
+
filePatterns: ["*.prisma"]
|
|
414
|
+
},
|
|
415
|
+
"@prisma/client": { filePatterns: ["*.prisma"] }
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
"nicolo-ribaudo/tc39-proposal-wasm-esm-integration": {
|
|
419
|
+
owner: "nicolo-ribaudo",
|
|
420
|
+
repo: "tc39-proposal-wasm-esm-integration",
|
|
421
|
+
packages: { "wasm-pack": {
|
|
422
|
+
primary: true,
|
|
423
|
+
filePatterns: ["*.wasm"]
|
|
424
|
+
} }
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
const PACKAGE_TO_REPO_MAP = {};
|
|
428
|
+
for (const [repoKey, entry] of Object.entries(REPO_REGISTRY)) for (const packageName of Object.keys(entry.packages)) PACKAGE_TO_REPO_MAP[packageName] = repoKey;
|
|
429
|
+
function getDocOverride(packageName) {
|
|
430
|
+
const repoKey = PACKAGE_TO_REPO_MAP[packageName];
|
|
431
|
+
if (!repoKey) return void 0;
|
|
432
|
+
const entry = REPO_REGISTRY[repoKey];
|
|
433
|
+
if (!entry?.docsRepo && !entry?.docsPath) return void 0;
|
|
434
|
+
return {
|
|
435
|
+
owner: entry.owner,
|
|
436
|
+
repo: entry.docsRepo || entry.repo,
|
|
437
|
+
path: entry.docsPath || "",
|
|
438
|
+
ref: entry.docsRef,
|
|
439
|
+
homepage: entry.homepage
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
function getBlogPreset(packageName) {
|
|
443
|
+
const repoKey = PACKAGE_TO_REPO_MAP[packageName];
|
|
444
|
+
if (!repoKey) return void 0;
|
|
445
|
+
const entry = REPO_REGISTRY[repoKey];
|
|
446
|
+
if (!entry?.blogReleases) return void 0;
|
|
447
|
+
return {
|
|
448
|
+
packageName,
|
|
449
|
+
releases: entry.blogReleases
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
function getFilePatterns(packageName) {
|
|
453
|
+
const repoKey = PACKAGE_TO_REPO_MAP[packageName];
|
|
454
|
+
if (!repoKey) return void 0;
|
|
455
|
+
return REPO_REGISTRY[repoKey]?.packages[packageName]?.filePatterns;
|
|
456
|
+
}
|
|
457
|
+
function getPackageRules(packageName) {
|
|
458
|
+
const repoKey = PACKAGE_TO_REPO_MAP[packageName];
|
|
459
|
+
if (!repoKey) return [];
|
|
460
|
+
return REPO_REGISTRY[repoKey]?.packages[packageName]?.rules ?? [];
|
|
461
|
+
}
|
|
462
|
+
function getPrereleaseChangelogRef(packageName) {
|
|
463
|
+
const repoKey = PACKAGE_TO_REPO_MAP[packageName];
|
|
464
|
+
if (!repoKey) return void 0;
|
|
465
|
+
return REPO_REGISTRY[repoKey]?.prereleaseChangelogRef;
|
|
466
|
+
}
|
|
467
|
+
function getCrawlUrl(packageName) {
|
|
468
|
+
const repoKey = PACKAGE_TO_REPO_MAP[packageName];
|
|
469
|
+
if (!repoKey) return void 0;
|
|
470
|
+
return REPO_REGISTRY[repoKey]?.crawlUrl;
|
|
471
|
+
}
|
|
22
472
|
const TOTAL_TARGET = 500;
|
|
23
473
|
const DEFAULT_OVERHEAD = 30;
|
|
24
474
|
function remainingLines(overheadLines) {
|
|
@@ -72,8 +522,9 @@ function checkAbsolutePaths(content) {
|
|
|
72
522
|
if (absPaths?.length) return [{ warning: `${absPaths.length} source links use absolute paths — must use relative ./.skilld/ paths` }];
|
|
73
523
|
return [];
|
|
74
524
|
}
|
|
525
|
+
const STATIC_REGEX_2$4 = /^## API Changes/im;
|
|
75
526
|
function apiChangesSection({ packageName, version, hasReleases, hasChangelog, hasDocs, hasIssues, hasDiscussions, pkgFiles, features, enabledSectionCount, releaseCount, overheadLines }) {
|
|
76
|
-
const [, major, minor] = version?.match(
|
|
527
|
+
const [, major, minor] = version?.match(SEMVER_MAJOR_MINOR_RE) ?? [];
|
|
77
528
|
const boost = releaseBoost(releaseCount, minor ? Number(minor) : void 0);
|
|
78
529
|
const cmd = resolveSkilldCommand();
|
|
79
530
|
const searchHints = [];
|
|
@@ -152,7 +603,7 @@ The "Older" column means ≤ v${Number(major) - 2}.x — these changes are NOT u
|
|
|
152
603
|
const labeledBullets = (content.match(/^- (?:\*\*)?(?:BREAKING|DEPRECATED|NEW):(?:\*\*)? /gm) || []).length;
|
|
153
604
|
const alsoChangedItems = (content.match(/\*\*Also changed:\*\*/g) || []).length;
|
|
154
605
|
if (detailedBullets > 2 && labeledBullets / (detailedBullets - alsoChangedItems || 1) < .8) warnings.push({ warning: `Only ${labeledBullets}/${detailedBullets} items have BREAKING/DEPRECATED/NEW labels` });
|
|
155
|
-
if (
|
|
606
|
+
if (!STATIC_REGEX_2$4.test(content)) warnings.push({ warning: "Missing required \"## API Changes\" heading" });
|
|
156
607
|
return warnings;
|
|
157
608
|
},
|
|
158
609
|
task: `**Find new, deprecated, and renamed APIs from version history.** Focus exclusively on APIs that changed between versions — LLMs trained on older data will use the wrong names, wrong signatures, or non-existent functions.
|
|
@@ -194,8 +645,9 @@ Each item: BREAKING/DEPRECATED/NEW label + API name + what changed + source link
|
|
|
194
645
|
].filter(Boolean)
|
|
195
646
|
};
|
|
196
647
|
}
|
|
648
|
+
const STATIC_REGEX_2$3 = /^## Best Practices/im;
|
|
197
649
|
function bestPracticesSection({ packageName, hasIssues, hasDiscussions, hasReleases, hasChangelog, hasDocs, pkgFiles, features, enabledSectionCount, releaseCount, version, overheadLines }) {
|
|
198
|
-
const [, , minor] = version?.match(
|
|
650
|
+
const [, , minor] = version?.match(SEMVER_MAJOR_MINOR_RE) ?? [];
|
|
199
651
|
const boost = 1 + (releaseBoost(releaseCount, minor ? Number(minor) : void 0) - 1) * .5;
|
|
200
652
|
const cmd = resolveSkilldCommand();
|
|
201
653
|
const searchHints = [];
|
|
@@ -245,7 +697,7 @@ function bestPracticesSection({ packageName, hasIssues, hasDiscussions, hasRelea
|
|
|
245
697
|
const bullets = (content.match(/^- /gm) || []).length;
|
|
246
698
|
const codeBlocks = (content.match(/^```/gm) || []).length / 2;
|
|
247
699
|
if (bullets > 2 && codeBlocks / bullets > .5) warnings.push({ warning: `${Math.round(codeBlocks)}/${bullets} items have code blocks — prefer concise descriptions with source links` });
|
|
248
|
-
if (
|
|
700
|
+
if (!STATIC_REGEX_2$3.test(content)) warnings.push({ warning: "Missing required \"## Best Practices\" heading" });
|
|
249
701
|
return warnings;
|
|
250
702
|
},
|
|
251
703
|
task: `**Extract non-obvious best practices from the references.** Focus on recommended patterns the LLM wouldn't already know: idiomatic usage, preferred configurations, performance tips, patterns that differ from what a developer would assume. Surface new patterns from recent minor releases that may post-date training data.
|
|
@@ -329,6 +781,10 @@ const SECTION_MERGE_ORDER = SECTIONS.map((s) => s.id);
|
|
|
329
781
|
function getSectionModule(id) {
|
|
330
782
|
return SECTIONS.find((s) => s.id === id);
|
|
331
783
|
}
|
|
784
|
+
const STATIC_REGEX_1$1 = /v\d+\.(\d+)\.(\d+)\.md$/;
|
|
785
|
+
const STATIC_REGEX_2$2 = /[^`]*\/\.skilld\//;
|
|
786
|
+
const STATIC_REGEX_3 = /\n## Output\n[\s\S]*$/;
|
|
787
|
+
const STATIC_REGEX_4 = /\n## Search\n[\s\S]*?(?=\n\n(?:\||## |<|\*\*))/;
|
|
332
788
|
function wrapSection(section, content) {
|
|
333
789
|
return `<!-- skilld:${section} -->\n${content}\n<!-- /skilld:${section} -->`;
|
|
334
790
|
}
|
|
@@ -420,7 +876,7 @@ function buildSectionPrompt(opts) {
|
|
|
420
876
|
const hasDocs = !!opts.docFiles?.some((f) => f.includes("/docs/"));
|
|
421
877
|
const releaseCount = opts.docFiles?.filter((f) => {
|
|
422
878
|
if (!f.includes("/releases/")) return false;
|
|
423
|
-
const m = f.match(
|
|
879
|
+
const m = f.match(STATIC_REGEX_1$1);
|
|
424
880
|
return m && (m[1] === "0" || m[2] === "0");
|
|
425
881
|
}).length;
|
|
426
882
|
const sectionDef = getSectionDef(section, {
|
|
@@ -489,12 +945,12 @@ function buildAllSectionPrompts(opts) {
|
|
|
489
945
|
}
|
|
490
946
|
function portabilizePrompt(prompt, section) {
|
|
491
947
|
let out = prompt;
|
|
492
|
-
out = out.replace(/`[^`]*\/\.skilld\//g, (m) => m.replace(
|
|
948
|
+
out = out.replace(/`[^`]*\/\.skilld\//g, (m) => m.replace(STATIC_REGEX_2$2, "./references/"));
|
|
493
949
|
out = out.replace(/\(\.\/\.skilld\//g, "(./references/");
|
|
494
950
|
out = out.replace(/`\.\/\.skilld\//g, "`./references/");
|
|
495
951
|
out = out.replace(/\.skilld\//g, "./references/");
|
|
496
|
-
out = out.replace(
|
|
497
|
-
out = out.replace(
|
|
952
|
+
out = out.replace(STATIC_REGEX_3, "");
|
|
953
|
+
out = out.replace(STATIC_REGEX_4, "");
|
|
498
954
|
out = out.replace(/^- .*`skilld search`.*$/gm, "");
|
|
499
955
|
out = out.replace(/^- .*`skilld validate`.*$/gm, "");
|
|
500
956
|
out = out.replace(/,? and `skilld search`/g, "");
|
|
@@ -513,6 +969,8 @@ function portabilizePrompt(prompt, section) {
|
|
|
513
969
|
out = out.replace(/\n{3,}/g, "\n\n");
|
|
514
970
|
return out;
|
|
515
971
|
}
|
|
972
|
+
const STATIC_REGEX_1 = /https?:\/\/github\.com\//;
|
|
973
|
+
const STATIC_REGEX_2$1 = /^#+\s*$/;
|
|
516
974
|
function todayIsoDate() {
|
|
517
975
|
return (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
518
976
|
}
|
|
@@ -530,7 +988,7 @@ function formatSource(source) {
|
|
|
530
988
|
if (!source) return "";
|
|
531
989
|
if (source === "shipped") return "shipped";
|
|
532
990
|
if (source.includes("llms.txt")) return "llms.txt";
|
|
533
|
-
if (source.includes("github.com")) return source.replace(
|
|
991
|
+
if (source.includes("github.com")) return source.replace(STATIC_REGEX_1, "");
|
|
534
992
|
return source;
|
|
535
993
|
}
|
|
536
994
|
function formatDuration(ms) {
|
|
@@ -550,7 +1008,7 @@ function timedSpinner() {
|
|
|
550
1008
|
},
|
|
551
1009
|
stop(msg) {
|
|
552
1010
|
const elapsed = startedAt ? formatDuration(Date.now() - startedAt) : "";
|
|
553
|
-
spin.stop(elapsed ? `${msg}
|
|
1011
|
+
spin.stop(elapsed ? `${msg} ${styleText("gray", `[${elapsed}]`)}` : msg);
|
|
554
1012
|
}
|
|
555
1013
|
};
|
|
556
1014
|
}
|
|
@@ -558,10 +1016,10 @@ function highlightTerms(content, terms) {
|
|
|
558
1016
|
if (terms.length === 0) return content;
|
|
559
1017
|
const sorted = terms.toSorted((a, b) => b.length - a.length);
|
|
560
1018
|
const pattern = new RegExp(`(${sorted.map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})`, "gi");
|
|
561
|
-
return content.replace(pattern, "
|
|
1019
|
+
return content.replace(pattern, (m) => styleText("yellow", m));
|
|
562
1020
|
}
|
|
563
1021
|
function scoreLabel(pct) {
|
|
564
|
-
return
|
|
1022
|
+
return styleText(pct >= 70 ? "green" : pct >= 40 ? "yellow" : "gray", `${pct}%`);
|
|
565
1023
|
}
|
|
566
1024
|
function normalizeScores(results) {
|
|
567
1025
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -572,15 +1030,15 @@ function normalizeScores(results) {
|
|
|
572
1030
|
function formatSnippet(r, versions, pct) {
|
|
573
1031
|
const refPath = `.claude/skills/${r.package}/.skilld/${r.source}`;
|
|
574
1032
|
const lineRange = r.lineStart === r.lineEnd ? `L${r.lineStart}` : `L${r.lineStart}-${r.lineEnd}`;
|
|
575
|
-
const score = pct != null ? scoreLabel(pct) :
|
|
1033
|
+
const score = pct != null ? scoreLabel(pct) : styleText("gray", r.score.toFixed(2));
|
|
576
1034
|
const version = versions?.get(r.package);
|
|
577
1035
|
const pkgLabel = version ? `${r.package}@${version}` : r.package;
|
|
578
1036
|
const scopeStr = r.scope?.length ? `${r.scope.map((e) => e.name).join(".")} → ` : "";
|
|
579
1037
|
const entityStr = r.entities?.map((e) => e.signature || `${e.type} ${e.name}`).join(", ");
|
|
580
1038
|
const highlighted = highlightTerms(r.content, r.highlights);
|
|
581
1039
|
return [
|
|
582
|
-
`${pkgLabel} ${score}${entityStr ? `
|
|
583
|
-
|
|
1040
|
+
`${pkgLabel} ${score}${entityStr ? ` ${styleText("cyan", `${scopeStr}${entityStr}`)}` : ""}`,
|
|
1041
|
+
styleText("gray", `${refPath}:${lineRange}`),
|
|
584
1042
|
` ${highlighted.replace(/\n/g, "\n ")}`
|
|
585
1043
|
].join("\n");
|
|
586
1044
|
}
|
|
@@ -590,7 +1048,7 @@ function formatCompactSnippet(r, cols) {
|
|
|
590
1048
|
const title = entityStr ? `${scopeStr}${entityStr}` : r.source.split("/").pop() || r.source;
|
|
591
1049
|
const path = `${`.claude/skills/${r.package}/.skilld/${r.source}`}:${r.lineStart === r.lineEnd ? `L${r.lineStart}` : `L${r.lineStart}-${r.lineEnd}`}`;
|
|
592
1050
|
const maxPreview = cols - 6;
|
|
593
|
-
const firstLine = r.content.split("\n").find((l) => l.trim() && l.trim() !== "---" &&
|
|
1051
|
+
const firstLine = r.content.split("\n").find((l) => l.trim() && l.trim() !== "---" && !STATIC_REGEX_2$1.test(l.trim())) || "";
|
|
594
1052
|
return {
|
|
595
1053
|
title,
|
|
596
1054
|
path,
|
|
@@ -603,55 +1061,6 @@ function sanitizeName(name) {
|
|
|
603
1061
|
function computeSkillDirName(packageName) {
|
|
604
1062
|
return `${sanitizeName(packageName)}-skilld`;
|
|
605
1063
|
}
|
|
606
|
-
function installSkillForAgents(skillName, skillContent, options = {}) {
|
|
607
|
-
const isGlobal = options.global ?? false;
|
|
608
|
-
const cwd = options.cwd || process.cwd();
|
|
609
|
-
const sanitized = sanitizeName(skillName);
|
|
610
|
-
const explicit = !!options.agents;
|
|
611
|
-
const targetAgents = options.agents || detectInstalledAgents();
|
|
612
|
-
const installed = [];
|
|
613
|
-
const skipped = [];
|
|
614
|
-
const paths = [];
|
|
615
|
-
const writtenDirs = /* @__PURE__ */ new Set();
|
|
616
|
-
for (const agentType of targetAgents) {
|
|
617
|
-
const agent = targets[agentType];
|
|
618
|
-
if (isGlobal && !agent.globalSkillsDir) {
|
|
619
|
-
skipped.push({
|
|
620
|
-
agent: agentType,
|
|
621
|
-
reason: "no global support"
|
|
622
|
-
});
|
|
623
|
-
continue;
|
|
624
|
-
}
|
|
625
|
-
const baseDir = isGlobal ? agent.globalSkillsDir : join(cwd, agent.skillsDir);
|
|
626
|
-
if (!explicit && !existsSync(baseDir)) {
|
|
627
|
-
skipped.push({
|
|
628
|
-
agent: agentType,
|
|
629
|
-
reason: "skills dir not found"
|
|
630
|
-
});
|
|
631
|
-
continue;
|
|
632
|
-
}
|
|
633
|
-
if (isGlobal && (writtenDirs.has(baseDir) || agent.additionalSkillsDirs.some((d) => writtenDirs.has(d)))) {
|
|
634
|
-
skipped.push({
|
|
635
|
-
agent: agentType,
|
|
636
|
-
reason: "already covered by another agent dir"
|
|
637
|
-
});
|
|
638
|
-
continue;
|
|
639
|
-
}
|
|
640
|
-
const skillDir = join(baseDir, sanitized);
|
|
641
|
-
const skilldDir = skillInternalDir(skillDir);
|
|
642
|
-
mkdirSync(skilldDir, { recursive: true });
|
|
643
|
-
writeFileSync(join(skilldDir, "_SKILL.md"), sanitizeMarkdown(repairMarkdown(skillContent)));
|
|
644
|
-
if (options.files) for (const [filename, content] of Object.entries(options.files)) writeFileSync(join(skillDir, filename), filename.endsWith(".md") ? sanitizeMarkdown(repairMarkdown(content)) : content);
|
|
645
|
-
installed.push(agentType);
|
|
646
|
-
paths.push(skillDir);
|
|
647
|
-
writtenDirs.add(baseDir);
|
|
648
|
-
}
|
|
649
|
-
return {
|
|
650
|
-
installed,
|
|
651
|
-
skipped,
|
|
652
|
-
paths
|
|
653
|
-
};
|
|
654
|
-
}
|
|
655
1064
|
function linkSkillToAgents(skillName, sharedDir, cwd, agentType) {
|
|
656
1065
|
const targetAgents = agentType ? [[agentType, targets[agentType]]] : Object.entries(targets);
|
|
657
1066
|
const linkedDirs = /* @__PURE__ */ new Set();
|
|
@@ -691,6 +1100,7 @@ function unlinkSkillFromAgents(skillName, cwd, agentType) {
|
|
|
691
1100
|
} catch {}
|
|
692
1101
|
}
|
|
693
1102
|
}
|
|
1103
|
+
const STATIC_REGEX_2 = /\.?\s*$/;
|
|
694
1104
|
function writeSkillMd(skillDir, content) {
|
|
695
1105
|
writeFileSync(join(skillDir, "SKILL.md"), content);
|
|
696
1106
|
}
|
|
@@ -764,13 +1174,13 @@ function generatePackageHeader({ name, version, distTags, repoUrl, hasIssues, ha
|
|
|
764
1174
|
}
|
|
765
1175
|
function expandPackageName(name) {
|
|
766
1176
|
const variants = /* @__PURE__ */ new Set();
|
|
767
|
-
const unscoped = name.replace(
|
|
1177
|
+
const unscoped = name.replace(NPM_SCOPE_PREFIX_RE, "");
|
|
768
1178
|
if (unscoped !== name) {
|
|
769
1179
|
variants.add(unscoped);
|
|
770
1180
|
variants.add(unscoped.replace(/\//g, " "));
|
|
771
1181
|
}
|
|
772
1182
|
if (name.includes("-")) {
|
|
773
|
-
const spaced = name.replace(
|
|
1183
|
+
const spaced = name.replace(NPM_SCOPE_PREFIX_RE, "").replace(/\//g, " ").replace(/-/g, " ");
|
|
774
1184
|
variants.add(spaced);
|
|
775
1185
|
}
|
|
776
1186
|
variants.delete(name);
|
|
@@ -787,7 +1197,7 @@ function expandRepoName(repoUrl) {
|
|
|
787
1197
|
function generateFrontmatter({ name, version, description: pkgDescription, globs, body, generatedBy, dirName, packages, repoUrl }) {
|
|
788
1198
|
const patterns = globs ?? getFilePatterns(name);
|
|
789
1199
|
const globHint = patterns?.length ? ` or working with ${patterns.join(", ")} files` : "";
|
|
790
|
-
const rawDesc = pkgDescription?.replace(/[<>]/g, "").replace(
|
|
1200
|
+
const rawDesc = pkgDescription?.replace(/[<>]/g, "").replace(STATIC_REGEX_2, "");
|
|
791
1201
|
const cleanDesc = rawDesc && rawDesc.length > 200 ? `${rawDesc.slice(0, 197)}...` : rawDesc;
|
|
792
1202
|
const editHint = globHint ? `editing${globHint} or code importing` : "writing code importing";
|
|
793
1203
|
let desc;
|
|
@@ -835,6 +1245,6 @@ function generateFooter(relatedSkills) {
|
|
|
835
1245
|
if (relatedSkills.length === 0) return "";
|
|
836
1246
|
return `\nRelated: ${relatedSkills.join(", ")}\n`;
|
|
837
1247
|
}
|
|
838
|
-
export {
|
|
1248
|
+
export { resolveSkilldCommand as A, SECTION_OUTPUT_FILES as C, getCrawlUrl as D, getBlogPreset as E, getDocOverride as O, SECTION_MERGE_ORDER as S, maxLines as T, buildAllSectionPrompts as _, sanitizeName as a, portabilizePrompt as b, formatDuration as c, highlightTerms as d, normalizeScores as f, todayIsoDate as g, timedSpinner as h, linkSkillToAgents as i, getPrereleaseChangelogRef as k, formatSnippet as l, timeAgo as m, writeSkillMd as n, unlinkSkillFromAgents as o, scoreLabel as p, computeSkillDirName as r, formatCompactSnippet as s, writeGeneratedSkillMd as t, formatSource as u, extractMarkedSections as v, maxItems as w, wrapSection as x, getSectionValidator as y };
|
|
839
1249
|
|
|
840
1250
|
//# sourceMappingURL=prompts.mjs.map
|