ccski 2.0.0 → 2.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 jixoai-labs
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.
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # ccski – Claude Code Skills Manager
2
2
 
3
- ccski is a CLI + MCP server to discover, install, enable/disable, and serve Claude Code-compatible skills. This README covers install and usage. For architecture and UX philosophy, see `SPEC.md`.
3
+ ccski is a CLI + MCP server to discover, install, enable/disable, and serve Claude/Codex-compatible skills. This README covers install and usage. For architecture and UX philosophy, see `SPEC.md`.
4
+
5
+ Documentation site: https://jixoai-labs.github.io/ccski/
4
6
 
5
7
  ## Install
6
8
 
@@ -75,8 +77,14 @@ ccski disable --all
75
77
 
76
78
  ## More
77
79
 
80
+ - Programmatic API is available from the package export; see the docs site for API usage examples.
78
81
  - Claude users: prefer `ccski mcp --exclude=claude` to avoid echoing built-in Claude skills.
79
82
  - Codex users: prefer `ccski mcp --exclude=codex` when avoid echoing built-in Codex skills.
80
83
  - All commands support `--json` for scripting.
81
84
  - Use `--no-color` to disable colors or `--color` to force them.
82
85
  - Read `SPEC.md` for deep technical details and design philosophy.
86
+
87
+ ## Acknowledgements
88
+
89
+ - [openskills](https://github.com/numman-ali/openskills) — established the SKILL.md authoring pattern; ccski aligns with that spec.
90
+ - [universal-skills](https://github.com/klaudworks/universal-skills) — MCP-first skill set; ccski focuses on management, not bundling content.
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as __require, r as __toESM, t as __commonJS } from "./chunk-B7onSSqq.mjs";
3
- import { A as arrayType, B as recordType, C as warn, E as validateSkillFile, F as intersectionType, H as unionType, I as literalType, L as numberType, M as custom, N as discriminatedUnionType, P as enumType, R as objectType, S as tone, T as parseSkillFile, U as unknownType, V as stringType, W as AmbiguousSkillNameError, _ as highlight, a as containsCaseInsensitive, b as setColorEnabled, d as colors$1, f as dim, g as heading, h as formatBytes, i as skillAliases, j as booleanType, m as error, n as formatSkillId, o as rankStrings, p as duplicateBadge, q as SkillNotFoundError, r as formatSkillLabel, t as SkillRegistry, v as info, w as wrap, x as success, y as renderList, z as optionalType } from "./registry-Do2Htns7.mjs";
3
+ import { B as optionalType, C as warn, E as validateSkillFile, F as enumType, G as AmbiguousSkillNameError, H as stringType, I as intersectionType, J as SkillNotFoundError, L as literalType, M as booleanType, N as custom, P as discriminatedUnionType, R as numberType, S as tone, T as parseSkillFile, U as unionType, V as recordType, W as unknownType, _ as highlight, a as containsCaseInsensitive, b as setColorEnabled, d as colors$1, f as dim, g as heading, h as formatBytes, i as skillAliases, j as arrayType, m as error, n as formatSkillId, o as rankStrings, p as duplicateBadge, r as formatSkillLabel, t as SkillRegistry, v as info, w as wrap, x as success, y as renderList, z as objectType } from "./registry-DNMfmLqa.mjs";
4
4
  import { _ as isSpaceKey, a as useRef, c as esm_default$1, d as useState, f as withPointer, g as isNumberKey, h as isEnterKey, i as useKeypress, l as require_yoctocolors_cjs, m as isDownKey, n as breakLines, o as usePrefix, p as ValidationError, r as readlineWidth, s as makeTheme, t as createPrompt, u as useEffect, y as isUpKey } from "./create-prompt-CkW5qmPT.mjs";
5
5
  import { cpSync, existsSync, lstatSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "node:fs";
6
6
  import { readFileSync as readFileSync$1, readdirSync as readdirSync$1, statSync as statSync$1, writeFile } from "fs";
package/dist/index.d.mts CHANGED
@@ -62,13 +62,14 @@ interface PluginEntry {
62
62
  installPath: string;
63
63
  gitCommitSha: string;
64
64
  isLocal: boolean;
65
+ scope?: string;
65
66
  }
66
67
  /**
67
68
  * Installed plugins JSON structure
68
69
  */
69
70
  interface InstalledPlugins {
70
71
  version: number;
71
- plugins: Record<string, PluginEntry>;
72
+ plugins: Record<string, PluginEntry | PluginEntry[]>;
72
73
  }
73
74
  //#endregion
74
75
  //#region src/types/errors.d.ts
@@ -135,75 +136,134 @@ declare const PluginEntrySchema: z.ZodObject<{
135
136
  installPath: z.ZodString;
136
137
  gitCommitSha: z.ZodString;
137
138
  isLocal: z.ZodBoolean;
138
- }, "strip", z.ZodTypeAny, {
139
- version: string;
140
- installedAt: string;
141
- lastUpdated: string;
142
- installPath: string;
143
- gitCommitSha: string;
144
- isLocal: boolean;
145
- }, {
146
- version: string;
147
- installedAt: string;
148
- lastUpdated: string;
149
- installPath: string;
150
- gitCommitSha: string;
151
- isLocal: boolean;
152
- }>;
139
+ scope: z.ZodOptional<z.ZodString>;
140
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
141
+ version: z.ZodString;
142
+ installedAt: z.ZodString;
143
+ lastUpdated: z.ZodString;
144
+ installPath: z.ZodString;
145
+ gitCommitSha: z.ZodString;
146
+ isLocal: z.ZodBoolean;
147
+ scope: z.ZodOptional<z.ZodString>;
148
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
149
+ version: z.ZodString;
150
+ installedAt: z.ZodString;
151
+ lastUpdated: z.ZodString;
152
+ installPath: z.ZodString;
153
+ gitCommitSha: z.ZodString;
154
+ isLocal: z.ZodBoolean;
155
+ scope: z.ZodOptional<z.ZodString>;
156
+ }, z.ZodTypeAny, "passthrough">>;
153
157
  /**
154
158
  * Schema for installed_plugins.json
155
159
  */
156
160
  declare const InstalledPluginsSchema: z.ZodObject<{
157
161
  version: z.ZodNumber;
158
- plugins: z.ZodRecord<z.ZodString, z.ZodObject<{
162
+ plugins: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
159
163
  version: z.ZodString;
160
164
  installedAt: z.ZodString;
161
165
  lastUpdated: z.ZodString;
162
166
  installPath: z.ZodString;
163
167
  gitCommitSha: z.ZodString;
164
168
  isLocal: z.ZodBoolean;
165
- }, "strip", z.ZodTypeAny, {
166
- version: string;
167
- installedAt: string;
168
- lastUpdated: string;
169
- installPath: string;
170
- gitCommitSha: string;
171
- isLocal: boolean;
172
- }, {
173
- version: string;
174
- installedAt: string;
175
- lastUpdated: string;
176
- installPath: string;
177
- gitCommitSha: string;
178
- isLocal: boolean;
179
- }>>;
169
+ scope: z.ZodOptional<z.ZodString>;
170
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
171
+ version: z.ZodString;
172
+ installedAt: z.ZodString;
173
+ lastUpdated: z.ZodString;
174
+ installPath: z.ZodString;
175
+ gitCommitSha: z.ZodString;
176
+ isLocal: z.ZodBoolean;
177
+ scope: z.ZodOptional<z.ZodString>;
178
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
179
+ version: z.ZodString;
180
+ installedAt: z.ZodString;
181
+ lastUpdated: z.ZodString;
182
+ installPath: z.ZodString;
183
+ gitCommitSha: z.ZodString;
184
+ isLocal: z.ZodBoolean;
185
+ scope: z.ZodOptional<z.ZodString>;
186
+ }, z.ZodTypeAny, "passthrough">>, z.ZodArray<z.ZodObject<{
187
+ version: z.ZodString;
188
+ installedAt: z.ZodString;
189
+ lastUpdated: z.ZodString;
190
+ installPath: z.ZodString;
191
+ gitCommitSha: z.ZodString;
192
+ isLocal: z.ZodBoolean;
193
+ scope: z.ZodOptional<z.ZodString>;
194
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
195
+ version: z.ZodString;
196
+ installedAt: z.ZodString;
197
+ lastUpdated: z.ZodString;
198
+ installPath: z.ZodString;
199
+ gitCommitSha: z.ZodString;
200
+ isLocal: z.ZodBoolean;
201
+ scope: z.ZodOptional<z.ZodString>;
202
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
203
+ version: z.ZodString;
204
+ installedAt: z.ZodString;
205
+ lastUpdated: z.ZodString;
206
+ installPath: z.ZodString;
207
+ gitCommitSha: z.ZodString;
208
+ isLocal: z.ZodBoolean;
209
+ scope: z.ZodOptional<z.ZodString>;
210
+ }, z.ZodTypeAny, "passthrough">>, "many">]>>;
180
211
  }, "strip", z.ZodTypeAny, {
181
212
  version: number;
182
- plugins: Record<string, {
183
- version: string;
184
- installedAt: string;
185
- lastUpdated: string;
186
- installPath: string;
187
- gitCommitSha: string;
188
- isLocal: boolean;
189
- }>;
213
+ plugins: Record<string, z.objectOutputType<{
214
+ version: z.ZodString;
215
+ installedAt: z.ZodString;
216
+ lastUpdated: z.ZodString;
217
+ installPath: z.ZodString;
218
+ gitCommitSha: z.ZodString;
219
+ isLocal: z.ZodBoolean;
220
+ scope: z.ZodOptional<z.ZodString>;
221
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
222
+ version: z.ZodString;
223
+ installedAt: z.ZodString;
224
+ lastUpdated: z.ZodString;
225
+ installPath: z.ZodString;
226
+ gitCommitSha: z.ZodString;
227
+ isLocal: z.ZodBoolean;
228
+ scope: z.ZodOptional<z.ZodString>;
229
+ }, z.ZodTypeAny, "passthrough">[]>;
190
230
  }, {
191
231
  version: number;
192
- plugins: Record<string, {
193
- version: string;
194
- installedAt: string;
195
- lastUpdated: string;
196
- installPath: string;
197
- gitCommitSha: string;
198
- isLocal: boolean;
199
- }>;
232
+ plugins: Record<string, z.objectInputType<{
233
+ version: z.ZodString;
234
+ installedAt: z.ZodString;
235
+ lastUpdated: z.ZodString;
236
+ installPath: z.ZodString;
237
+ gitCommitSha: z.ZodString;
238
+ isLocal: z.ZodBoolean;
239
+ scope: z.ZodOptional<z.ZodString>;
240
+ }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
241
+ version: z.ZodString;
242
+ installedAt: z.ZodString;
243
+ lastUpdated: z.ZodString;
244
+ installPath: z.ZodString;
245
+ gitCommitSha: z.ZodString;
246
+ isLocal: z.ZodBoolean;
247
+ scope: z.ZodOptional<z.ZodString>;
248
+ }, z.ZodTypeAny, "passthrough">[]>;
200
249
  }>;
