@claude-collective/cli 0.25.1 → 0.26.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.
Files changed (63) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/{chunk-MH66WDFV.js → chunk-4357L7VK.js} +2 -2
  3. package/dist/{chunk-4WGN6SUE.js → chunk-7UPXT32F.js} +2 -2
  4. package/dist/{chunk-YDBSSAJ6.js → chunk-ETQ3BPGU.js} +123 -126
  5. package/dist/chunk-ETQ3BPGU.js.map +1 -0
  6. package/dist/{chunk-IAYAE6MG.js → chunk-I3YYG5IO.js} +2 -2
  7. package/dist/{chunk-NRC7XYCI.js → chunk-R5KJVI54.js} +105 -5
  8. package/dist/chunk-R5KJVI54.js.map +1 -0
  9. package/dist/{chunk-MTPM7BX5.js → chunk-R7B63JAP.js} +5 -5
  10. package/dist/{chunk-WXS4S3MA.js → chunk-TDZE4TDG.js} +2 -2
  11. package/dist/commands/build/marketplace.js +7 -8
  12. package/dist/commands/build/marketplace.js.map +1 -1
  13. package/dist/commands/build/plugins.js +24 -4
  14. package/dist/commands/build/plugins.js.map +1 -1
  15. package/dist/commands/build/stack.js +2 -2
  16. package/dist/commands/compile.js +2 -2
  17. package/dist/commands/config/get.js +1 -1
  18. package/dist/commands/config/index.js +2 -2
  19. package/dist/commands/config/path.js +1 -1
  20. package/dist/commands/config/set-project.js +1 -1
  21. package/dist/commands/config/show.js +2 -2
  22. package/dist/commands/config/unset-project.js +1 -1
  23. package/dist/commands/diff.js +1 -1
  24. package/dist/commands/doctor.js +1 -1
  25. package/dist/commands/edit.js +31 -6
  26. package/dist/commands/edit.js.map +1 -1
  27. package/dist/commands/eject.js +1 -1
  28. package/dist/commands/import/skill.js +1 -1
  29. package/dist/commands/info.js +1 -1
  30. package/dist/commands/init.js +63 -10
  31. package/dist/commands/init.js.map +1 -1
  32. package/dist/commands/list.js +1 -1
  33. package/dist/commands/new/agent.js +1 -1
  34. package/dist/commands/new/skill.js +1 -1
  35. package/dist/commands/outdated.js +1 -1
  36. package/dist/commands/search.js +1 -1
  37. package/dist/commands/uninstall.js +1 -1
  38. package/dist/commands/update.js +2 -2
  39. package/dist/commands/validate.js +1 -1
  40. package/dist/commands/version/bump.js +1 -1
  41. package/dist/commands/version/index.js +1 -1
  42. package/dist/commands/version/set.js +1 -1
  43. package/dist/commands/version/show.js +1 -1
  44. package/dist/components/wizard/step-build.js +2 -2
  45. package/dist/components/wizard/step-build.test.js +2 -2
  46. package/dist/components/wizard/step-settings.js +2 -2
  47. package/dist/components/wizard/step-settings.test.js +5 -5
  48. package/dist/components/wizard/step-sources.js +2 -2
  49. package/dist/components/wizard/step-sources.test.js +2 -2
  50. package/dist/components/wizard/wizard.js +5 -5
  51. package/dist/hooks/init.js +1 -1
  52. package/dist/{source-manager-DSYZEVGZ.js → source-manager-EYO3F2DV.js} +2 -2
  53. package/dist/src/agents/_templates/agent.liquid +1 -1
  54. package/package.json +1 -1
  55. package/src/agents/_templates/agent.liquid +1 -1
  56. package/dist/chunk-NRC7XYCI.js.map +0 -1
  57. package/dist/chunk-YDBSSAJ6.js.map +0 -1
  58. /package/dist/{chunk-MH66WDFV.js.map → chunk-4357L7VK.js.map} +0 -0
  59. /package/dist/{chunk-4WGN6SUE.js.map → chunk-7UPXT32F.js.map} +0 -0
  60. /package/dist/{chunk-IAYAE6MG.js.map → chunk-I3YYG5IO.js.map} +0 -0
  61. /package/dist/{chunk-MTPM7BX5.js.map → chunk-R7B63JAP.js.map} +0 -0
  62. /package/dist/{chunk-WXS4S3MA.js.map → chunk-TDZE4TDG.js.map} +0 -0
  63. /package/dist/{source-manager-DSYZEVGZ.js.map → source-manager-EYO3F2DV.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.26.0] - 2026-02-13
