fix: sanitize colons in skill/agent names for Windows path compatibility (#398)
This commit is contained in:
@@ -485,4 +485,35 @@ Task best-practices-researcher(topic)`
|
||||
expect(result).toContain("the dhh-rails-reviewer agent")
|
||||
expect(result).not.toContain("@security-sentinel")
|
||||
})
|
||||
|
||||
test("generated skill deduplicates against sanitized pass-through skill names", () => {
|
||||
const plugin: ClaudePlugin = {
|
||||
...fixturePlugin,
|
||||
agents: [],
|
||||
commands: [
|
||||
{
|
||||
name: "ce:plan",
|
||||
description: "Planning command",
|
||||
model: "inherit",
|
||||
allowedTools: [],
|
||||
body: "Plan the work.",
|
||||
sourcePath: "/tmp/plugin/commands/ce-plan.md",
|
||||
},
|
||||
],
|
||||
skills: [
|
||||
{
|
||||
name: "ce:plan",
|
||||
description: "Planning skill",
|
||||
sourceDir: "/tmp/plugin/skills/ce-plan",
|
||||
skillPath: "/tmp/plugin/skills/ce-plan/SKILL.md",
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
const bundle = convertClaudeToCopilot(plugin, defaultOptions)
|
||||
|
||||
// The generated skill from the command should get a deduplicated name
|
||||
// since "ce:plan" and "ce-plan" both map to "ce-plan" on disk
|
||||
expect(bundle.generatedSkills[0].name).not.toBe("ce-plan")
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user