fix(#1091): thread install scope into skill converters so local Antigravity/Copilot installs use workspace paths (#1092)

The skills layout wrapper (skillsKind) invoked every per-runtime skill
converter as realConverter(content, skillName, runtime, cmdNames). The
3rd positional arg is overloaded: claude/kimi/cline converters read
`runtime` there, but the copilot/antigravity converters read `isGlobal`
there — so they received the truthy runtime string and always took the
global path branch, leaking ~/.gemini/antigravity/ and ~/.copilot/ into
local/workspace installs instead of .agent/ and .github/.

Thread `scope` from resolveRuntimeArtifactLayout -> dispatchKindEntry ->
skillsKind, derive isGlobal = scope === 'global', and pass it as a
non-colliding 5th positional arg. Move isGlobal out of the colliding 3rd
slot in the two converter signatures (3rd/4th become ignored
_runtime/_cmdNames, matching the kimi convention). The fix flows through
the shared ArtifactKind.stage closure, so applySurface re-apply inherits
it via the same seam.

Regression test exercises the wrapper seam (installRuntimeArtifacts at
local scope) for both runtimes and asserts workspace paths, not global.

Closes #1091

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-06-12 00:20:28 -04:00
committed by GitHub
parent 74d7bc8239
commit 9e2ef2c94d
5 changed files with 82 additions and 9 deletions

View File

@@ -538,7 +538,7 @@ description: Test skill
Check ~/.claude/settings and ./.claude/local and $HOME/.claude/global.`;
const result = convertClaudeCommandToCopilotSkill(input, 'gsd-test', true);
const result = convertClaudeCommandToCopilotSkill(input, 'gsd-test', null, null, true);
assert.ok(result.includes('~/.copilot/settings'), 'tilde path converted to global');
assert.ok(result.includes('./.github/local'), 'dot-slash path converted');
assert.ok(result.includes('$HOME/.copilot/global'), '$HOME path converted to global');