9
+
10
+ ### Added
11
+
12
+ - **Plugin-aware agent compilation** — `compileAgentForPlugin()` accepts `installMode` parameter. When `"plugin"`, emits fully-qualified `PluginSkillRef` format (`skill-id:skill-id`) in both preloaded frontmatter and dynamic skill invocations. New `PluginSkillRef` template literal type enforces the format at compile time.
13
+ - **Stacks from source** — Source loader loads `config/stacks.yaml` from the marketplace source repository before falling back to the CLI's built-in stacks. Private marketplaces can now define custom stack configurations visible to consumers.
14
+ - **Individual skill plugin installation** — New `installIndividualPlugins()` in `cc init` installs each selected skill as a native Claude Code plugin via `claude plugin install {id}@{marketplace}` when Plugin Mode is used without a stack.
15
+ - **Plugin-aware edit flow** — `cc edit` installs new skill plugins and uninstalls removed ones when in Plugin Mode with a marketplace. Uses non-fatal warnings for individual install failures.
16
+ - **Agent plugin compiler** — New `agent-plugin-compiler.ts` compiles agent partials into standalone Claude Code plugins. `cc build plugins --agents-dir` flag enables building agent plugins alongside skill plugins.
17
+ - **Shared plugin versioning** — Content-hash version bumping utilities extracted to `versioning.ts` and shared across skill, agent, and stack plugin compilers.
18
+ - **Marketplace creation guide** — `docs/creating-a-marketplace.md` covers manual and automated marketplace creation, consumer installation flow, and private repo authentication.
19
+ - **Marketplace migration guide** — `docs/migrate-to-marketplace.md` with step-by-step instructions for converting an existing CC repo into a publishable marketplace.
20
+
21
+ ### Changed
22
+
23
+ - **Plugin names match skill IDs** — `SKILL_PLUGIN_PREFIX` changed from `"skill-"` to `""`. Plugin names are now bare skill IDs (e.g., `web-framework-react` instead of `skill-web-framework-react`). Marketplace generator category patterns updated to match unprefixed names.
24
+ - **`installMode` threaded through compilation** — `installMode` flows from `wizardResult.installMode` through `local-installer.ts` and from `projectConfig.installMode` through `agent-recompiler.ts` to `compileAgentForPlugin()`.
25
+
8
26
  ## [0.25.1] - 2026-02-13
9
27
 
10
28
  ### Changed
@@ -12,7 +12,7 @@ import {
12
12
  resolveAlias,
13
13
  resolveAllSources,
14
14
  searchExtraSources
15
- } from "./chunk-YDBSSAJ6.js";
15
+ } from "./chunk-ETQ3BPGU.js";
16
16
  import {
17
17
  warn
18
18
  } from "./chunk-ZDREFYD2.js";
@@ -248,4 +248,4 @@ var StepSources = ({
248
248
  export {
249
249
  StepSources
250
250
  };
251
- //# sourceMappingURL=chunk-MH66WDFV.js.map
251
+ //# sourceMappingURL=chunk-4357L7VK.js.map
@@ -7,7 +7,7 @@ import {
7
7
  addSource,
8
8
  getSourceSummary,
9
9
  removeSource
10
- } from "./chunk-YDBSSAJ6.js";
10
+ } from "./chunk-ETQ3BPGU.js";
11
11
  import {
12
12
  init_esm_shims
13
13
  } from "./chunk-AWKZ5BDL.js";
@@ -194,4 +194,4 @@ var StepSettings = ({ projectDir, onClose }) => {
194
194
  export {
195
195
  StepSettings
196
196
  };
197
- //# sourceMappingURL=chunk-4WGN6SUE.js.map
197
+ //# sourceMappingURL=chunk-7UPXT32F.js.map
@@ -279,6 +279,59 @@ async function hashSkillFolder(skillPath) {
279
279
  const combined = contents.join("\n---\n");
280
280
  return hashString(combined);
281
281
  }
282
+ var CONTENT_HASH_FILE = ".content-hash";
283
+ function parseMajorVersion(version) {
284
+ const match = version.match(/^(\d+)\./);
285
+ return match ? parseInt(match[1], 10) : 1;
286
+ }
287
+ function bumpMajorVersion(version) {
288
+ const major = parseMajorVersion(version);
289
+ return `${major + 1}.0.0`;
290
+ }
291
+ async function readExistingPluginManifest(pluginDir, getManifestPath) {
292
+ const manifestPath = getManifestPath(pluginDir);
293
+ if (!await fileExists(manifestPath)) {
294
+ return null;
295
+ }
296
+ try {
297
+ const content = await readFile(manifestPath);
298
+ const manifest = pluginManifestSchema.parse(JSON.parse(content));
299
+ const hashFilePath = manifestPath.replace("plugin.json", CONTENT_HASH_FILE);
300
+ let contentHash;
301
+ if (await fileExists(hashFilePath)) {
302
+ contentHash = (await readFile(hashFilePath)).trim();
303
+ }
304
+ return {
305
+ version: manifest.version ?? DEFAULT_VERSION,
306
+ contentHash
307
+ };
308
+ } catch {
309
+ return null;
310
+ }
311
+ }
312
+ async function determinePluginVersion(newHash, pluginDir, getManifestPath) {
313
+ const existing = await readExistingPluginManifest(pluginDir, getManifestPath);
314
+ if (!existing) {
315
+ return {
316
+ version: DEFAULT_VERSION,
317
+ contentHash: newHash
318
+ };
319
+ }
320
+ if (existing.contentHash !== newHash) {
321
+ return {
322
+ version: bumpMajorVersion(existing.version),
323
+ contentHash: newHash
324
+ };
325
+ }
326
+ return {
327
+ version: existing.version,
328
+ contentHash: newHash
329
+ };
330
+ }
331
+ async function writeContentHash(pluginDir, contentHash, getManifestPath) {
332
+ const hashFilePath = getManifestPath(pluginDir).replace("plugin.json", CONTENT_HASH_FILE);
333
+ await writeFile(hashFilePath, contentHash);
334
+ }
282
335
 
283
336
  // src/cli/lib/skills/skill-metadata.ts
284
337
  async function readForkedFromMetadata(skillDir) {
@@ -1422,7 +1475,8 @@ init_esm_shims();
1422
1475
  import path7 from "path";
1423
1476
  var PLUGIN_DIR_NAME = ".claude-plugin";
1424
1477
  var PLUGIN_MANIFEST_FILE2 = "plugin.json";
1425
- var SKILL_PLUGIN_PREFIX = "skill-";
1478
+ var SKILL_PLUGIN_PREFIX = "";
1479
+ var AGENT_PLUGIN_PREFIX = "agent-";
1426
1480
  function buildAuthor(name, email) {
1427
1481
  if (!name) {
1428
1482
  return void 0;
@@ -1451,6 +1505,17 @@ function generateSkillPluginManifest(options) {
1451
1505
  }
1452
1506
  return manifest;
1453
1507
  }
1508
+ function generateAgentPluginManifest(options) {
1509
+ const manifest = {
1510
+ name: `${AGENT_PLUGIN_PREFIX}${options.agentName}`,
1511
+ version: options.version ?? DEFAULT_VERSION,
1512
+ agents: "./agents/"
1513
+ };
1514
+ if (options.description) {
1515
+ manifest.description = options.description;
1516
+ }
1517
+ return manifest;
1518
+ }
1454
1519
  function generateStackPluginManifest(options) {
1455
1520
  const manifest = {
1456
1521
  name: options.stackName,
@@ -1870,36 +1935,6 @@ async function createLiquidEngine(projectDir) {
1870
1935
 
1871
1936
  // src/cli/lib/stacks/stack-plugin-compiler.ts
1872
1937
  import { unique as unique2 } from "remeda";
1873
- var CONTENT_HASH_FILE = ".content-hash";
1874
- function parseMajorVersion(version) {
1875
- const match = version.match(/^(\d+)\./);
1876
- return match ? parseInt(match[1], 10) : 1;
1877
- }
1878
- function bumpMajorVersion(version) {
1879
- const major = parseMajorVersion(version);
1880
- return `${major + 1}.0.0`;
1881
- }
1882
- async function readExistingManifest(pluginDir) {
1883
- const manifestPath = getPluginManifestPath(pluginDir);
1884
- if (!await fileExists(manifestPath)) {
1885
- return null;
1886
- }
1887
- try {
1888
- const content = await readFile(manifestPath);
1889
- const manifest = pluginManifestSchema.parse(JSON.parse(content));
1890
- const hashFilePath = manifestPath.replace("plugin.json", CONTENT_HASH_FILE);
1891
- let contentHash;
1892
- if (await fileExists(hashFilePath)) {
1893
- contentHash = (await readFile(hashFilePath)).trim();
1894
- }
1895
- return {
1896
- version: manifest.version ?? DEFAULT_VERSION,
1897
- contentHash
1898
- };
1899
- } catch {
1900
- return null;
1901
- }
1902
- }
1903
1938
  function hashStackConfig(stack) {
1904
1939
  const stackSkillIds = stack.stack ? [...new Set(Object.values(stack.stack).flatMap((a) => Object.values(a)))].sort() : [];
1905
1940
  const parts = [
@@ -1910,27 +1945,7 @@ function hashStackConfig(stack) {
1910
1945
  ];
1911
1946
  return hashString(parts.join("\n"));
1912
1947
  }
1913
- async function determineStackVersion(stack, pluginDir) {
1914
- const newHash = hashStackConfig(stack);
1915
- const existing = await readExistingManifest(pluginDir);
1916
- if (!existing) {
1917
- return {
1918
- version: DEFAULT_VERSION,
1919
- contentHash: newHash
1920
- };
1921
- }
1922
- if (existing.contentHash !== newHash) {
1923
- return {
1924
- version: bumpMajorVersion(existing.version),
1925
- contentHash: newHash
1926
- };
1927
- }
1928
- return {
1929
- version: existing.version,
1930
- contentHash: newHash
1931
- };
1932
- }
1933
- async function compileAgentForPlugin(name, agent, fallbackRoot, engine) {
1948
+ async function compileAgentForPlugin(name, agent, fallbackRoot, engine, installMode) {
1934
1949
  verbose(`Compiling agent: ${name}`);
1935
1950
  const agentSourceRoot = agent.sourceRoot || fallbackRoot;
1936
1951
  const agentBaseDir = agent.agentBaseDir || DIRS.agents;
@@ -1956,9 +1971,10 @@ async function compileAgentForPlugin(name, agent, fallbackRoot, engine) {
1956
1971
  if (!outputFormat) {
1957
1972
  outputFormat = await readFileOptional(path13.join(categoryDir, "output-format.md"), "");
1958
1973
  }
1959
- const preloadedSkills = agent.skills.filter((s) => s.preloaded);
1960
- const dynamicSkills = agent.skills.filter((s) => !s.preloaded);
1961
- const preloadedSkillIds = preloadedSkills.map((s) => s.id);
1974
+ const skills = installMode === "plugin" ? agent.skills.map((s) => ({ ...s, pluginRef: `${s.id}:${s.id}` })) : agent.skills;
1975
+ const preloadedSkills = skills.filter((s) => s.preloaded);
1976
+ const dynamicSkills = skills.filter((s) => !s.preloaded);
1977
+ const preloadedSkillIds = preloadedSkills.map((s) => s.pluginRef ?? s.id);
1962
1978
  verbose(
1963
1979
  `Skills for ${name}: ${preloadedSkills.length} preloaded, ${dynamicSkills.length} dynamic`
1964
1980
  );
@@ -1970,7 +1986,7 @@ async function compileAgentForPlugin(name, agent, fallbackRoot, engine) {
1970
1986
  criticalRequirementsTop,
1971
1987
  criticalReminders,
1972
1988
  outputFormat,
1973
- skills: agent.skills,
1989
+ skills,
1974
1990
  preloadedSkills,
1975
1991
  dynamicSkills,
1976
1992
  preloadedSkillIds
@@ -2078,7 +2094,7 @@ async function compileStackPlugin(options) {
2078
2094
  const pluginSkillsDir = path13.join(pluginDir, "skills");
2079
2095
  await ensureDir(pluginSkillsDir);
2080
2096
  const copiedSourcePaths = /* @__PURE__ */ new Set();
2081
- for (const [, resolvedSkill] of Object.entries(skills)) {
2097
+ for (const resolvedSkill of Object.values(skills)) {
2082
2098
  const sourceSkillDir = path13.join(projectRoot, resolvedSkill.path);
2083
2099
  if (copiedSourcePaths.has(resolvedSkill.path)) {
2084
2100
  continue;
@@ -2111,7 +2127,12 @@ async function compileStackPlugin(options) {
2111
2127
  await writeFile(path13.join(pluginDir, "CLAUDE.md"), claudeContent);
2112
2128
  verbose(` Copied CLAUDE.md`);
2113
2129
  }
2114
- const { version, contentHash } = await determineStackVersion(stack, pluginDir);
2130
+ const newHash = hashStackConfig(stack);
2131
+ const { version, contentHash } = await determinePluginVersion(
2132
+ newHash,
2133
+ pluginDir,
2134
+ getPluginManifestPath
2135
+ );
2115
2136
  const uniqueSkillPlugins = unique2(allSkillPlugins);
2116
2137
  const manifest = generateStackPluginManifest({
2117
2138
  stackName: stackId,
@@ -2124,8 +2145,7 @@ async function compileStackPlugin(options) {
2124
2145
  hasSkills: true
2125
2146
  });
2126
2147
  await writePluginManifest(pluginDir, manifest);
2127
- const hashFilePath = getPluginManifestPath(pluginDir).replace("plugin.json", CONTENT_HASH_FILE);
2128
- await writeFile(hashFilePath, contentHash);
2148
+ await writeContentHash(pluginDir, contentHash, getPluginManifestPath);
2129
2149
  verbose(` Wrote plugin.json (v${version})`);
2130
2150
  const readme = generateStackReadme(stackId, stack, compiledAgentNames, uniqueSkillPlugins);
2131
2151
  await writeFile(path13.join(pluginDir, "README.md"), readme);
@@ -2340,7 +2360,13 @@ function buildLocalSkillsMap(copiedSkills, matrix) {
2340
2360
  return localSkillsForResolution;
2341
2361
  }
2342
2362
  async function buildLocalConfig(wizardResult, sourceResult) {
2343
- const loadedStack = wizardResult.selectedStackId ? await loadStackById(wizardResult.selectedStackId, PROJECT_ROOT) : null;
2363
+ let loadedStack = null;
2364
+ if (wizardResult.selectedStackId) {
2365
+ loadedStack = await loadStackById(wizardResult.selectedStackId, sourceResult.sourcePath);
2366
+ if (!loadedStack) {
2367
+ loadedStack = await loadStackById(wizardResult.selectedStackId, PROJECT_ROOT);
2368
+ }
2369
+ }
2344
2370
  let localConfig;
2345
2371
  if (wizardResult.selectedStackId) {
2346
2372
  if (loadedStack) {
@@ -2392,7 +2418,7 @@ function buildCompileAgents(config, agents) {
2392
2418
  }
2393
2419
  return compileAgents;
2394
2420
  }
2395
- async function compileAndWriteAgents(compileConfig, agents, localSkills, sourceResult, projectDir, agentsDir) {
2421
+ async function compileAndWriteAgents(compileConfig, agents, localSkills, sourceResult, projectDir, agentsDir, installMode) {
2396
2422
  const engine = await createLiquidEngine(projectDir);
2397
2423
  const resolvedAgents = await resolveAgents(
2398
2424
  agents,
@@ -2402,7 +2428,13 @@ async function compileAndWriteAgents(compileConfig, agents, localSkills, sourceR
2402
2428
  );
2403
2429
  const compiledAgentNames = [];
2404
2430
  for (const [name, agent] of typedEntries(resolvedAgents)) {
2405
- const output = await compileAgentForPlugin(name, agent, sourceResult.sourcePath, engine);
2431
+ const output = await compileAgentForPlugin(
2432
+ name,
2433
+ agent,
2434
+ sourceResult.sourcePath,
2435
+ engine,
2436
+ installMode
2437
+ );
2406
2438
  await writeFile(path15.join(agentsDir, `${name}.md`), output);
2407
2439
  compiledAgentNames.push(name);
2408
2440
  }
@@ -2455,7 +2487,8 @@ async function installLocal(options) {
2455
2487
  localSkillsForResolution,
2456
2488
  sourceResult,
2457
2489
  projectDir,
2458
- localAgentsDir
2490
+ localAgentsDir,
2491
+ wizardResult.installMode
2459
2492
  );
2460
2493
  return {
2461
2494
  copiedSkills,
@@ -3112,12 +3145,14 @@ async function loadFromLocal(source, sourceConfig) {
3112
3145
  const matrix = await loadSkillsMatrix(matrixPath);
3113
3146
  const skills = await extractAllSkills(skillsDir);
3114
3147
  const mergedMatrix = await mergeMatrixWithSkills(matrix, skills);
3115
- const stacks = await loadStacks(PROJECT_ROOT);
3148
+ const sourceStacks = await loadStacks(skillsPath);
3149
+ const stacks = sourceStacks.length > 0 ? sourceStacks : await loadStacks(PROJECT_ROOT);
3116
3150
  if (stacks.length > 0) {
3117
3151
  mergedMatrix.suggestedStacks = stacks.map(
3118
3152
  (stack) => stackToResolvedStack(stack, mergedMatrix.displayNameToId)
3119
3153
  );
3120
- verbose(`Loaded ${stacks.length} stacks from config/stacks.yaml`);
3154
+ const stackSource = sourceStacks.length > 0 ? "source" : "CLI";
3155
+ verbose(`Loaded ${stacks.length} stacks from ${stackSource}`);
3121
3156
  }
3122
3157
  return {
3123
3158
  matrix: mergedMatrix,
@@ -3146,12 +3181,14 @@ async function loadFromRemote(source, sourceConfig, forceRefresh) {
3146
3181
  const matrix = await loadSkillsMatrix(matrixPath);
3147
3182
  const skills = await extractAllSkills(skillsDir);
3148
3183
  const mergedMatrix = await mergeMatrixWithSkills(matrix, skills);
3149
- const stacks = await loadStacks(PROJECT_ROOT);
3184
+ const sourceStacks = await loadStacks(fetchResult.path);
3185
+ const stacks = sourceStacks.length > 0 ? sourceStacks : await loadStacks(PROJECT_ROOT);
3150
3186
  if (stacks.length > 0) {
3151
3187
  mergedMatrix.suggestedStacks = stacks.map(
3152
3188
  (stack) => stackToResolvedStack(stack, mergedMatrix.displayNameToId)
3153
3189
  );
3154
- verbose(`Loaded ${stacks.length} stacks from config/stacks.yaml`);
3190
+ const stackSource = sourceStacks.length > 0 ? "source" : "CLI";
3191
+ verbose(`Loaded ${stacks.length} stacks from ${stackSource}`);
3155
3192
  }
3156
3193
  return {
3157
3194
  matrix: mergedMatrix,
@@ -3372,56 +3409,6 @@ var SKILL_DIRS = ["examples", "scripts"];
3372
3409
  function sanitizeSkillName(name) {
3373
3410
  return name.replace(/\+/g, "-");
3374
3411
  }
3375
- function parseMajorVersion2(version) {
3376
- const match = version.match(/^(\d+)\./);
3377
- return match ? parseInt(match[1], 10) : 1;
3378
- }
3379
- function bumpMajorVersion2(version) {
3380
- const major = parseMajorVersion2(version);
3381
- return `${major + 1}.0.0`;
3382
- }
3383
- var CONTENT_HASH_FILE2 = ".content-hash";
3384
- async function readExistingManifest2(pluginDir) {
3385
- const manifestPath = getPluginManifestPath(pluginDir);
3386
- if (!await fileExists(manifestPath)) {
3387
- return null;
3388
- }
3389
- try {
3390
- const content = await readFile(manifestPath);
3391
- const manifest = pluginManifestSchema.parse(JSON.parse(content));
3392
- const hashFilePath = manifestPath.replace("plugin.json", CONTENT_HASH_FILE2);
3393
- let contentHash;
3394
- if (await fileExists(hashFilePath)) {
3395
- contentHash = (await readFile(hashFilePath)).trim();
3396
- }
3397
- return {
3398
- version: manifest.version ?? DEFAULT_VERSION,
3399
- contentHash
3400
- };
3401
- } catch {
3402
- return null;
3403
- }
3404
- }
3405
- async function determineVersion(skillPath, pluginDir) {
3406
- const newHash = await hashSkillFolder(skillPath);
3407
- const existing = await readExistingManifest2(pluginDir);
3408
- if (!existing) {
3409
- return {
3410
- version: DEFAULT_VERSION,
3411
- contentHash: newHash
3412
- };
3413
- }
3414
- if (existing.contentHash !== newHash) {
3415
- return {
3416
- version: bumpMajorVersion2(existing.version),
3417
- contentHash: newHash
3418
- };
3419
- }
3420
- return {
3421
- version: existing.version,
3422
- contentHash: newHash
3423
- };
3424
- }
3425
3412
  async function readSkillMetadata(skillPath) {
3426
3413
  const metadataPath = path20.join(skillPath, "metadata.yaml");
3427
3414
  if (!await fileExists(metadataPath)) {
@@ -3462,7 +3449,7 @@ function generateReadme(skillName, frontmatter, metadata) {
3462
3449
  lines.push("");
3463
3450
  lines.push("```json");
3464
3451
  lines.push(`{`);
3465
- lines.push(` "plugins": ["skill-${skillName}"]`);
3452
+ lines.push(` "plugins": ["${skillName}"]`);
3466
3453
  lines.push(`}`);
3467
3454
  lines.push("```");
3468
3455
  lines.push("");
@@ -3499,11 +3486,16 @@ async function compileSkillPlugin(options) {
3499
3486
  const skillName = overrideName ?? sanitizeSkillName(frontmatter.name);
3500
3487
  verbose(`Compiling skill plugin: ${skillName} from ${skillPath}`);
3501
3488
  const metadata = await readSkillMetadata(skillPath);
3502
- const pluginDir = path20.join(outputDir, `skill-${skillName}`);
3489
+ const pluginDir = path20.join(outputDir, skillName);
3503
3490
  const skillsDir = path20.join(pluginDir, "skills", skillName);
3504
3491
  await ensureDir(pluginDir);
3505
3492
  await ensureDir(skillsDir);
3506
- const { version, contentHash } = await determineVersion(skillPath, pluginDir);
3493
+ const newHash = await hashSkillFolder(skillPath);
3494
+ const { version, contentHash } = await determinePluginVersion(
3495
+ newHash,
3496
+ pluginDir,
3497
+ getPluginManifestPath
3498
+ );
3507
3499
  const manifest = generateSkillPluginManifest({
3508
3500
  skillName,
3509
3501
  description: frontmatter.description,
@@ -3512,8 +3504,7 @@ async function compileSkillPlugin(options) {
3512
3504
  keywords: metadata?.tags
3513
3505
  });
3514
3506
  await writePluginManifest(pluginDir, manifest);
3515
- const hashFilePath = getPluginManifestPath(pluginDir).replace("plugin.json", CONTENT_HASH_FILE2);
3516
- await writeFile(hashFilePath, contentHash);
3507
+ await writeContentHash(pluginDir, contentHash, getPluginManifestPath);
3517
3508
  verbose(` Wrote plugin.json for ${skillName} (v${version})`);
3518
3509
  await writeFile(path20.join(skillsDir, "SKILL.md"), skillMdContent);
3519
3510
  verbose(` Copied SKILL.md`);
@@ -3553,7 +3544,7 @@ async function compileAllSkillPlugins(skillsDir, outputDir) {
3553
3544
  outputDir
3554
3545
  });
3555
3546
  results.push(result);
3556
- console.log(` [OK] skill-${result.skillName}`);
3547
+ console.log(` [OK] ${result.skillName}`);
3557
3548
  } catch (error) {
3558
3549
  const errorMessage = error instanceof Error ? error.message : String(error);
3559
3550
  const dirBasename = path20.basename(skillPath);
@@ -3566,7 +3557,7 @@ function printCompilationSummary(results) {
3566
3557
  console.log(`
3567
3558
  Compiled ${results.length} skill plugins:`);
3568
3559
  for (const result of results) {
3569
- console.log(` - skill-${result.skillName} (v${result.manifest.version})`);
3560
+ console.log(` - ${result.skillName} (v${result.manifest.version})`);
3570
3561
  }
3571
3562
  }
3572
3563
 
@@ -4135,6 +4126,8 @@ async function getSourceSummary(projectDir, matrix) {
4135
4126
  }
4136
4127
 
4137
4128
  export {
4129
+ generateAgentPluginManifest,
4130
+ writePluginManifest,
4138
4131
  findPluginManifest,
4139
4132
  getCollectivePluginDir,
4140
4133
  getProjectPluginsDir,
@@ -4153,7 +4146,10 @@ export {
4153
4146
  resolveAuthor,
4154
4147
  resolveAllSources,
4155
4148
  getCurrentDate,
4149
+ hashString,
4156
4150
  hashFile,
4151
+ determinePluginVersion,
4152
+ writeContentHash,
4157
4153
  readForkedFromMetadata,
4158
4154
  compareSkills,
4159
4155
  injectForkedFromMetadata,
@@ -4176,6 +4172,7 @@ export {
4176
4172
  compileAgentForPlugin,
4177
4173
  compileStackPlugin,
4178
4174
  printStackCompilationSummary,
4175
+ claudePluginInstall,
4179
4176
  isClaudeCLIAvailable,
4180
4177
  claudePluginMarketplaceExists,
4181
4178
  claudePluginMarketplaceAdd,
@@ -4204,4 +4201,4 @@ export {
4204
4201
  validateAllPlugins,
4205
4202
  printPluginValidationResult
4206
4203
  };
4207
- //# sourceMappingURL=chunk-YDBSSAJ6.js.map
4204
+ //# sourceMappingURL=chunk-ETQ3BPGU.js.map