claudeup 4.5.5 → 4.6.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudeup",
3
- "version": "4.5.5",
3
+ "version": "4.6.1",
4
4
  "description": "TUI tool for managing Claude Code plugins, MCPs, and configuration",
5
5
  "type": "module",
6
6
  "main": "src/main.tsx",
@@ -88,6 +88,62 @@ export const RECOMMENDED_SKILLS = [
88
88
  stars: 81,
89
89
  },
90
90
  ];
91
+ export const RECOMMENDED_SKILL_SETS = [
92
+ {
93
+ name: "Hugging Face",
94
+ repo: "huggingface/skills",
95
+ description: "Give your agents the power of the Hugging Face ecosystem",
96
+ icon: "\u{1F917}",
97
+ stars: 10000,
98
+ },
99
+ ];
100
+ // ─── Star reliability classification ────────────────────────────────────────
101
+ // Stars from these repos don't reflect individual skill quality.
102
+ /** Mega-repos: huge projects that happen to include skills. Stars are about the project. */
103
+ const MEGA_REPOS = new Set([
104
+ "microsoft/vscode",
105
+ "Significant-Gravitas/AutoGPT",
106
+ "n8n-io/n8n",
107
+ "anomalyco/opencode",
108
+ "shadcn-ui/ui",
109
+ ]);
110
+ /** Skill-dump repos: large collections where stars reflect quantity, not quality. */
111
+ const SKILL_DUMP_REPOS = new Set([
112
+ "affaan-m/everything-claude-code",
113
+ "openclaw/openclaw",
114
+ "jh941213/my-claude-code-asset",
115
+ "inferen-sh/skills",
116
+ ]);
117
+ /**
118
+ * Classify how reliable a repo's star count is as a quality signal for its skills.
119
+ * - "dedicated": Stars reflect skill/repo quality (e.g. huggingface/skills, vercel-labs/agent-skills)
120
+ * - "mega-repo": Stars are about a larger project, not the skills (e.g. microsoft/vscode)
121
+ * - "skill-dump": Large skill collection — stars reflect popularity/quantity, not individual quality
122
+ */
123
+ export function classifyStarReliability(repo, stars) {
124
+ if (MEGA_REPOS.has(repo))
125
+ return "mega-repo";
126
+ if (SKILL_DUMP_REPOS.has(repo))
127
+ return "skill-dump";
128
+ // Heuristic: unknown repos with >50K stars are likely mega-repos
129
+ if (stars && stars > 50000)
130
+ return "mega-repo";
131
+ return "dedicated";
132
+ }
133
+ export const STAR_RELIABILITY_INFO = {
134
+ dedicated: {
135
+ label: "Skill repo",
136
+ description: "Stars reflect this skill repository's quality",
137
+ },
138
+ "mega-repo": {
139
+ label: "Project repo",
140
+ description: "Stars are for the parent project, not the skills. Skill quality may vary.",
141
+ },
142
+ "skill-dump": {
143
+ label: "Skill collection",
144
+ description: "Large skill collection — stars reflect repo popularity, not individual skill quality.",
145
+ },
146
+ };
91
147
  export const DEFAULT_SKILL_REPOS = [
92
148
  {
93
149
  label: "Vercel Agent Skills",
@@ -1,4 +1,4 @@
1
- import type { SkillSource } from "../types/index.js";
1
+ import type { SkillSource, StarReliability } from "../types/index.js";
2
2
 
3
3
  export interface RecommendedSkill {
4
4
  name: string;
@@ -100,6 +100,75 @@ export const RECOMMENDED_SKILLS: RecommendedSkill[] = [
100
100
  },
101
101
  ];
102
102
 
103
+ // ─── Skill Sets (grouped skills from a single repo) ──────────────────────────
104
+
105
+ export interface RecommendedSkillSet {
106
+ name: string;
107
+ repo: string;
108
+ description: string;
109
+ icon: string;
110
+ stars?: number;
111
+ }
112
+
113
+ export const RECOMMENDED_SKILL_SETS: RecommendedSkillSet[] = [
114
+ {
115
+ name: "Hugging Face",
116
+ repo: "huggingface/skills",
117
+ description: "Give your agents the power of the Hugging Face ecosystem",
118
+ icon: "\u{1F917}",
119
+ stars: 10000,
120
+ },
121
+ ];
122
+
123
+ // ─── Star reliability classification ────────────────────────────────────────
124
+ // Stars from these repos don't reflect individual skill quality.
125
+
126
+ /** Mega-repos: huge projects that happen to include skills. Stars are about the project. */
127
+ const MEGA_REPOS = new Set([
128
+ "microsoft/vscode",
129
+ "Significant-Gravitas/AutoGPT",
130
+ "n8n-io/n8n",
131
+ "anomalyco/opencode",
132
+ "shadcn-ui/ui",
133
+ ]);
134
+
135
+ /** Skill-dump repos: large collections where stars reflect quantity, not quality. */
136
+ const SKILL_DUMP_REPOS = new Set([
137
+ "affaan-m/everything-claude-code",
138
+ "openclaw/openclaw",
139
+ "jh941213/my-claude-code-asset",
140
+ "inferen-sh/skills",
141
+ ]);
142
+
143
+ /**
144
+ * Classify how reliable a repo's star count is as a quality signal for its skills.
145
+ * - "dedicated": Stars reflect skill/repo quality (e.g. huggingface/skills, vercel-labs/agent-skills)
146
+ * - "mega-repo": Stars are about a larger project, not the skills (e.g. microsoft/vscode)
147
+ * - "skill-dump": Large skill collection — stars reflect popularity/quantity, not individual quality
148
+ */
149
+ export function classifyStarReliability(repo: string, stars?: number): StarReliability {
150
+ if (MEGA_REPOS.has(repo)) return "mega-repo";
151
+ if (SKILL_DUMP_REPOS.has(repo)) return "skill-dump";
152
+ // Heuristic: unknown repos with >50K stars are likely mega-repos
153
+ if (stars && stars > 50000) return "mega-repo";
154
+ return "dedicated";
155
+ }
156
+
157
+ export const STAR_RELIABILITY_INFO: Record<StarReliability, { label: string; description: string }> = {
158
+ dedicated: {
159
+ label: "Skill repo",
160
+ description: "Stars reflect this skill repository's quality",
161
+ },
162
+ "mega-repo": {
163
+ label: "Project repo",
164
+ description: "Stars are for the parent project, not the skills. Skill quality may vary.",
165
+ },
166
+ "skill-dump": {
167
+ label: "Skill collection",
168
+ description: "Large skill collection — stars reflect repo popularity, not individual skill quality.",
169
+ },
170
+ };
171
+
103
172
  export const DEFAULT_SKILL_REPOS: SkillSource[] = [
104
173
  {
105
174
  label: "Vercel Agent Skills",
@@ -209,24 +209,51 @@ export async function removeLocalInstalledPluginVersion(pluginId, projectPath) {
209
209
  await removeFromInstalledPluginsRegistry(pluginId, "local", projectPath ? path.resolve(projectPath) : undefined);
210
210
  }
211
211
  // Status line management
212
+ // Claude Code expects statusLine as an object: { type: "template", template: "..." }
213
+ // or { type: "command", command: "..." }. Writing a bare string causes a validation error
214
+ // that skips the entire settings file.
215
+ function wrapStatusLine(template) {
216
+ if (!template)
217
+ return undefined;
218
+ return { type: "template", template };
219
+ }
220
+ function unwrapStatusLine(value) {
221
+ if (!value)
222
+ return undefined;
223
+ if (typeof value === "string")
224
+ return value; // legacy format
225
+ return value.template ?? value.command;
226
+ }
212
227
  export async function setStatusLine(template, projectPath) {
213
228
  const settings = await readSettings(projectPath);
214
- settings.statusLine = template;
229
+ const wrapped = wrapStatusLine(template);
230
+ if (wrapped) {
231
+ settings.statusLine = wrapped;
232
+ }
233
+ else {
234
+ delete settings.statusLine;
235
+ }
215
236
  await writeSettings(settings, projectPath);
216
237
  }
217
238
  export async function getStatusLine(projectPath) {
218
239
  const settings = await readSettings(projectPath);
219
- return settings.statusLine;
240
+ return unwrapStatusLine(settings.statusLine);
220
241
  }
221
242
  // Global status line management
222
243
  export async function setGlobalStatusLine(template) {
223
244
  const settings = await readGlobalSettings();
224
- settings.statusLine = template;
245
+ const wrapped = wrapStatusLine(template);
246
+ if (wrapped) {
247
+ settings.statusLine = wrapped;
248
+ }
249
+ else {
250
+ delete settings.statusLine;
251
+ }
225
252
  await writeGlobalSettings(settings);
226
253
  }
227
254
  export async function getGlobalStatusLine() {
228
255
  const settings = await readGlobalSettings();
229
- return settings.statusLine;
256
+ return unwrapStatusLine(settings.statusLine);
230
257
  }
231
258
  // Get effective status line (project overrides global)
232
259
  export async function getEffectiveStatusLine(projectPath) {
@@ -311,12 +311,34 @@ export async function removeLocalInstalledPluginVersion(
311
311
  }
312
312
 
313
313
  // Status line management
314
+ // Claude Code expects statusLine as an object: { type: "template", template: "..." }
315
+ // or { type: "command", command: "..." }. Writing a bare string causes a validation error
316
+ // that skips the entire settings file.
317
+
318
+ function wrapStatusLine(template: string): { type: string; template: string } | undefined {
319
+ if (!template) return undefined;
320
+ return { type: "template", template };
321
+ }
322
+
323
+ function unwrapStatusLine(
324
+ value: string | { type: string; template?: string; command?: string } | undefined,
325
+ ): string | undefined {
326
+ if (!value) return undefined;
327
+ if (typeof value === "string") return value; // legacy format
328
+ return value.template ?? value.command;
329
+ }
330
+
314
331
  export async function setStatusLine(
315
332
  template: string,
316
333
  projectPath?: string,
317
334
  ): Promise<void> {
318
335
  const settings = await readSettings(projectPath);
319
- settings.statusLine = template;
336
+ const wrapped = wrapStatusLine(template);
337
+ if (wrapped) {
338
+ settings.statusLine = wrapped;
339
+ } else {
340
+ delete settings.statusLine;
341
+ }
320
342
  await writeSettings(settings, projectPath);
321
343
  }
322
344
 
@@ -324,19 +346,24 @@ export async function getStatusLine(
324
346
  projectPath?: string,
325
347
  ): Promise<string | undefined> {
326
348
  const settings = await readSettings(projectPath);
327
- return settings.statusLine;
349
+ return unwrapStatusLine(settings.statusLine);
328
350
  }
329
351
 
330
352
  // Global status line management
331
353
  export async function setGlobalStatusLine(template: string): Promise<void> {
332
354
  const settings = await readGlobalSettings();
333
- settings.statusLine = template;
355
+ const wrapped = wrapStatusLine(template);
356
+ if (wrapped) {
357
+ settings.statusLine = wrapped;
358
+ } else {
359
+ delete settings.statusLine;
360
+ }
334
361
  await writeGlobalSettings(settings);
335
362
  }
336
363
 
337
364
  export async function getGlobalStatusLine(): Promise<string | undefined> {
338
365
  const settings = await readGlobalSettings();
339
- return settings.statusLine;
366
+ return unwrapStatusLine(settings.statusLine);
340
367
  }
341
368
 
342
369
  // Get effective status line (project overrides global)
@@ -1,7 +1,7 @@
1
1
  import fs from "fs-extra";
2
2
  import path from "node:path";
3
3
  import os from "node:os";
4
- import { RECOMMENDED_SKILLS } from "../data/skill-repos.js";
4
+ import { RECOMMENDED_SKILLS, classifyStarReliability } from "../data/skill-repos.js";
5
5
  const SKILLS_API_BASE = "https://us-central1-claudish-6da10.cloudfunctions.net/skills";
6
6
  const treeCache = new Map();
7
7
  // ─── Path helpers ──────────────────────────────────────────────────────────────
@@ -48,6 +48,51 @@ async function fetchGitTree(repo) {
48
48
  treeCache.set(repo, { etag, tree, fetchedAt: Date.now() });
49
49
  return tree;
50
50
  }
51
+ // ─── Skill Set fetching ──────────────────────────────────────────────────────
52
+ /**
53
+ * Fetch all skills from a skill set repo using the GitHub Tree API.
54
+ * Returns SkillInfo[] with installed status marked via disk scan.
55
+ */
56
+ export async function fetchSkillSetSkills(repo, projectPath) {
57
+ const tree = await fetchGitTree(repo);
58
+ // Find all SKILL.md blobs
59
+ const skillBlobs = tree.tree.filter((entry) => entry.type === "blob" && entry.path.endsWith("/SKILL.md"));
60
+ const userInstalled = await getInstalledSkillNames("user");
61
+ const projectInstalled = await getInstalledSkillNames("project", projectPath);
62
+ const slugify = (name) => name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
63
+ const source = {
64
+ label: repo,
65
+ repo,
66
+ skillsPath: "",
67
+ };
68
+ return skillBlobs.map((blob) => {
69
+ // Derive skill name from parent directory of SKILL.md
70
+ const parts = blob.path.split("/");
71
+ const name = parts[parts.length - 2]; // e.g. "huggingface-datasets"
72
+ const repoPath = blob.path; // e.g. "skills/huggingface-datasets/SKILL.md"
73
+ const slug = slugify(name);
74
+ const isUser = userInstalled.has(slug) || userInstalled.has(name);
75
+ const isProj = projectInstalled.has(slug) || projectInstalled.has(name);
76
+ const installed = isUser || isProj;
77
+ const installedScope = isProj
78
+ ? "project"
79
+ : isUser
80
+ ? "user"
81
+ : null;
82
+ return {
83
+ id: `${repo}/${blob.path.replace("/SKILL.md", "")}`,
84
+ name,
85
+ source,
86
+ repoPath,
87
+ gitBlobSha: blob.sha,
88
+ frontmatter: null,
89
+ installed,
90
+ installedScope,
91
+ hasUpdate: false,
92
+ description: "",
93
+ };
94
+ });
95
+ }
51
96
  // ─── Frontmatter parser ───────────────────────────────────────────────────────
52
97
  function parseYamlFrontmatter(content) {
53
98
  const frontmatterMatch = content.match(/^---\s*\n([\s\S]*?)\n---/);
@@ -134,6 +179,7 @@ function mapApiSkillToSkillInfo(raw) {
134
179
  repo,
135
180
  skillsPath: "",
136
181
  };
182
+ const stars = typeof raw.stars === "number" ? raw.stars : undefined;
137
183
  return {
138
184
  id: `${repo}/${skillPath}`,
139
185
  name: raw.name || skillPath,
@@ -145,7 +191,8 @@ function mapApiSkillToSkillInfo(raw) {
145
191
  installed: false,
146
192
  installedScope: null,
147
193
  hasUpdate: false,
148
- stars: typeof raw.stars === "number" ? raw.stars : undefined,
194
+ stars,
195
+ starReliability: classifyStarReliability(repo, stars),
149
196
  };
150
197
  }
151
198
  export async function fetchPopularSkills(limit = 30) {
@@ -196,6 +243,7 @@ export async function fetchAvailableSkills(_repos, projectPath) {
196
243
  installedScope: null,
197
244
  hasUpdate: false,
198
245
  isRecommended: true,
246
+ starReliability: classifyStarReliability(rec.repo, rec.stars),
199
247
  };
200
248
  return markInstalled(skill);
201
249
  });
@@ -7,7 +7,7 @@ import type {
7
7
  SkillFrontmatter,
8
8
  GitTreeResponse,
9
9
  } from "../types/index.js";
10
- import { RECOMMENDED_SKILLS } from "../data/skill-repos.js";
10
+ import { RECOMMENDED_SKILLS, classifyStarReliability } from "../data/skill-repos.js";
11
11
 
12
12
  const SKILLS_API_BASE =
13
13
  "https://us-central1-claudish-6da10.cloudfunctions.net/skills";
@@ -85,6 +85,66 @@ async function fetchGitTree(repo: string): Promise<GitTreeResponse> {
85
85
  return tree;
86
86
  }
87
87
 
88
+ // ─── Skill Set fetching ──────────────────────────────────────────────────────
89
+
90
+ /**
91
+ * Fetch all skills from a skill set repo using the GitHub Tree API.
92
+ * Returns SkillInfo[] with installed status marked via disk scan.
93
+ */
94
+ export async function fetchSkillSetSkills(
95
+ repo: string,
96
+ projectPath?: string,
97
+ ): Promise<SkillInfo[]> {
98
+ const tree = await fetchGitTree(repo);
99
+
100
+ // Find all SKILL.md blobs
101
+ const skillBlobs = tree.tree.filter(
102
+ (entry) => entry.type === "blob" && entry.path.endsWith("/SKILL.md"),
103
+ );
104
+
105
+ const userInstalled = await getInstalledSkillNames("user");
106
+ const projectInstalled = await getInstalledSkillNames("project", projectPath);
107
+
108
+ const slugify = (name: string) =>
109
+ name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
110
+
111
+ const source: SkillSource = {
112
+ label: repo,
113
+ repo,
114
+ skillsPath: "",
115
+ };
116
+
117
+ return skillBlobs.map((blob) => {
118
+ // Derive skill name from parent directory of SKILL.md
119
+ const parts = blob.path.split("/");
120
+ const name = parts[parts.length - 2]; // e.g. "huggingface-datasets"
121
+ const repoPath = blob.path; // e.g. "skills/huggingface-datasets/SKILL.md"
122
+ const slug = slugify(name);
123
+
124
+ const isUser = userInstalled.has(slug) || userInstalled.has(name);
125
+ const isProj = projectInstalled.has(slug) || projectInstalled.has(name);
126
+ const installed = isUser || isProj;
127
+ const installedScope: "user" | "project" | null = isProj
128
+ ? "project"
129
+ : isUser
130
+ ? "user"
131
+ : null;
132
+
133
+ return {
134
+ id: `${repo}/${blob.path.replace("/SKILL.md", "")}`,
135
+ name,
136
+ source,
137
+ repoPath,
138
+ gitBlobSha: blob.sha,
139
+ frontmatter: null,
140
+ installed,
141
+ installedScope,
142
+ hasUpdate: false,
143
+ description: "",
144
+ };
145
+ });
146
+ }
147
+
88
148
  // ─── Frontmatter parser ───────────────────────────────────────────────────────
89
149
 
90
150
  function parseYamlFrontmatter(content: string): Partial<SkillFrontmatter> {
@@ -190,6 +250,7 @@ function mapApiSkillToSkillInfo(raw: any): SkillInfo {
190
250
  repo,
191
251
  skillsPath: "",
192
252
  };
253
+ const stars = typeof raw.stars === "number" ? raw.stars : undefined;
193
254
  return {
194
255
  id: `${repo}/${skillPath}`,
195
256
  name: (raw.name as string) || skillPath,
@@ -201,7 +262,8 @@ function mapApiSkillToSkillInfo(raw: any): SkillInfo {
201
262
  installed: false,
202
263
  installedScope: null,
203
264
  hasUpdate: false,
204
- stars: typeof raw.stars === "number" ? raw.stars : undefined,
265
+ stars,
266
+ starReliability: classifyStarReliability(repo, stars),
205
267
  };
206
268
  }
207
269
 
@@ -263,6 +325,7 @@ export async function fetchAvailableSkills(
263
325
  installedScope: null,
264
326
  hasUpdate: false,
265
327
  isRecommended: true,
328
+ starReliability: classifyStarReliability(rec.repo, rec.stars),
266
329
  };
267
330
  return markInstalled(skill);
268
331
  });
@@ -88,7 +88,7 @@ export interface ClaudeSettings {
88
88
  enabledPlugins?: Record<string, boolean>;
89
89
  extraKnownMarketplaces?: Record<string, MarketplaceSource>;
90
90
  installedPluginVersions?: Record<string, string>;
91
- statusLine?: string;
91
+ statusLine?: string | { type: string; template?: string; command?: string };
92
92
  hooks?: Record<string, ClaudeHookGroup[]>;
93
93
  }
94
94
 
@@ -168,6 +168,35 @@ export interface SkillInfo {
168
168
  stars?: number;
169
169
  /** Short description (from API, before frontmatter is loaded) */
170
170
  description?: string;
171
+ /** How reliable the star count is as a quality signal for this skill */
172
+ starReliability?: "dedicated" | "mega-repo" | "skill-dump";
173
+ }
174
+
175
+ /** How reliable the star count is as a quality signal for this skill */
176
+ export type StarReliability = "dedicated" | "mega-repo" | "skill-dump";
177
+
178
+ /** A skill set — a group of skills from a single repo */
179
+ export interface SkillSetInfo {
180
+ /** Unique key, e.g. "huggingface/skills" */
181
+ id: string;
182
+ /** Display name, e.g. "Hugging Face" */
183
+ name: string;
184
+ /** Repo description */
185
+ description: string;
186
+ /** GitHub owner/repo */
187
+ repo: string;
188
+ /** Icon/emoji for display */
189
+ icon: string;
190
+ /** GitHub star count */
191
+ stars?: number;
192
+ /** Individual skills within this set (fetched lazily via Tree API) */
193
+ skills: SkillInfo[];
194
+ /** Whether skills have been fetched yet */
195
+ loaded: boolean;
196
+ /** Loading state */
197
+ loading: boolean;
198
+ /** Error if fetch failed */
199
+ error?: string;
171
200
  }
172
201
 
173
202
  // ─── GitHub Tree API types ────────────────────────────────────────────────────
@@ -2,7 +2,7 @@
2
2
  * Builds the flat list of items for the SkillsScreen list panel.
3
3
  * Extracted from SkillsScreen so it can be tested independently.
4
4
  */
5
- export function buildSkillBrowserItems({ recommended, popular, installed, searchResults, query, isSearchLoading, }) {
5
+ export function buildSkillBrowserItems({ recommended, popular, installed, searchResults, query, isSearchLoading, skillSets = [], expandedSets = new Set(), }) {
6
6
  const lowerQuery = query.toLowerCase();
7
7
  const items = [];
8
8
  // ── INSTALLED: always shown at top (if any) ──
@@ -18,7 +18,7 @@ export function buildSkillBrowserItems({ recommended, popular, installed, search
18
18
  categoryKey: "installed",
19
19
  count: installedFiltered.length,
20
20
  tone: "purple",
21
- star: " ",
21
+ star: "\u25CF ",
22
22
  });
23
23
  for (const skill of installedFiltered) {
24
24
  items.push({
@@ -29,21 +29,60 @@ export function buildSkillBrowserItems({ recommended, popular, installed, search
29
29
  });
30
30
  }
31
31
  }
32
- // ── RECOMMENDED: always shown, filtered when searching ──
32
+ // ── RECOMMENDED: skill sets + individual skills, all as first-class items ──
33
+ const filteredSets = lowerQuery
34
+ ? skillSets.filter((s) => {
35
+ if (s.name.toLowerCase().includes(lowerQuery))
36
+ return true;
37
+ if (s.description.toLowerCase().includes(lowerQuery))
38
+ return true;
39
+ if (s.loaded && s.skills.some((sk) => sk.name.toLowerCase().includes(lowerQuery)))
40
+ return true;
41
+ return false;
42
+ })
43
+ : skillSets;
33
44
  const filteredRec = lowerQuery
34
45
  ? recommended.filter((s) => s.name.toLowerCase().includes(lowerQuery) ||
35
46
  (s.description || "").toLowerCase().includes(lowerQuery))
36
47
  : recommended;
48
+ const recommendedCount = filteredSets.length + filteredRec.length;
37
49
  items.push({
38
50
  id: "cat:recommended",
39
51
  kind: "category",
40
52
  label: "Recommended",
41
53
  title: "Recommended",
42
54
  categoryKey: "recommended",
43
- count: filteredRec.length,
55
+ count: recommendedCount,
44
56
  tone: "green",
45
- star: " ",
57
+ star: "\u2605 ",
46
58
  });
59
+ // Skill sets first within recommended
60
+ for (const set of filteredSets) {
61
+ const isExpanded = expandedSets.has(set.id);
62
+ items.push({
63
+ id: `skillset:${set.id}`,
64
+ kind: "skillset",
65
+ label: set.name,
66
+ skillSet: set,
67
+ expanded: isExpanded,
68
+ });
69
+ // When expanded, show child skills as indented skill items
70
+ if (isExpanded && set.loaded) {
71
+ const childSkills = lowerQuery
72
+ ? set.skills.filter((sk) => sk.name.toLowerCase().includes(lowerQuery))
73
+ : set.skills;
74
+ for (const skill of childSkills) {
75
+ items.push({
76
+ id: `skill:${skill.id}`,
77
+ kind: "skill",
78
+ label: skill.name,
79
+ skill,
80
+ indent: 2,
81
+ });
82
+ }
83
+ }
84
+ }
85
+ // Then individual recommended skills
47
86
  for (const skill of filteredRec) {
48
87
  items.push({
49
88
  id: `skill:${skill.id}`,
@@ -82,18 +121,27 @@ export function buildSkillBrowserItems({ recommended, popular, installed, search
82
121
  return items;
83
122
  }
84
123
  // ── POPULAR (default, no search query) — only skills with meaningful stars ──
85
- const popularWithStars = popular.filter((s) => (s.stars ?? 0) >= 5);
86
- if (popularWithStars.length > 0) {
124
+ // Dedup by name API can return same skill name from different repos
125
+ const seenPopular = new Set();
126
+ const popularDeduped = popular
127
+ .filter((s) => (s.stars ?? 0) >= 5)
128
+ .filter((s) => {
129
+ if (seenPopular.has(s.name))
130
+ return false;
131
+ seenPopular.add(s.name);
132
+ return true;
133
+ });
134
+ if (popularDeduped.length > 0) {
87
135
  items.push({
88
136
  id: "cat:popular",
89
137
  kind: "category",
90
138
  label: "Popular",
91
139
  title: "Popular",
92
140
  categoryKey: "popular",
93
- count: popularWithStars.length,
141
+ count: popularDeduped.length,
94
142
  tone: "teal",
95
143
  });
96
- for (const skill of popularWithStars) {
144
+ for (const skill of popularDeduped) {
97
145
  items.push({
98
146
  id: `skill:${skill.id}`,
99
147
  kind: "skill",