@skillkit/cli 1.9.0 → 1.10.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/index.d.ts CHANGED
@@ -236,12 +236,18 @@ declare class RecommendCommand extends Command {
236
236
  explain: boolean;
237
237
  reasoning: boolean;
238
238
  showPath: boolean;
239
+ hybrid: boolean;
240
+ expand: boolean;
241
+ rerank: boolean;
242
+ buildIndex: boolean;
239
243
  execute(): Promise<number>;
240
244
  private handleReasoningRecommendations;
241
245
  private getProjectProfile;
242
246
  private showProjectProfile;
243
247
  private displayRecommendations;
244
248
  private displayExplainedRecommendations;
249
+ private handleHybridSearch;
250
+ private buildHybridIndex;
245
251
  private handleSearch;
246
252
  private loadIndex;
247
253
  private updateIndex;
package/dist/index.js CHANGED
@@ -3391,7 +3391,10 @@ var RecommendCommand = class extends Command15 {
3391
3391
  ["Show detailed reasons", "$0 recommend --verbose"],
3392
3392
  ["Update skill index", "$0 recommend --update"],
3393
3393
  ["Search for skills by task", '$0 recommend --task "authentication"'],
3394
- ["Search for skills (alias)", '$0 recommend --search "testing"']
3394
+ ["Search for skills (alias)", '$0 recommend --search "testing"'],
3395
+ ["Hybrid search (vector + keyword)", '$0 recommend --search "auth" --hybrid'],
3396
+ ["Hybrid search with query expansion", '$0 recommend --search "auth" --hybrid --expand'],
3397
+ ["Build hybrid search index", "$0 recommend --build-index"]
3395
3398
  ]
3396
3399
  });
3397
3400
  // Limit number of results
