Skip to content

Add selected skill migration flag#487

Open
simfor99 wants to merge 1 commit into
openai:mainfrom
simfor99:migrate-to-codex-selected-skills
Open

Add selected skill migration flag#487
simfor99 wants to merge 1 commit into
openai:mainfrom
simfor99:migrate-to-codex-selected-skills

Conversation

@simfor99

@simfor99 simfor99 commented Jun 10, 2026

Copy link
Copy Markdown

Why

When migrating from Claude Code to Codex, users often do not want to migrate their entire skill library in one pass. They may be testing Codex with one or two high-value skills, migrating a shared skill incrementally, or avoiding unrelated generated artifacts while they review behavior differences.

Before this change, the safe workaround was to create a temporary Claude source tree that contained only the desired skills. That works, but it is awkward and easy to get wrong. The migrator already knows how to convert individual skill files; it just did not expose a first-class selection option.

What changed

  • Add a repeatable --skill <name> flag.
  • Match selected skills by Claude skill folder or single-file skill name, and also by name in skill frontmatter.
  • Treat --skill as implying --skills.
  • Skip slash-command conversion when --skill is used, so the selected run only migrates Claude skills.
  • Suppress orphan cleanup for selected skill migrations and reject --skill with --replace, so a targeted migration cannot accidentally delete unrelated Codex skills.
  • Document the selected-skill workflow in SKILL.md and references/differences.md.
  • Fix migration inventory display for single-file skills so it shows the skill file stem instead of the parent skills directory.

Benefit

This makes incremental migration much safer and simpler:

  • users can port one skill at a time without preparing a temporary source directory;
  • reviewers can inspect smaller generated diffs;
  • existing Codex skills are not treated as cleanup candidates during selected migrations;
  • the existing full --skills and default migration behavior remains unchanged.

Testing

  • python3 -m py_compile skills/.curated/migrate-to-codex/scripts/cli.py skills/.curated/migrate-to-codex/scripts/migrate/skills.py skills/.curated/migrate-to-codex/scripts/utils/scan.py
  • python3 /home/simon/.codex/skills/.system/skill-creator/scripts/quick_validate.py skills/.curated/migrate-to-codex
  • Fixture migration checks for:
    • --skill alpha-skill
    • multiple --skill flags
    • matching a single-file skill by frontmatter name
    • --skill plus --replace rejection
    • full --skills behavior
    • --validate-target

@simfor99 simfor99 requested a review from a team June 10, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant