Skip to content

Migrate plugin commands into skills#31482

Draft
charlesgong-openai wants to merge 1 commit into
mainfrom
dev/charlesgong/plugin-command-skills
Draft

Migrate plugin commands into skills#31482
charlesgong-openai wants to merge 1 commit into
mainfrom
dev/charlesgong/plugin-command-skills

Conversation

@charlesgong-openai

Copy link
Copy Markdown
Contributor

Summary

  • move command-to-skill conversion from codex-external-agent-migration into codex-core-plugins, avoiding a dependency cycle when plugin installation uses the conversion
  • convert plugin commands/ during atomic install staging and expose generated skills alongside explicit manifest skill paths
  • reuse the core plugin conversion API from the external-agent import flow and keep coverage focused on one end-to-end plugin install/load test

Validation

  • just test -p codex-external-agent-migration (19 passed)
  • just test -p codex-core-plugins (new migration coverage passed; the only failure in the full run was an existing HOME-sensitive cache test, which passed when rerun with a clean HOME)
  • just test -p codex-app-server (affected external-agent and plugin tests passed; unrelated failures/timeouts were caused by nested sandbox-exec restrictions, missing auxiliary test binaries, and a HOME-sensitive skill watcher)
  • just fix -p codex-core-plugins -p codex-external-agent-migration -p codex-app-server
  • cargo fmt -- --config imports_granularity=Item (just fmt was attempted but its parallel formatter helper daemon terminated)

@charlesgong-openai charlesgong-openai force-pushed the dev/charlesgong/plugin-command-skills branch 2 times, most recently from 4a8aa23 to aaa6042 Compare July 8, 2026 02:19
@charlesgong-openai charlesgong-openai marked this pull request as ready for review July 8, 2026 02:30
@charlesgong-openai charlesgong-openai requested a review from a team as a code owner July 8, 2026 02:30

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aaa60428ae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

semver = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
serde_yaml = { workspace = true }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the Bazel lockfile update

Adding serde_yaml changes the Rust dependency graph for codex-core-plugins, but this commit updates only Cargo.toml/Cargo.lock; without the corresponding MODULE.bazel.lock refresh, Bazel-based builds and the lockfile-drift check will still resolve the old crate graph. Run just bazel-lock-update from the repo root and include the resulting MODULE.bazel.lock change with this dependency addition.

AGENTS.md reference: AGENTS.md:L37-L39

Useful? React with 👍 / 👎.

Comment thread codex-rs/core-plugins/src/command_migration.rs
Comment on lines +971 to +973
let migrated_command_skills = migrated_command_skills_root(plugin_root);
if migrated_command_skills.is_dir() {
paths.push(migrated_command_skills);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Prevent source-shipped migrated skill roots from loading

If an installed plugin already contains .codex-plugin/migrated-command-skills, this unconditional append loads those skills even when they were never generated from commands/ and even when the manifest/fallback restricts skills to a different path. Because the store copies the source tree before calling migration, a package can pre-populate this internal directory and get undeclared skills exposed; only load a migration output that was freshly generated or clear/own that directory during install.

Useful? React with 👍 / 👎.

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