fix(3663): pass runtime+cmdNames to Claude converter for Hermes/Qwen

convertClaudeCommandToClaudeSkill(content, skillName, runtime, cmdNames) uses
the runtime arg to gate Hermes/Qwen branding and version: frontmatter emission
(#2808, #3583). Previously the layout module called it with only 2 args so the
runtime-specific formatting was never applied.

Changes:
- skillsKind() gains a runtime param (5th arg after converterName).
- stage() computes cmdNames = readGsdCommandNames() once per call (perf: avoids
  repeated fs.readdirSync in the converter) and wraps the real converter so all
  4 args are forwarded.
- readGsdCommandNames added to bin/install.js GSD_TEST_MODE exports block so the
  stage closure can call it without requiring the script separately.
- All switch arms updated to pass the canonical runtime string.

Converters that do not inspect runtime/cmdNames (Cursor, Codex, Copilot, etc.)
accept and ignore the extra arguments — no behaviour change for those runtimes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-05-17 00:44:53 -04:00
parent be5fe61221
commit 40e325b91f
2 changed files with 22 additions and 14 deletions

View File

@@ -11436,6 +11436,7 @@ if (process.env.GSD_TEST_MODE) {
rewriteLegacyManagedNodeHookCommands,
buildCodexHookBlock,
rewriteLegacyCodexHookBlock,
readGsdCommandNames,
};
} else {