250
+ /**
251
+ * Schema for Claude settings.json (subset we care about)
252
+ */
253
+ declare const ClaudeSettingsSchema: z.ZodObject<{
254
+ enabledPlugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
255
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
256
+ enabledPlugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
257
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
258
+ enabledPlugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
259
+ }, z.ZodTypeAny, "passthrough">>;
201
260
  /**
202
261
  * Infer TypeScript types from Zod schemas
203
262
  */
204
263
  type SkillFrontmatterType = z.infer<typeof SkillFrontmatterSchema>;
205
264
  type PluginEntryType = z.infer<typeof PluginEntrySchema>;
206
265
  type InstalledPluginsType = z.infer<typeof InstalledPluginsSchema>;
266
+ type ClaudeSettingsType = z.infer<typeof ClaudeSettingsSchema>;
207
267
  //#endregion
208
268
  //#region src/core/parser.d.ts
209
269
  /**
@@ -299,6 +359,7 @@ declare function loadSkill(metadata: SkillMetadata): Skill;
299
359
  interface PluginDiscoveryOptions {
300
360
  pluginsFile?: string;
301
361
  pluginsRoot?: string;
362
+ settingsFile?: string;
302
363
  userDir?: string;
303
364
  }
304
365
  //#endregion
@@ -351,5 +412,5 @@ declare class SkillRegistry {
351
412
  };
352
413
  }
353
414
  //#endregion
354
- export { AmbiguousSkillNameError, CcskiError, DiscoveryDiagnostics, DiscoveryOptions, DiscoveryResult, InstalledPlugins, InstalledPluginsSchema, InstalledPluginsType, ParseError, ParseResult, PluginEntry, PluginEntrySchema, PluginEntryType, Skill, SkillFrontmatter, SkillFrontmatterSchema, SkillFrontmatterType, SkillLocation, SkillMetadata, SkillNotFoundError, SkillProvider, SkillRegistry, SkillRegistryOptions, ValidationError, discoverSkills, getDefaultSkillDirectories, loadSkill, parseSkillFile, scanSkillDirectory, validateSkillFile };
415
+ export { AmbiguousSkillNameError, CcskiError, ClaudeSettingsSchema, ClaudeSettingsType, DiscoveryDiagnostics, DiscoveryOptions, DiscoveryResult, InstalledPlugins, InstalledPluginsSchema, InstalledPluginsType, ParseError, ParseResult, PluginEntry, PluginEntrySchema, PluginEntryType, Skill, SkillFrontmatter, SkillFrontmatterSchema, SkillFrontmatterType, SkillLocation, SkillMetadata, SkillNotFoundError, SkillProvider, SkillRegistry, SkillRegistryOptions, ValidationError, discoverSkills, getDefaultSkillDirectories, loadSkill, parseSkillFile, scanSkillDirectory, validateSkillFile };
355
416
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/skill.ts","../src/types/errors.ts","../src/types/schemas.ts","../src/core/parser.ts","../src/core/discovery.ts","../src/core/plugins.ts","../src/core/registry.ts"],"sourcesContent":[],"mappings":";;;;;;AAGY,KAAA,aAAA,GAAa,MAAA,GAAA,SAAA,GAAA,QAAA;AACb,KAAA,aAAA,GAAa,QAAA,GAAA,OAAA,GAAA,MAAA;AAKzB;AA8BA;AAUA;AASiB,UAjDA,aAAA,CAiDW;EAYX;;;;ECnEJ;EAaA,QAAA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K,EAAA,MAAA,CAAA;;UI9CT,eAAA;UACP;EHxBG,WAAA,EGyBE,oBHzBsB;AAarC;AAaA;AAiBA;AAcA;UG1BU,mBAAA;;;AF7BV;UEkCiB,gBAAA;;eAEF,eAAe;;mBAEX;;;;;;;EFtCgB;EAAA,OAAA,CAAA,EAAA,MAAA;AAQnC;UEiIU,WAAA;aACG;;eAEE;;;;;;AFxHF,iBE+HG,kBAAA,CF5Hd,OAAA,EAAA,MAAA,EAAA;EAAA,QAAA;EAAA,SAAA;EAAA,WAAA;EAAA;AAAA,CAAA,EE8HsE,WF9HtE,EAAA,QAAA,EE+HU,aF/HV,EAAA,OAAA,CAAA,EAAA,MAAA,EAAA,KAAA,CAAA,EAAA,MAAA,CAAA,EEkIC,aFlID,EAAA;;;;iBE8Lc,cAAA,WAAwB,mBAAwB;;;;iBA8EhD,SAAA,WAAoB,gBAAgB;;;AJ/RnC,UKaA,sBAAA,CLLL;EAsBK,WAAM,CAAA,EAAA,MAAQ;EAUd,WAAA,CAAA,EAAA,MAAgB;EAShB,OAAA,CAAA,EAAA,MAAW;AAY5B;;;AAnEY,KMMA,oBAAA,GAAuB,gBNNV,GMM6B,sBNN7B;AACzB;AAKA;AA8BA;AAUiB,cM1BJ,aAAA,CN0BoB;EAShB,QAAA,OAAW;EAYX,QAAA,MAAA;;wBMpCc;;AL/B/B;AAaA;EAaa,OAAA,CAAA,CAAA,EAAA,IAAA;EAiBA;AAcb;;YK2CY;;AJlGZ;;sBIyGsB;;;;;;;;sBAgDA;;;;EJjJT,QAAA,cAOX;;;;;;;gBImKc;IJ1Kc,UAAA,EI2Kd,MJ3Kc,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,kBAAA,EAAA,MAAA,EAAA;IAYjB,aAAA,EAAA,MAGX,EAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/skill.ts","../src/types/errors.ts","../src/types/schemas.ts","../src/core/parser.ts","../src/core/discovery.ts","../src/core/plugins.ts","../src/core/regist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InstalledPluginsSchema, E as validateSkillFile, G as CcskiError, J as ValidationError, K as ParseError, O as PluginEntrySchema, T as parseSkillFile, W as AmbiguousSkillNameError, c as getDefaultSkillDirectories, k as SkillFrontmatterSchema, l as loadSkill, q as SkillNotFoundError, s as discoverSkills, t as SkillRegistry, u as scanSkillDirectory } from "./registry-Do2Htns7.mjs";
1
+ import { A as SkillFrontmatterSchema, D as ClaudeSettingsSchema, E as validateSkillFile, G as AmbiguousSkillNameError, J as SkillNotFoundError, K as CcskiError, O as InstalledPluginsSchema, T as parseSkillFile, Y as ValidationError, c as getDefaultSkillDirectories, k as PluginEntrySchema, l as loadSkill, q as ParseError, s as discoverSkills, t as SkillRegistry, u as scanSkillDirectory } from "./registry-DNMfmLqa.mjs";
2
2
 
3
- export { AmbiguousSkillNameError, CcskiError, InstalledPluginsSchema, ParseError, PluginEntrySchema, SkillFrontmatterSchema, SkillNotFoundError, SkillRegistry, ValidationError, discoverSkills, getDefaultSkillDirectories, loadSkill, parseSkillFile, scanSkillDirectory, validateSkillFile };
3
+ export { AmbiguousSkillNameError, CcskiError, ClaudeSettingsSchema, InstalledPluginsSchema, ParseError, PluginEntrySchema, SkillFrontmatterSchema, SkillNotFoundError, SkillRegistry, ValidationError, discoverSkills, getDefaultSkillDirectories, loadSkill, parseSkillFile, scanSkillDirectory, validateSkillFile };
@@ -3657,15 +3657,20 @@ const PluginEntrySchema = objectType({
3657
3657
  lastUpdated: stringType(),
3658
3658
  installPath: stringType(),
3659
3659
  gitCommitSha: stringType(),
3660
- isLocal: booleanType()
3661
- });
3660
+ isLocal: booleanType(),
3661
+ scope: stringType().optional()
3662
+ }).passthrough();
3662
3663
  /**
3663
3664
  * Schema for installed_plugins.json
3664
3665
  */
3665
3666
  const InstalledPluginsSchema = objectType({
3666
3667
  version: numberType(),
3667
- plugins: recordType(stringType(), PluginEntrySchema)
3668
+ plugins: recordType(stringType(), unionType([PluginEntrySchema, arrayType(PluginEntrySchema)]))
3668
3669
  });
3670
+ /**
3671
+ * Schema for Claude settings.json (subset we care about)
3672
+ */
3673
+ const ClaudeSettingsSchema = objectType({ enabledPlugins: recordType(stringType(), booleanType()).optional() }).passthrough();
3669
3674
 
3670
3675
  //#endregion
3671
3676
  //#region node_modules/.pnpm/kind-of@6.0.3/node_modules/kind-of/index.js
@@ -12558,9 +12563,42 @@ function defaultPluginsFile(userDir) {
12558
12563
  function defaultPluginsRoot(userDir) {
12559
12564
  return join(userDir, ".claude/plugins");
12560
12565
  }
12566
+ function defaultSettingsFile(userDir) {
12567
+ return join(userDir, ".claude/settings.json");
12568
+ }
12561
12569
  function resolveInstallPath(rawPath, pluginsRoot) {
12562
12570
  return isAbsolute(rawPath) ? rawPath : join(pluginsRoot, rawPath);
12563
12571
  }
12572
+ function normalizePluginEntries(entry) {
12573
+ return Array.isArray(entry) ? entry : [entry];
12574
+ }
12575
+ function loadClaudeSettings(settingsFile, diagnostics) {
12576
+ if (!existsSync(settingsFile)) {
12577
+ diagnostics?.warnings.push(`Settings file not found at ${settingsFile}`);
12578
+ return null;
12579
+ }
12580
+ try {
12581
+ const content = readFileSync(settingsFile, "utf-8");
12582
+ const json = JSON.parse(content);
12583
+ const validation = ClaudeSettingsSchema.safeParse(json);
12584
+ if (!validation.success) {
12585
+ console.warn(colors.yellow(`Warning: Invalid settings.json format:`), validation.error);
12586
+ diagnostics?.warnings.push("Invalid settings.json format");
12587
+ return null;
12588
+ }
12589
+ return validation.data;
12590
+ } catch (error$1) {
12591
+ console.warn(colors.yellow(`Warning: Failed to load settings.json:`), error$1);
12592
+ diagnostics?.warnings.push(`Failed to load settings.json: ${error$1 instanceof Error ? error$1.message : String(error$1)}`);
12593
+ return null;
12594
+ }
12595
+ }
12596
+ function resolveEnabledPlugins(settings) {
12597
+ const enabledPlugins = settings?.enabledPlugins;
12598
+ if (!enabledPlugins) return null;
12599
+ const enabled = Object.entries(enabledPlugins).filter(([, isEnabled]) => isEnabled).map(([pluginKey]) => pluginKey);
12600
+ return new Set(enabled);
12601
+ }
12564
12602
  /**
12565
12603
  * Parse installed_plugins.json
12566
12604
  */
@@ -12617,54 +12655,64 @@ function discoverPluginSkills(options = {}) {
12617
12655
  const userDir = options.userDir ? resolve(options.userDir) : homedir();
12618
12656
  const pluginsFile = options.pluginsFile ?? defaultPluginsFile(userDir);
12619
12657
  diagnostics.scannedPlugins.push(pluginsFile);
12658
+ const settingsFile = options.settingsFile ?? defaultSettingsFile(userDir);
12620
12659
  const skills = [];
12621
12660
  const seenPaths = /* @__PURE__ */ new Set();
12622
12661
  const pluginsRoot = options.pluginsRoot ?? defaultPluginsRoot(userDir);
12623
12662
  let missingOrEmpty = false;
12624
12663
  const plugins = loadInstalledPlugins(pluginsFile, diagnostics);
12664
+ const enabledPlugins = resolveEnabledPlugins(loadClaudeSettings(settingsFile, diagnostics));
12625
12665
  log("plugins file=%s loaded=%s", pluginsFile, Boolean(plugins));
12666
+ log("settings file=%s enabledPlugins=%s", settingsFile, enabledPlugins?.size ?? "all");
12626
12667
  if (plugins) for (const [pluginKey, plugin] of Object.entries(plugins.plugins)) {
12668
+ if (enabledPlugins && !enabledPlugins.has(pluginKey)) {
12669
+ log("plugin %s disabled by settings", pluginKey);
12670
+ continue;
12671
+ }
12627
12672
  const [pluginName, marketplace] = pluginKey.split("@");
12628
12673
  if (!pluginName || !marketplace) continue;
12629
- const installPath = resolveInstallPath(plugin.installPath, pluginsRoot);
12630
- const skillFiles = findSkillFiles(installPath, diagnostics);
12631
- if (!skillFiles.length) {
12632
- if (!existsSync(installPath)) {
12633
- diagnostics.warnings.push(`Plugin install path not found: ${installPath}`);
12634
- log("missing installPath: %s", installPath);
12635
- } else {
12636
- diagnostics.warnings.push(`No skills found in plugin install path: ${installPath}`);
12637
- log("empty installPath: %s", installPath);
12638
- }
12639
- missingOrEmpty = true;
12640
- }
12641
- diagnostics.scannedPlugins.push(installPath);
12642
- log("scanned manifest plugin=%s skills=%d", pluginName, skillFiles.length);
12643
- for (const skillFile of skillFiles) try {
12644
- const parsed = parseSkillFile(skillFile);
12645
- const skillDir = dirname(skillFile);
12646
- if (seenPaths.has(skillDir)) continue;
12647
- const skillName = parsed.frontmatter.name;
12648
- const namespaced = skillName.includes(":") ? skillName : pluginName === skillName ? skillName : `${pluginName}:${skillName}`;
12649
- skills.push({
12650
- name: namespaced,
12651
- description: parsed.frontmatter.description,
12652
- provider: "claude",
12653
- location: "plugin",
12654
- path: skillDir,
12655
- hasReferences: existsSync(join(skillDir, "references")),
12656
- hasScripts: existsSync(join(skillDir, "scripts")),
12657
- hasAssets: existsSync(join(skillDir, "assets")),
12658
- pluginInfo: {
12659
- pluginName,
12660
- marketplace,
12661
- version: plugin.version
12674
+ const entries = normalizePluginEntries(plugin);
12675
+ for (const entry of entries) {
12676
+ const installPath = resolveInstallPath(entry.installPath, pluginsRoot);
12677
+ const skillFiles = findSkillFiles(installPath, diagnostics);
12678
+ if (!skillFiles.length) {
12679
+ if (!existsSync(installPath)) {
12680
+ diagnostics.warnings.push(`Plugin install path not found: ${installPath}`);
12681
+ log("missing installPath: %s", installPath);
12682
+ } else {
12683
+ diagnostics.warnings.push(`No skills found in plugin install path: ${installPath}`);
12684
+ log("empty installPath: %s", installPath);
12662
12685
  }
12663
- });
12664
- seenPaths.add(skillDir);
12665
- } catch (error$1) {
12666
- console.warn(colors.yellow(`Warning: Failed to parse plugin skill ${skillFile}:`), error$1);
12667
- diagnostics.warnings.push(`Failed to parse plugin skill ${skillFile}: ${error$1 instanceof Error ? error$1.message : String(error$1)}`);
12686
+ missingOrEmpty = true;
12687
+ }
12688
+ diagnostics.scannedPlugins.push(installPath);
12689
+ log("scanned manifest plugin=%s skills=%d", pluginName, skillFiles.length);
12690
+ for (const skillFile of skillFiles) try {
12691
+ const parsed = parseSkillFile(skillFile);
12692
+ const skillDir = dirname(skillFile);
12693
+ if (seenPaths.has(skillDir)) continue;
12694
+ const skillName = parsed.frontmatter.name;
12695
+ const namespaced = skillName.includes(":") ? skillName : pluginName === skillName ? skillName : `${pluginName}:${skillName}`;
12696
+ skills.push({
12697
+ name: namespaced,
12698
+ description: parsed.frontmatter.description,
12699
+ provider: "claude",
12700
+ location: "plugin",
12701
+ path: skillDir,
12702
+ hasReferences: existsSync(join(skillDir, "references")),
12703
+ hasScripts: existsSync(join(skillDir, "scripts")),
12704
+ hasAssets: existsSync(join(skillDir, "assets")),
12705
+ pluginInfo: {
12706
+ pluginName,
12707
+ marketplace,
12708
+ version: entry.version
12709
+ }
12710
+ });
12711
+ seenPaths.add(skillDir);
12712
+ } catch (error$1) {
12713
+ console.warn(colors.yellow(`Warning: Failed to parse plugin skill ${skillFile}:`), error$1);
12714
+ diagnostics.warnings.push(`Failed to parse plugin skill ${skillFile}: ${error$1 instanceof Error ? error$1.message : String(error$1)}`);
12715
+ }
12668
12716
  }
12669
12717
  }
12670
12718
  if (!(process.env.CCSKI_CLAUDE_PLUGINS_FALLBACK === "true")) {
@@ -12674,6 +12722,13 @@ function discoverPluginSkills(options = {}) {
12674
12722
  diagnostics
12675
12723
  };
12676
12724
  }
12725
+ if (enabledPlugins) {
12726
+ log("fallback scan skipped (enabledPlugins present)");
12727
+ return {
12728
+ skills,
12729
+ diagnostics
12730
+ };
12731
+ }
12677
12732
  if (!plugins || skills.length === 0 || missingOrEmpty) {
12678
12733
  const fallbackRoot = join(pluginsRoot, "skills");
12679
12734
  diagnostics.scannedPlugins.push(fallbackRoot);
@@ -13522,5 +13577,5 @@ var SkillRegistry = class {
13522
13577
  };
13523
13578
 
13524
13579
  //#endregion
13525
- export { arrayType as A, recordType as B, warn as C, InstalledPluginsSchema as D, validateSkillFile as E, intersectionType as F, CcskiError as G, unionType as H, literalType as I, ValidationError as J, ParseError as K, numberType as L, custom as M, discriminatedUnionType as N, PluginEntrySchema as O, enumType as P, objectType as R, tone as S, parseSkillFile as T, unknownType as U, stringType as V, AmbiguousSkillNameError as W, highlight$1 as _, containsCaseInsensitive as a, setColorEnabled as b, getDefaultSkillDirectories as c, colors as d, dim as f, heading as g, formatBytes as h, skillAliases as i, booleanType as j, SkillFrontmatterSchema as k, loadSkill as l, error as m, formatSkillId as n, rankStrings as o, duplicateBadge as p, SkillNotFoundError as q, formatSkillLabel as r, discoverSkills as s, SkillRegistry as t, scanSkillDirectory as u, info as v, wrap as w, success as x, renderList as y, optionalType as z };
13526
- //# sourceMappingURL=registry-Do2Htns7.mjs.map
13580
+ export { SkillFrontmatterSchema as A, optionalType as B, warn as C, ClaudeSettingsSchema as D, validateSkillFile as E, enumType as F, AmbiguousSkillNameError as G, stringType as H, intersectionType as I, SkillNotFoundError as J, CcskiError as K, literalType as L, booleanType as M, custom as N, InstalledPluginsSchema as O, discriminatedUnionType as P, numberType as R, tone as S, parseSkillFile as T, unionType as U, recordType as V, unknownType as W, ValidationError as Y, highlight$1 as _, containsCaseInsensitive as a, setColorEnabled as b, getDefaultSkillDirectories as c, colors as d, dim as f, heading as g, formatBytes as h, skillAliases as i, arrayType as j, PluginEntrySchema as k, loadSkill as l, error as m, formatSkillId as n, rankStrings as o, duplicateBadge as p, ParseError as q, formatSkillLabel as r, discoverSkills as s, SkillRegistry as t, scanSkillDirectory as u, info as v, wrap as w, success as x, renderList as y, objectType as z };
13581
+ //# sourceMappingURL=registry-DNMfmLqa.mjs.map