@@ -3450,11 +3453,33 @@ var RecommendCommand = class extends Command15 {
3450
3453
  showPath = Option14.Boolean("--show-path", false, {
3451
3454
  description: "Show category path for each recommendation"
3452
3455
  });
3456
+ // Hybrid search mode
3457
+ hybrid = Option14.Boolean("--hybrid,-H", false, {
3458
+ description: "Use hybrid search (vector + keyword)"
3459
+ });
3460
+ // Query expansion
3461
+ expand = Option14.Boolean("--expand,-x", false, {
3462
+ description: "Enable query expansion (requires --hybrid)"
3463
+ });
3464
+ // Reranking
3465
+ rerank = Option14.Boolean("--rerank", false, {
3466
+ description: "Enable LLM reranking (requires --hybrid)"
3467
+ });
3468
+ // Build index
3469
+ buildIndex = Option14.Boolean("--build-index", false, {
3470
+ description: "Build/rebuild the hybrid search embedding index"
3471
+ });
3453
3472
  async execute() {
3454
3473
  const targetPath = resolve4(this.projectPath || process.cwd());
3455
3474
  if (this.update) {
3456
3475
  return await this.updateIndex();
3457
3476
  }
3477
+ if (this.buildIndex) {
3478
+ return await this.buildHybridIndex();
3479
+ }
3480
+ if ((this.expand || this.rerank) && !this.hybrid) {
3481
+ warn("--expand and --rerank require --hybrid flag. These options will be ignored.");
3482
+ }
3458
3483
  if (!this.quiet && !this.json) {
3459
3484
  header("Skill Recommendations");
3460
3485
  }
@@ -3478,6 +3503,9 @@ var RecommendCommand = class extends Command15 {
3478
3503
  engine.loadIndex(index);
3479
3504
  const searchQuery = this.search || this.task;
3480
3505
  if (searchQuery) {
3506
+ if (this.hybrid) {
3507
+ return await this.handleHybridSearch(engine, searchQuery);
3508
+ }
3481
3509
  return this.handleSearch(engine, searchQuery);
3482
3510
  }
3483
3511
  const result = engine.recommend(profile, {
@@ -3691,6 +3719,110 @@ var RecommendCommand = class extends Command15 {
3691
3719
  console.log(colors.muted("Install with: skillkit install <source>"));
3692
3720
  console.log(colors.muted("More details: skillkit recommend --explain --verbose"));
3693
3721
  }
3722
+ async handleHybridSearch(engine, query) {
3723
+ if (!this.quiet && !this.json) {
3724
+ header(`Hybrid Search: "${query}"`);
3725
+ }
3726
+ const s = !this.quiet && !this.json ? spinner2() : null;
3727
+ s?.start("Initializing hybrid search...");
3728
+ try {
3729
+ await engine.initHybridSearch();
3730
+ s?.message("Searching...");
3731
+ const results = await engine.hybridSearch({
3732
+ query,
3733
+ limit: this.limit ? parseInt(this.limit, 10) : 10,
3734
+ hybrid: true,
3735
+ enableExpansion: this.expand,
3736
+ enableReranking: this.rerank,
3737
+ filters: {
3738
+ minScore: this.minScore ? parseInt(this.minScore, 10) : void 0
3739
+ }
3740
+ });
3741
+ s?.stop(`Found ${results.length} results`);
3742
+ if (this.json) {
3743
+ console.log(JSON.stringify(results, null, 2));
3744
+ return 0;
3745
+ }
3746
+ if (results.length === 0) {
3747
+ warn(`No skills found matching "${query}"`);
3748
+ return 0;
3749
+ }
3750
+ console.log("");
3751
+ console.log(colors.bold(`Hybrid search results for "${query}" (${results.length} found):`));
3752
+ if (this.expand && results[0]?.expandedTerms?.length) {
3753
+ console.log(colors.muted(` Expanded: ${results[0].expandedTerms.join(", ")}`));
3754
+ }
3755
+ console.log("");
3756
+ for (const result of results) {
3757
+ let relevanceColor;
3758
+ if (result.relevance >= 70) {
3759
+ relevanceColor = colors.success;
3760
+ } else if (result.relevance >= 50) {
3761
+ relevanceColor = colors.warning;
3762
+ } else {
3763
+ relevanceColor = colors.muted;
3764
+ }
3765
+ const relevanceBar = progressBar(result.relevance, 100, 10);
3766
+ console.log(` ${relevanceColor(`${result.relevance}%`)} ${colors.dim(relevanceBar)} ${colors.bold(result.skill.name)}`);
3767
+ if (result.skill.description) {
3768
+ console.log(` ${colors.muted(truncate3(result.skill.description, 70))}`);
3769
+ }
3770
+ if (this.verbose) {
3771
+ const scores = [];
3772
+ if (typeof result.vectorSimilarity === "number") {
3773
+ scores.push(`vector: ${(result.vectorSimilarity * 100).toFixed(0)}%`);
3774
+ }
3775
+ if (typeof result.keywordScore === "number") {
3776
+ scores.push(`keyword: ${result.keywordScore.toFixed(0)}%`);
3777
+ }
3778
+ if (typeof result.rrfScore === "number") {
3779
+ scores.push(`rrf: ${result.rrfScore.toFixed(3)}`);
3780
+ }
3781
+ if (scores.length > 0) {
3782
+ console.log(` ${colors.dim("Scores:")} ${scores.join(" | ")}`);
3783
+ }
3784
+ }
3785
+ if (result.matchedTerms.length > 0) {
3786
+ console.log(` ${colors.dim("Matched:")} ${result.matchedTerms.join(", ")}`);
3787
+ }
3788
+ console.log("");
3789
+ }
3790
+ return 0;
3791
+ } catch (err) {
3792
+ s?.stop(colors.error("Hybrid search failed"));
3793
+ console.log(colors.muted(err instanceof Error ? err.message : String(err)));
3794
+ console.log(colors.muted("Falling back to standard search..."));
3795
+ return this.handleSearch(engine, query);
3796
+ }
3797
+ }
3798
+ async buildHybridIndex() {
3799
+ if (!this.quiet) {
3800
+ header("Build Hybrid Search Index");
3801
+ }
3802
+ const index = this.loadIndex();
3803
+ if (!index || index.skills.length === 0) {
3804
+ warn("No skill index found. Run --update first.");
3805
+ return 1;
3806
+ }
3807
+ const s = spinner2();
3808
+ s.start("Initializing...");
3809
+ try {
3810
+ const engine = new RecommendationEngine();
3811
+ engine.loadIndex(index);
3812
+ await engine.buildHybridIndex((progress) => {
3813
+ const percentage = Math.round(progress.current / progress.total * 100);
3814
+ s.message(`${progress.phase}: ${progress.message || ""} (${percentage}%)`);
3815
+ });
3816
+ s.stop(colors.success(`${symbols.success} Built hybrid index for ${index.skills.length} skills`));
3817
+ console.log(colors.muted(" Index stored in: ~/.skillkit/search.db"));
3818
+ console.log(colors.muted(" Use --hybrid flag for vector+keyword search\n"));
3819
+ return 0;
3820
+ } catch (err) {
3821
+ s.stop(colors.error("Failed to build hybrid index"));
3822
+ console.log(colors.muted(err instanceof Error ? err.message : String(err)));
3823
+ return 1;
3824
+ }
3825
+ }
3694
3826
  handleSearch(engine, query) {
3695
3827
  if (!this.quiet && !this.json) {
3696
3828
  header(`Search: "${query}"`);
@@ -10688,8 +10820,8 @@ import { Command as Command40, Option as Option39 } from "clipanion";
10688
10820
  var skills_default = {
10689
10821
  $schema: "./schema.json",
10690
10822
  version: 1,
10691
- updatedAt: "2026-01-26",
10692
- totalSkills: 15064,
10823
+ updatedAt: "2026-02-02",
10824
+ totalSkills: 15065,
10693
10825
  curatedCollections: 31,
10694
10826
  skills: [
10695
10827
  {
@@ -43799,6 +43931,23 @@ var skills_default = {
43799
43931
  "k8s"
43800
43932
  ]
43801
43933
  },
43934
+ {
43935
+ id: "rohitg00/beautiful-mermaid/beautiful-mermaid",
43936
+ name: "Beautiful Mermaid",
43937
+ description: "Render Mermaid diagrams as beautiful SVGs or ASCII art. 5 diagram types, 15 themes, Shiki integration, zero DOM dependencies.",
43938
+ source: "rohitg00/beautiful-mermaid",
43939
+ tags: [
43940
+ "mermaid",
43941
+ "diagrams",
43942
+ "visualization",
43943
+ "flowchart",
43944
+ "sequence",
43945
+ "uml",
43946
+ "ascii",
43947
+ "svg",
43948
+ "themes"
43949
+ ]
43950
+ },
43802
43951
  {
43803
43952
  id: "itsmostafa/aws-agent-skills/cognito",
43804
43953
  name: "Cognito",