Skip to content

Bridge host-loaded skills into the skills extension#26172

Merged
jif-oai merged 8 commits into
mainfrom
jif/skills-extension-host-provider
Jun 4, 2026
Merged

Bridge host-loaded skills into the skills extension#26172
jif-oai merged 8 commits into
mainfrom
jif/skills-extension-host-provider

Conversation

@jif-oai

@jif-oai jif-oai commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Why

The skills extension needs to become the path that exposes local host skills without losing the behavior already owned by core skill loading. Host skill discovery is not just $CODEX_HOME/skills: it also includes config layers, bundled-skill settings, plugin roots, runtime extra roots, and the filesystem for the selected primary environment.

Rather than making the extension reload host skills and risk drifting from that authoritative load, this PR bridges the already-loaded per-turn skills outcome into the extension. That lets the extension advertise host skills and inject explicit $skill prompts while preserving the same roots, disabled/hidden state, rendered paths, and environment-backed file reads that the legacy path uses.

What Changed

  • Adds HostLoadedSkills in core-skills to wrap the turn's SkillLoadOutcome and read SKILL.md through the filesystem that loaded that skill.
  • Stores HostLoadedSkills in turn extension data for normal turns and review turns, so the skills extension can consume the loaded host catalog without reloading it.
  • Adds HostSkillProvider under ext/skills/src/provider/host.rs, mapping host-loaded skill metadata into the skills-extension catalog/read contract.
  • Registers the host provider by default from codex_skills_extension::install().
  • Preserves host skill metadata such as dependencies, disabled state, hidden-from-prompt policy, and slash-normalized display paths.
  • Passes host-loaded skills through SkillListQuery and SkillReadRequest so explicit skill invocation reads only resources from the loaded host catalog.
  • Adds integration coverage for a real legacy $CODEX_HOME/skills/.../SKILL.md skill being listed and injected through the installed extension.

Testing

  • Added installed_extension_loads_host_skills_from_legacy_roots in ext/skills/tests/skills_extension.rs.
  • just test -p codex-skills-extension

@jif-oai jif-oai changed the title Add skills extension host provider Add a host provider to the skills extension Jun 3, 2026

@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: 4d4eefdcf3

ℹ️ 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".

Comment thread codex-rs/ext/skills/src/state.rs Outdated
Comment thread codex-rs/ext/skills/src/provider/host.rs Outdated
Comment thread codex-rs/ext/skills/src/provider/host.rs Outdated
Comment thread codex-rs/ext/skills/Cargo.toml Outdated
Comment thread codex-rs/ext/skills/src/extension.rs
Comment thread codex-rs/ext/skills/src/provider/host.rs
@jif-oai jif-oai requested a review from a team as a code owner June 4, 2026 12:24
@jif-oai

jif-oai commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@jif-oai jif-oai changed the title Add a host provider to the skills extension Bridge host-loaded skills into the skills extension Jun 4, 2026

@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: e4caeed99e

ℹ️ 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".

Comment thread codex-rs/ext/skills/src/extension.rs
Comment thread codex-rs/ext/skills/src/provider/host.rs
Comment thread codex-rs/ext/skills/tests/skills_extension.rs Outdated
Comment thread codex-rs/ext/skills/src/extension.rs
@jif-oai

jif-oai commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 37b7939f9e

ℹ️ 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".

Comment thread codex-rs/ext/skills/src/provider/host.rs
Comment thread codex-rs/ext/skills/src/extension.rs
@jif-oai

jif-oai commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

truncation is not in the scope of this PR

@jif-oai jif-oai merged commit d46a98d into main Jun 4, 2026
30 checks passed
@jif-oai jif-oai deleted the jif/skills-extension-host-provider branch June 4, 2026 13:28
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant