skillhub 0.2.6 → 0.2.8
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/index.js +8 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4601,7 +4601,7 @@ async function search(query, options2) {
|
|
|
4601
4601
|
try {
|
|
4602
4602
|
const limit = parseInt(options2.limit || "10");
|
|
4603
4603
|
const page = parseInt(options2.page || "1");
|
|
4604
|
-
const sort = options2.sort || "
|
|
4604
|
+
const sort = options2.sort || "recommended";
|
|
4605
4605
|
const result = await searchSkills(query, {
|
|
4606
4606
|
platform: options2.platform,
|
|
4607
4607
|
limit,
|
|
@@ -4614,7 +4614,7 @@ async function search(query, options2) {
|
|
|
4614
4614
|
console.log(chalk2.dim("Try a different search term or check the spelling."));
|
|
4615
4615
|
return;
|
|
4616
4616
|
}
|
|
4617
|
-
const sortLabel = { downloads: "downloads", stars: "GitHub stars", rating: "rating", recent: "recently updated" }[sort] || sort;
|
|
4617
|
+
const sortLabel = { recommended: "recommended", downloads: "downloads", stars: "GitHub stars", rating: "rating", recent: "recently updated", aiScore: "AI score" }[sort] || sort;
|
|
4618
4618
|
console.log(chalk2.bold(`Found ${result.pagination.total} skills (sorted by ${sortLabel}):
|
|
4619
4619
|
`));
|
|
4620
4620
|
console.log(
|
|
@@ -4629,8 +4629,10 @@ async function search(query, options2) {
|
|
|
4629
4629
|
console.log(
|
|
4630
4630
|
`${num} ${verified} ${chalk2.cyan(skill.id.padEnd(38))} ${security}`
|
|
4631
4631
|
);
|
|
4632
|
+
const hasAiScore = skill.aiScore && skill.reviewStatus && skill.reviewStatus !== "unreviewed" && skill.reviewStatus !== "auto-scored";
|
|
4633
|
+
const aiPrefix = hasAiScore ? `${chalk2.magenta("AI")} ${(skill.aiScore >= 75 ? chalk2.green : skill.aiScore >= 50 ? chalk2.yellow : chalk2.dim)(String(skill.aiScore))} ` : "";
|
|
4632
4634
|
console.log(
|
|
4633
|
-
` \u2B07 ${formatNumber(skill.downloadCount).padStart(6)} \u2B50 ${formatNumber(skill.githubStars).padStart(6)} ${chalk2.dim(skill.description.slice(0, 55))}${skill.description.length > 55 ? "..." : ""}`
|
|
4635
|
+
` ${aiPrefix}\u2B07 ${formatNumber(skill.downloadCount).padStart(6)} \u2B50 ${formatNumber(skill.githubStars).padStart(6)} ${chalk2.dim(skill.description.slice(0, hasAiScore ? 45 : 55))}${skill.description.length > (hasAiScore ? 45 : 55) ? "..." : ""}`
|
|
4634
4636
|
);
|
|
4635
4637
|
const showRating = (skill.ratingCount ?? 0) >= 3;
|
|
4636
4638
|
if (showRating && skill.rating) {
|
|
@@ -4638,12 +4640,6 @@ async function search(query, options2) {
|
|
|
4638
4640
|
` ${chalk2.yellow("\u2605")} ${skill.rating.toFixed(1)} ${chalk2.dim(`(${skill.ratingCount} ratings)`)}`
|
|
4639
4641
|
);
|
|
4640
4642
|
}
|
|
4641
|
-
if (skill.aiScore && skill.reviewStatus && skill.reviewStatus !== "unreviewed" && skill.reviewStatus !== "auto-scored") {
|
|
4642
|
-
const scoreColor = skill.aiScore >= 75 ? chalk2.green : skill.aiScore >= 50 ? chalk2.yellow : chalk2.dim;
|
|
4643
|
-
console.log(
|
|
4644
|
-
` ${chalk2.magenta("AI")} ${scoreColor(String(skill.aiScore))} ${chalk2.dim(`(${skill.reviewStatus})`)}`
|
|
4645
|
-
);
|
|
4646
|
-
}
|
|
4647
4643
|
console.log(chalk2.dim("\u2500".repeat(80)));
|
|
4648
4644
|
}
|
|
4649
4645
|
console.log();
|
|
@@ -4654,8 +4650,8 @@ async function search(query, options2) {
|
|
|
4654
4650
|
chalk2.dim(`Page ${page} of ${totalPages}. Use ${chalk2.white(`--page ${page + 1}`)} for next page.`)
|
|
4655
4651
|
);
|
|
4656
4652
|
}
|
|
4657
|
-
if (sort === "
|
|
4658
|
-
console.log(chalk2.dim(`Sort options: ${chalk2.white("--sort stars|rating|recent")}`));
|
|
4653
|
+
if (sort === "recommended") {
|
|
4654
|
+
console.log(chalk2.dim(`Sort options: ${chalk2.white("--sort aiScore|downloads|stars|rating|recent")}`));
|
|
4659
4655
|
}
|
|
4660
4656
|
} catch (error) {
|
|
4661
4657
|
spinner.fail("Search failed");
|
|
@@ -4889,7 +4885,7 @@ program.command("install <skill-id>").description("Install a skill from the regi
|
|
|
4889
4885
|
// Commander converts --no-api to api: false
|
|
4890
4886
|
});
|
|
4891
4887
|
});
|
|
4892
|
-
program.command("search <query>").description("Search for skills in the registry").option("-p, --platform <platform>", "Filter by platform").option("-s, --sort <sort>", "Sort by: downloads, stars, rating, recent", "
|
|
4888
|
+
program.command("search <query>").description("Search for skills in the registry").option("-p, --platform <platform>", "Filter by platform").option("-s, --sort <sort>", "Sort by: recommended, aiScore, downloads, stars, rating, recent", "recommended").option("-l, --limit <number>", "Number of results", "10").option("--page <number>", "Page number", "1").action(async (query, options2) => {
|
|
4893
4889
|
await search(query, options2);
|
|
4894
4890
|
});
|
|
4895
4891
|
program.command("list").description("List installed skills").option("-p, --platform <platform>", "Filter by platform").option("--project", "List skills in the current project").option("--all", "List both global and project skills").action(async (options2) => {
|
package/package.json
CHANGED