chore: remove deprecated workflows:* skill aliases (#284)
* docs: capture codex skill prompt model * fix: align codex workflow conversion * chore: remove deprecated workflows:* skill aliases The workflows:brainstorm, workflows:plan, workflows:work, workflows:review, and workflows:compound aliases have been deprecated long enough. Remove them and update skill counts (46 → 41) across plugin.json, marketplace.json, README, and CLAUDE.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Trevin Chow <trevin@trevinchow.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -43,4 +43,22 @@ describe("loadClaudeHome", () => {
|
||||
expect(config.commands?.find((command) => command.name === "custom-command")?.allowedTools).toEqual(["Bash", "Read"])
|
||||
expect(config.mcpServers.context7?.url).toBe("https://mcp.context7.com/mcp")
|
||||
})
|
||||
|
||||
test("keeps personal skill directory names stable even when frontmatter name differs", async () => {
|
||||
const tempHome = await fs.mkdtemp(path.join(os.tmpdir(), "claude-home-skill-name-"))
|
||||
const skillDir = path.join(tempHome, "skills", "reviewer")
|
||||
|
||||
await fs.mkdir(skillDir, { recursive: true })
|
||||
await fs.writeFile(
|
||||
path.join(skillDir, "SKILL.md"),
|
||||
"---\nname: ce:plan\ndescription: Reviewer skill\nargument-hint: \"[topic]\"\n---\nReview things.\n",
|
||||
)
|
||||
|
||||
const config = await loadClaudeHome(tempHome)
|
||||
|
||||
expect(config.skills).toHaveLength(1)
|
||||
expect(config.skills[0]?.name).toBe("reviewer")
|
||||
expect(config.skills[0]?.description).toBe("Reviewer skill")
|
||||
expect(config.skills[0]?.argumentHint).toBe("[topic]")
|
||||
})
|
||||
})
|
||||
|
||||
@@ -31,6 +31,7 @@ const fixturePlugin: ClaudePlugin = {
|
||||
{
|
||||
name: "existing-skill",
|
||||
description: "Existing skill",
|
||||
argumentHint: "[ITEM]",
|
||||
sourceDir: "/tmp/plugin/skills/existing-skill",
|
||||
skillPath: "/tmp/plugin/skills/existing-skill/SKILL.md",
|
||||
},
|
||||
@@ -78,6 +79,81 @@ describe("convertClaudeToCodex", () => {
|
||||
expect(parsedSkill.body).toContain("Threat modeling")
|
||||
})
|
||||
|
||||
test("generates prompt wrappers for canonical ce workflow skills and omits workflows aliases", () => {
|
||||
const plugin: ClaudePlugin = {
|
||||
...fixturePlugin,
|
||||
manifest: { name: "compound-engineering", version: "1.0.0" },
|
||||
commands: [],
|
||||
agents: [],
|
||||
skills: [
|
||||
{
|
||||
name: "ce:plan",
|
||||
description: "Planning workflow",
|
||||
argumentHint: "[feature]",
|
||||
sourceDir: "/tmp/plugin/skills/ce-plan",
|
||||
skillPath: "/tmp/plugin/skills/ce-plan/SKILL.md",
|
||||
},
|
||||
{
|
||||
name: "workflows:plan",
|
||||
description: "Deprecated planning alias",
|
||||
argumentHint: "[feature]",
|
||||
sourceDir: "/tmp/plugin/skills/workflows-plan",
|
||||
skillPath: "/tmp/plugin/skills/workflows-plan/SKILL.md",
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
const bundle = convertClaudeToCodex(plugin, {
|
||||
agentMode: "subagent",
|
||||
inferTemperature: false,
|
||||
permissions: "none",
|
||||
})
|
||||
|
||||
expect(bundle.prompts).toHaveLength(1)
|
||||
expect(bundle.prompts[0]?.name).toBe("ce-plan")
|
||||
|
||||
const parsedPrompt = parseFrontmatter(bundle.prompts[0]!.content)
|
||||
expect(parsedPrompt.data.description).toBe("Planning workflow")
|
||||
expect(parsedPrompt.data["argument-hint"]).toBe("[feature]")
|
||||
expect(parsedPrompt.body).toContain("Use the ce:plan skill")
|
||||
|
||||
expect(bundle.skillDirs.map((skill) => skill.name)).toEqual(["ce:plan"])
|
||||
})
|
||||
|
||||
test("does not apply compound workflow canonicalization to other plugins", () => {
|
||||
const plugin: ClaudePlugin = {
|
||||
...fixturePlugin,
|
||||
manifest: { name: "other-plugin", version: "1.0.0" },
|
||||
commands: [],
|
||||
agents: [],
|
||||
skills: [
|
||||
{
|
||||
name: "ce:plan",
|
||||
description: "Custom CE-namespaced skill",
|
||||
argumentHint: "[feature]",
|
||||
sourceDir: "/tmp/plugin/skills/ce-plan",
|
||||
skillPath: "/tmp/plugin/skills/ce-plan/SKILL.md",
|
||||
},
|
||||
{
|
||||
name: "workflows:plan",
|
||||
description: "Custom workflows-namespaced skill",
|
||||
argumentHint: "[feature]",
|
||||
sourceDir: "/tmp/plugin/skills/workflows-plan",
|
||||
skillPath: "/tmp/plugin/skills/workflows-plan/SKILL.md",
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
const bundle = convertClaudeToCodex(plugin, {
|
||||
agentMode: "subagent",
|
||||
inferTemperature: false,
|
||||
permissions: "none",
|
||||
})
|
||||
|
||||
expect(bundle.prompts).toHaveLength(0)
|
||||
expect(bundle.skillDirs.map((skill) => skill.name)).toEqual(["ce:plan", "workflows:plan"])
|
||||
})
|
||||
|
||||
test("passes through MCP servers", () => {
|
||||
const bundle = convertClaudeToCodex(fixturePlugin, {
|
||||
agentMode: "subagent",
|
||||
@@ -131,6 +207,47 @@ Task best-practices-researcher(topic)`,
|
||||
expect(parsed.body).not.toContain("Task learnings-researcher")
|
||||
})
|
||||
|
||||
test("transforms namespaced Task agent calls to skill references using final segment", () => {
|
||||
const plugin: ClaudePlugin = {
|
||||
...fixturePlugin,
|
||||
commands: [
|
||||
{
|
||||
name: "plan",
|
||||
description: "Planning with namespaced agents",
|
||||
body: `Run these agents in parallel:
|
||||
|
||||
- Task compound-engineering:research:repo-research-analyst(feature_description)
|
||||
- Task compound-engineering:research:learnings-researcher(feature_description)
|
||||
|
||||
Then consolidate findings.
|
||||
|
||||
Task compound-engineering:review:security-reviewer(code_diff)`,
|
||||
sourcePath: "/tmp/plugin/commands/plan.md",
|
||||
},
|
||||
],
|
||||
agents: [],
|
||||
skills: [],
|
||||
}
|
||||
|
||||
const bundle = convertClaudeToCodex(plugin, {
|
||||
agentMode: "subagent",
|
||||
inferTemperature: false,
|
||||
permissions: "none",
|
||||
})
|
||||
|
||||
const commandSkill = bundle.generatedSkills.find((s) => s.name === "plan")
|
||||
expect(commandSkill).toBeDefined()
|
||||
const parsed = parseFrontmatter(commandSkill!.content)
|
||||
|
||||
// Namespaced Task calls should use only the final segment as the skill name
|
||||
expect(parsed.body).toContain("Use the $repo-research-analyst skill to: feature_description")
|
||||
expect(parsed.body).toContain("Use the $learnings-researcher skill to: feature_description")
|
||||
expect(parsed.body).toContain("Use the $security-reviewer skill to: code_diff")
|
||||
|
||||
// Original namespaced Task syntax should not remain
|
||||
expect(parsed.body).not.toContain("Task compound-engineering:")
|
||||
})
|
||||
|
||||
test("transforms slash commands to prompts syntax", () => {
|
||||
const plugin: ClaudePlugin = {
|
||||
...fixturePlugin,
|
||||
@@ -172,6 +289,61 @@ Don't confuse with file paths like /tmp/output.md or /dev/null.`,
|
||||
expect(parsed.body).toContain("/dev/null")
|
||||
})
|
||||
|
||||
test("transforms canonical workflow slash commands to Codex prompt references", () => {
|
||||
const plugin: ClaudePlugin = {
|
||||
...fixturePlugin,
|
||||
manifest: { name: "compound-engineering", version: "1.0.0" },
|
||||
commands: [
|
||||
{
|
||||
name: "review",
|
||||
description: "Review command",
|
||||
body: `After the brainstorm, run /ce:plan.
|
||||
|
||||
If planning is complete, continue with /ce:work.`,
|
||||
sourcePath: "/tmp/plugin/commands/review.md",
|
||||
},
|
||||
],
|
||||
agents: [],
|
||||
skills: [
|
||||
{
|
||||
name: "ce:plan",
|
||||
description: "Planning workflow",
|
||||
argumentHint: "[feature]",
|
||||
sourceDir: "/tmp/plugin/skills/ce-plan",
|
||||
skillPath: "/tmp/plugin/skills/ce-plan/SKILL.md",
|
||||
},
|
||||
{
|
||||
name: "ce:work",
|
||||
description: "Implementation workflow",
|
||||
argumentHint: "[feature]",
|
||||
sourceDir: "/tmp/plugin/skills/ce-work",
|
||||
skillPath: "/tmp/plugin/skills/ce-work/SKILL.md",
|
||||
},
|
||||
{
|
||||
name: "workflows:work",
|
||||
description: "Deprecated implementation alias",
|
||||
argumentHint: "[feature]",
|
||||
sourceDir: "/tmp/plugin/skills/workflows-work",
|
||||
skillPath: "/tmp/plugin/skills/workflows-work/SKILL.md",
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
const bundle = convertClaudeToCodex(plugin, {
|
||||
agentMode: "subagent",
|
||||
inferTemperature: false,
|
||||
permissions: "none",
|
||||
})
|
||||
|
||||
const commandSkill = bundle.generatedSkills.find((s) => s.name === "review")
|
||||
expect(commandSkill).toBeDefined()
|
||||
const parsed = parseFrontmatter(commandSkill!.content)
|
||||
|
||||
expect(parsed.body).toContain("/prompts:ce-plan")
|
||||
expect(parsed.body).toContain("/prompts:ce-work")
|
||||
expect(parsed.body).not.toContain("the ce:plan skill")
|
||||
})
|
||||
|
||||
test("excludes commands with disable-model-invocation from prompts and skills", () => {
|
||||
const plugin: ClaudePlugin = {
|
||||
...fixturePlugin,
|
||||
|
||||
@@ -105,4 +105,105 @@ describe("writeCodexBundle", () => {
|
||||
const backupContent = await fs.readFile(path.join(codexRoot, backupFileName!), "utf8")
|
||||
expect(backupContent).toBe(originalContent)
|
||||
})
|
||||
|
||||
test("transforms copied SKILL.md files using Codex invocation targets", async () => {
|
||||
const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), "codex-skill-transform-"))
|
||||
const sourceSkillDir = path.join(tempRoot, "source-skill")
|
||||
await fs.mkdir(sourceSkillDir, { recursive: true })
|
||||
await fs.writeFile(
|
||||
path.join(sourceSkillDir, "SKILL.md"),
|
||||
`---
|
||||
name: ce:brainstorm
|
||||
description: Brainstorm workflow
|
||||
---
|
||||
|
||||
Continue with /ce:plan when ready.
|
||||
Or use /workflows:plan if you're following an older doc.
|
||||
Use /deepen-plan for deeper research.
|
||||
`,
|
||||
)
|
||||
await fs.writeFile(
|
||||
path.join(sourceSkillDir, "notes.md"),
|
||||
"Reference docs still mention /ce:plan here.\n",
|
||||
)
|
||||
|
||||
const bundle: CodexBundle = {
|
||||
prompts: [],
|
||||
skillDirs: [{ name: "ce:brainstorm", sourceDir: sourceSkillDir }],
|
||||
generatedSkills: [],
|
||||
invocationTargets: {
|
||||
promptTargets: {
|
||||
"ce-plan": "ce-plan",
|
||||
"workflows-plan": "ce-plan",
|
||||
"deepen-plan": "deepen-plan",
|
||||
},
|
||||
skillTargets: {},
|
||||
},
|
||||
}
|
||||
|
||||
await writeCodexBundle(tempRoot, bundle)
|
||||
|
||||
const installedSkill = await fs.readFile(
|
||||
path.join(tempRoot, ".codex", "skills", "ce:brainstorm", "SKILL.md"),
|
||||
"utf8",
|
||||
)
|
||||
expect(installedSkill).toContain("/prompts:ce-plan")
|
||||
expect(installedSkill).not.toContain("/workflows:plan")
|
||||
expect(installedSkill).toContain("/prompts:deepen-plan")
|
||||
|
||||
const notes = await fs.readFile(
|
||||
path.join(tempRoot, ".codex", "skills", "ce:brainstorm", "notes.md"),
|
||||
"utf8",
|
||||
)
|
||||
expect(notes).toContain("/ce:plan")
|
||||
})
|
||||
|
||||
test("transforms namespaced Task calls in copied SKILL.md files", async () => {
|
||||
const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), "codex-ns-task-"))
|
||||
const sourceSkillDir = path.join(tempRoot, "source-skill")
|
||||
await fs.mkdir(sourceSkillDir, { recursive: true })
|
||||
await fs.writeFile(
|
||||
path.join(sourceSkillDir, "SKILL.md"),
|
||||
`---
|
||||
name: ce:plan
|
||||
description: Planning workflow
|
||||
---
|
||||
|
||||
Run these research agents:
|
||||
|
||||
- Task compound-engineering:research:repo-research-analyst(feature_description)
|
||||
- Task compound-engineering:research:learnings-researcher(feature_description)
|
||||
|
||||
Also run bare agents:
|
||||
|
||||
- Task best-practices-researcher(topic)
|
||||
`,
|
||||
)
|
||||
|
||||
const bundle: CodexBundle = {
|
||||
prompts: [],
|
||||
skillDirs: [{ name: "ce:plan", sourceDir: sourceSkillDir }],
|
||||
generatedSkills: [],
|
||||
invocationTargets: {
|
||||
promptTargets: {},
|
||||
skillTargets: {},
|
||||
},
|
||||
}
|
||||
|
||||
await writeCodexBundle(tempRoot, bundle)
|
||||
|
||||
const installedSkill = await fs.readFile(
|
||||
path.join(tempRoot, ".codex", "skills", "ce:plan", "SKILL.md"),
|
||||
"utf8",
|
||||
)
|
||||
|
||||
// Namespaced Task calls should be rewritten using the final segment
|
||||
expect(installedSkill).toContain("Use the $repo-research-analyst skill to: feature_description")
|
||||
expect(installedSkill).toContain("Use the $learnings-researcher skill to: feature_description")
|
||||
expect(installedSkill).not.toContain("Task compound-engineering:")
|
||||
|
||||
// Bare Task calls should still be rewritten
|
||||
expect(installedSkill).toContain("Use the $best-practices-researcher skill to: topic")
|
||||
expect(installedSkill).not.toContain("Task best-practices-researcher")
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user