skillhub 0.1.13 → 0.1.15

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.
Files changed (3) hide show
  1. package/dist/index.js +50 -11
  2. package/package.json +61 -59
  3. package/LICENSE +0 -21
package/dist/index.js CHANGED
@@ -25,7 +25,7 @@ import { parseSkillMd } from "skillhub-core";
25
25
  import https from "https";
26
26
  import http from "http";
27
27
  var API_BASE_URL = process.env.SKILLHUB_API_URL || "https://skills.palebluedot.live/api";
28
- var API_TIMEOUT = parseInt(process.env.SKILLHUB_API_TIMEOUT || "10000");
28
+ var API_TIMEOUT = parseInt(process.env.SKILLHUB_API_TIMEOUT || "20000");
29
29
  var API_FILES_TIMEOUT = parseInt(process.env.SKILLHUB_API_FILES_TIMEOUT || "45000");
30
30
  function httpsRequest(url, options = {}) {
31
31
  return new Promise((resolve, reject) => {
@@ -101,7 +101,8 @@ async function searchSkills(query, options = {}) {
101
101
  const params = new URLSearchParams({
102
102
  q: query,
103
103
  limit: String(options.limit || 10),
104
- page: String(options.page || 1)
104
+ page: String(options.page || 1),
105
+ sort: options.sort || "downloads"
105
106
  });
106
107
  if (options.platform) {
107
108
  params.set("platform", options.platform);
@@ -481,6 +482,12 @@ A different skill is already installed with the name "${actualName}":`));
481
482
  console.log(
482
483
  ` This skill will be automatically activated when your ${getPlatformName(options.platform)} agent recognizes it's relevant.`
483
484
  );
485
+ const setupInstructions = getPlatformSetupInstructions(options.platform, installPath);
486
+ if (setupInstructions) {
487
+ console.log();
488
+ console.log(chalk.cyan("Next Steps:"));
489
+ console.log(setupInstructions);
490
+ }
484
491
  if (content.scripts.length > 0) {
485
492
  console.log();
486
493
  console.log(chalk.dim(`Scripts: ${content.scripts.map((s) => s.name).join(", ")}`));
@@ -501,6 +508,26 @@ function getPlatformName(platform) {
501
508
  };
502
509
  return names[platform];
503
510
  }
511
+ function getPlatformSetupInstructions(platform, installPath) {
512
+ switch (platform) {
513
+ case "claude":
514
+ return chalk.dim(" Skills in ~/.claude/skills/ are automatically discovered by Claude Code.");
515
+ case "codex":
516
+ return chalk.dim(` Reference this skill in your AGENTS.md:
517
+ @import ${installPath}/SKILL.md`);
518
+ case "copilot":
519
+ return chalk.dim(` Reference this skill in .github/copilot-instructions.md:
520
+ @import ${installPath}/SKILL.md`);
521
+ case "cursor":
522
+ return chalk.dim(` Reference this skill in your .cursorrules file:
523
+ @import ${installPath}/SKILL.md`);
524
+ case "windsurf":
525
+ return chalk.dim(` Reference this skill in your Windsurf configuration:
526
+ Path: ${installPath}/SKILL.md`);
527
+ default:
528
+ return null;
529
+ }
530
+ }
504
531
  function convertCachedFilesToSkillContent(response) {
505
532
  let skillMd = "";
506
533
  const scripts = [];
@@ -540,9 +567,13 @@ async function search(query, options) {
540
567
  const spinner = ora2("Searching skills...").start();
541
568
  try {
542
569
  const limit = parseInt(options.limit || "10");
570
+ const page = parseInt(options.page || "1");
571
+ const sort = options.sort || "downloads";
543
572
  const result = await searchSkills(query, {
544
573
  platform: options.platform,
545
- limit
574
+ limit,
575
+ page,
576
+ sort
546
577
  });
547
578
  spinner.stop();
548
579
  if (result.skills.length === 0) {
@@ -550,35 +581,43 @@ async function search(query, options) {
550
581
  console.log(chalk2.dim("Try a different search term or check the spelling."));
551
582
  return;
552
583
  }
553
- console.log(chalk2.bold(`Found ${result.pagination.total} skills:
584
+ const sortLabel = { downloads: "downloads", stars: "GitHub stars", rating: "rating", recent: "recently updated" }[sort] || sort;
585
+ console.log(chalk2.bold(`Found ${result.pagination.total} skills (sorted by ${sortLabel}):
554
586
  `));
555
587
  console.log(
556
588
  chalk2.dim("\u2500".repeat(80))
557
589
  );
558
- for (const skill of result.skills) {
590
+ const startIndex = (page - 1) * limit;
591
+ for (let i = 0; i < result.skills.length; i++) {
592
+ const skill = result.skills[i];
593
+ const num = chalk2.dim(`[${startIndex + i + 1}]`);
559
594
  const verified = skill.isVerified ? chalk2.green("\u2713") : " ";
560
595
  const security = skill.securityStatus ? getSecurityStatusBadge(skill.securityStatus) : getSecurityBadge(skill.securityScore);
561
596
  console.log(
562
- `${verified} ${chalk2.cyan(skill.id.padEnd(40))} ${security} \u2B50 ${formatNumber(skill.githubStars).padStart(6)} \u2B07 ${formatNumber(skill.downloadCount).padStart(6)}`
597
+ `${num} ${verified} ${chalk2.cyan(skill.id.padEnd(38))} ${security}`
563
598
  );
564
599
  console.log(
565
- ` ${chalk2.dim(skill.description.slice(0, 70))}${skill.description.length > 70 ? "..." : ""}`
600
+ ` \u2B07 ${formatNumber(skill.downloadCount).padStart(6)} \u2B50 ${formatNumber(skill.githubStars).padStart(6)} ${chalk2.dim(skill.description.slice(0, 55))}${skill.description.length > 55 ? "..." : ""}`
566
601
  );
567
602
  const showRating = (skill.ratingCount ?? 0) >= 3;
568
603
  if (showRating && skill.rating) {
569
604
  console.log(
570
- ` ${chalk2.yellow("\u2605")} ${skill.rating.toFixed(1)} ${chalk2.dim(`(${skill.ratingCount} ratings)`)}`
605
+ ` ${chalk2.yellow("\u2605")} ${skill.rating.toFixed(1)} ${chalk2.dim(`(${skill.ratingCount} ratings)`)}`
571
606
  );
572
607
  }
573
608
  console.log(chalk2.dim("\u2500".repeat(80)));
574
609
  }
575
610
  console.log();
576
611
  console.log(chalk2.dim(`Install with: ${chalk2.white("npx skillhub install <skill-id>")}`));
577
- if (result.pagination.total > result.skills.length) {
612
+ const totalPages = result.pagination.totalPages;
613
+ if (totalPages > 1) {
578
614
  console.log(
579
- chalk2.dim(`Showing ${result.skills.length} of ${result.pagination.total}. Use --limit to see more.`)
615
+ chalk2.dim(`Page ${page} of ${totalPages}. Use ${chalk2.white(`--page ${page + 1}`)} for next page.`)
580
616
  );
581
617
  }
618
+ if (sort === "downloads") {
619
+ console.log(chalk2.dim(`Sort options: ${chalk2.white("--sort stars|rating|recent")}`));
620
+ }
582
621
  } catch (error) {
583
622
  spinner.fail("Search failed");
584
623
  const err = error;
@@ -799,7 +838,7 @@ program.command("install <skill-id>").description("Install a skill from the regi
799
838
  // Commander converts --no-api to api: false
800
839
  });
801
840
  });
802
- program.command("search <query>").description("Search for skills in the registry").option("-p, --platform <platform>", "Filter by platform").option("-l, --limit <number>", "Number of results", "10").action(async (query, options) => {
841
+ 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", "downloads").option("-l, --limit <number>", "Number of results", "10").option("--page <number>", "Page number", "1").action(async (query, options) => {
803
842
  await search(query, options);
804
843
  });
805
844
  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 (options) => {
package/package.json CHANGED
@@ -1,59 +1,61 @@
1
- {
2
- "name": "skillhub",
3
- "version": "0.1.13",
4
- "description": "CLI tool for managing AI Agent skills - search, install, and update skills for Claude, Codex, Copilot, and more",
5
- "author": "SkillHub Contributors",
6
- "license": "MIT",
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/anthropics/skillhub.git",
10
- "directory": "apps/cli"
11
- },
12
- "homepage": "https://skills.palebluedot.live",
13
- "type": "module",
14
- "bin": {
15
- "skillhub": "./dist/index.js"
16
- },
17
- "files": [
18
- "dist"
19
- ],
20
- "dependencies": {
21
- "skillhub-core": "^0.1.0",
22
- "@octokit/rest": "^20.0.2",
23
- "chalk": "^5.3.0",
24
- "commander": "^11.1.0",
25
- "fs-extra": "^11.2.0",
26
- "ora": "^8.0.1",
27
- "prompts": "^2.4.2"
28
- },
29
- "devDependencies": {
30
- "@types/fs-extra": "^11.0.4",
31
- "@types/node": "^20.10.0",
32
- "@types/prompts": "^2.4.9",
33
- "tsup": "^8.0.1",
34
- "tsx": "^4.7.0",
35
- "typescript": "^5.3.0",
36
- "vitest": "^1.2.0"
37
- },
38
- "engines": {
39
- "node": ">=18.0.0"
40
- },
41
- "keywords": [
42
- "ai",
43
- "agent",
44
- "skills",
45
- "cli",
46
- "claude",
47
- "codex",
48
- "copilot"
49
- ],
50
- "scripts": {
51
- "build": "tsup src/index.ts --format esm --target node20 --clean",
52
- "dev": "tsx src/index.ts",
53
- "start": "node dist/index.js",
54
- "lint": "eslint src/",
55
- "typecheck": "tsc --noEmit",
56
- "test": "vitest",
57
- "test:run": "vitest run"
58
- }
59
- }
1
+ {
2
+ "name": "skillhub",
3
+ "version": "0.1.15",
4
+ "description": "CLI tool for managing AI Agent skills - search, install, and update skills for Claude, Codex, Copilot, and more",
5
+ "author": "SkillHub Contributors",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/anthropics/skillhub.git",
10
+ "directory": "apps/cli"
11
+ },
12
+ "homepage": "https://skills.palebluedot.live",
13
+ "type": "module",
14
+ "bin": {
15
+ "skillhub": "./dist/index.js"
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "scripts": {
21
+ "build": "tsup src/index.ts --format esm --target node20 --clean",
22
+ "dev": "tsx src/index.ts",
23
+ "start": "node dist/index.js",
24
+ "lint": "eslint src/",
25
+ "typecheck": "tsc --noEmit",
26
+ "test": "vitest",
27
+ "test:run": "vitest run"
28
+ },
29
+ "dependencies": {
30
+ "skillhub-core": "^0.1.0",
31
+ "@octokit/rest": "^20.0.2",
32
+ "chalk": "^5.3.0",
33
+ "commander": "^11.1.0",
34
+ "fs-extra": "^11.2.0",
35
+ "ora": "^8.0.1",
36
+ "prompts": "^2.4.2"
37
+ },
38
+ "devDependencies": {
39
+ "@types/fs-extra": "^11.0.4",
40
+ "@types/node": "^20.10.0",
41
+ "@types/prompts": "^2.4.9",
42
+ "tsup": "^8.0.1",
43
+ "tsx": "^4.7.0",
44
+ "typescript": "^5.3.0",
45
+ "vitest": "^1.2.0"
46
+ },
47
+ "engines": {
48
+ "node": ">=18.0.0"
49
+ },
50
+ "keywords": [
51
+ "ai",
52
+ "agent",
53
+ "skills",
54
+ "cli",
55
+ "claude",
56
+ "codex",
57
+ "copilot",
58
+ "cursor",
59
+ "windsurf"
60
+ ]
61
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 SkillHub Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.