@hasna/skills 0.1.36 → 0.1.37
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/bin/index.js +21 -9
- package/bin/mcp.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -1910,7 +1910,7 @@ var package_default;
|
|
|
1910
1910
|
var init_package = __esm(() => {
|
|
1911
1911
|
package_default = {
|
|
1912
1912
|
name: "@hasna/skills",
|
|
1913
|
-
version: "0.1.
|
|
1913
|
+
version: "0.1.37",
|
|
1914
1914
|
description: "Skills library for AI coding agents",
|
|
1915
1915
|
type: "module",
|
|
1916
1916
|
bin: {
|
|
@@ -21315,6 +21315,18 @@ function handleBrowseError(error48) {
|
|
|
21315
21315
|
console.error(chalk3.red(error48.message));
|
|
21316
21316
|
process.exitCode = 1;
|
|
21317
21317
|
}
|
|
21318
|
+
async function writeJson(value, space) {
|
|
21319
|
+
const text = `${JSON.stringify(value, null, space)}
|
|
21320
|
+
`;
|
|
21321
|
+
await new Promise((resolve, reject) => {
|
|
21322
|
+
process.stdout.write(text, (error48) => {
|
|
21323
|
+
if (error48)
|
|
21324
|
+
reject(error48);
|
|
21325
|
+
else
|
|
21326
|
+
resolve();
|
|
21327
|
+
});
|
|
21328
|
+
});
|
|
21329
|
+
}
|
|
21318
21330
|
async function getBrowseRegistry(options) {
|
|
21319
21331
|
if (options.remote)
|
|
21320
21332
|
return loadRemoteRegistry();
|
|
@@ -21339,11 +21351,11 @@ async function handleList(options) {
|
|
|
21339
21351
|
if (options.json) {
|
|
21340
21352
|
const meta4 = getInstallMeta();
|
|
21341
21353
|
const registry4 = loadRegistry();
|
|
21342
|
-
|
|
21354
|
+
await writeJson(installed.map((name) => {
|
|
21343
21355
|
const m = meta4.skills[name];
|
|
21344
21356
|
const s = registry4.find((r) => r.name === name);
|
|
21345
21357
|
return { name, version: m?.version ?? null, installedAt: m?.installedAt ?? null, source: s?.source ?? "official" };
|
|
21346
|
-
}))
|
|
21358
|
+
}));
|
|
21347
21359
|
return;
|
|
21348
21360
|
}
|
|
21349
21361
|
if (installed.length === 0) {
|
|
@@ -21382,7 +21394,7 @@ Available: ${categories.join(", ")}`);
|
|
|
21382
21394
|
skills = skills.filter((s) => s.tags.some((tag) => tagFilter.includes(tag.toLowerCase())));
|
|
21383
21395
|
const output = enrichDiscovery(skills);
|
|
21384
21396
|
if (options.json) {
|
|
21385
|
-
|
|
21397
|
+
await writeJson(output, 2);
|
|
21386
21398
|
return;
|
|
21387
21399
|
}
|
|
21388
21400
|
if (brief) {
|
|
@@ -21401,7 +21413,7 @@ ${category} (${skills.length}):
|
|
|
21401
21413
|
const skills = registry2.filter((s) => s.tags.some((tag) => tagFilter.includes(tag.toLowerCase())));
|
|
21402
21414
|
const output = enrichDiscovery(skills);
|
|
21403
21415
|
if (options.json) {
|
|
21404
|
-
|
|
21416
|
+
await writeJson(output, 2);
|
|
21405
21417
|
return;
|
|
21406
21418
|
}
|
|
21407
21419
|
if (brief) {
|
|
@@ -21418,7 +21430,7 @@ Skills matching tags [${tagFilter.join(", ")}] (${skills.length}):
|
|
|
21418
21430
|
}
|
|
21419
21431
|
const allSkills = enrichDiscovery(registry2);
|
|
21420
21432
|
if (options.json) {
|
|
21421
|
-
|
|
21433
|
+
await writeJson(allSkills, 2);
|
|
21422
21434
|
return;
|
|
21423
21435
|
}
|
|
21424
21436
|
if (fmt === "compact") {
|
|
@@ -21480,7 +21492,7 @@ Available: ${categories.join(", ")}`);
|
|
|
21480
21492
|
const fmt = !options.json ? options.format : undefined;
|
|
21481
21493
|
const output = enrichDiscovery(results);
|
|
21482
21494
|
if (options.json) {
|
|
21483
|
-
|
|
21495
|
+
await writeJson(output, 2);
|
|
21484
21496
|
return;
|
|
21485
21497
|
}
|
|
21486
21498
|
if (results.length === 0) {
|
|
@@ -21524,7 +21536,7 @@ async function handleCategories(options) {
|
|
|
21524
21536
|
count: registry2.filter((skill) => skill.category === category).length
|
|
21525
21537
|
}));
|
|
21526
21538
|
if (options.json) {
|
|
21527
|
-
|
|
21539
|
+
await writeJson(cats, 2);
|
|
21528
21540
|
return;
|
|
21529
21541
|
}
|
|
21530
21542
|
console.log(chalk3.bold(`
|
|
@@ -21541,7 +21553,7 @@ async function handleTags(options) {
|
|
|
21541
21553
|
}
|
|
21542
21554
|
const sorted = Array.from(tagCounts.entries()).sort(([a], [b]) => a.localeCompare(b)).map(([name, count]) => ({ name, count }));
|
|
21543
21555
|
if (options.json) {
|
|
21544
|
-
|
|
21556
|
+
await writeJson(sorted, 2);
|
|
21545
21557
|
return;
|
|
21546
21558
|
}
|
|
21547
21559
|
console.log(chalk3.bold(`
|
package/bin/mcp.js
CHANGED
|
@@ -21793,7 +21793,7 @@ class StdioServerTransport {
|
|
|
21793
21793
|
// package.json
|
|
21794
21794
|
var package_default = {
|
|
21795
21795
|
name: "@hasna/skills",
|
|
21796
|
-
version: "0.1.
|
|
21796
|
+
version: "0.1.37",
|
|
21797
21797
|
description: "Skills library for AI coding agents",
|
|
21798
21798
|
type: "module",
|
|
21799
21799
|
bin: {
|
package/dist/index.js
CHANGED
|
@@ -18031,7 +18031,7 @@ import { dirname as dirname3, relative as relative2 } from "path";
|
|
|
18031
18031
|
// package.json
|
|
18032
18032
|
var package_default = {
|
|
18033
18033
|
name: "@hasna/skills",
|
|
18034
|
-
version: "0.1.
|
|
18034
|
+
version: "0.1.37",
|
|
18035
18035
|
description: "Skills library for AI coding agents",
|
|
18036
18036
|
type: "module",
|
|
18037
18037
|
bin: {
|