fix: sanitize colons in skill/agent names for Windows path compatibility (#398)

This commit is contained in:
Trevin Chow
2026-03-26 16:15:48 -07:00
committed by GitHub
parent 0877b693ce
commit b25480af9e
31 changed files with 356 additions and 61 deletions

View File

@@ -1,4 +1,5 @@
import { formatFrontmatter } from "../utils/frontmatter"
import { sanitizePathName } from "../utils/files"
import type { ClaudeAgent, ClaudeCommand, ClaudeMcpServer, ClaudePlugin } from "../types/claude"
import type {
CopilotAgent,
@@ -21,9 +22,9 @@ export function convertClaudeToCopilot(
const agents = plugin.agents.map((agent) => convertAgent(agent, usedAgentNames))
// Reserve skill names first so generated skills (from commands) don't collide
// Reserve sanitized skill names so generated skills (from commands) don't collide on disk
const skillDirs = plugin.skills.map((skill) => {
usedSkillNames.add(skill.name)
usedSkillNames.add(sanitizePathName(skill.name))
return {
name: skill.name,
sourceDir: skill.sourceDir,