Skip to content

fix(skills): discover enabled Codex plugin skills - #1043

Open
ITS-MSW wants to merge 1 commit into
hardbeat920:mainfrom
ITS-MSW:fix/codex-plugin-skill-discovery
Open

ITS-MSW wants to merge 1 commit into
hardbeat920:mainfrom
ITS-MSW:fix/codex-plugin-skill-discovery

Conversation

@ITS-MSW

@ITS-MSW ITS-MSW commented Oct 16, 2026 •

Copy link
Copy Markdown

What changed

Discover enabled Codex plugin skills through the existing app-server probe and skills/list, and merge them into Settings and the composer without duplicate names or source paths. Keep Codex's namespaced names and pinned SKILL.md paths, and include the source location when injecting a skill body so relative references remain resolvable.

Why

Fixes #1041. Filesystem discovery covers standalone skills and Claude plugins but misses Codex plugins. Asking Codex for its active plugin skills respects the configured CODEX_HOME and enabled state without crawling versioned caches. Existing file discovery remains available when Codex is missing or does not support the request.

UI

No chrome or layout changes. I manually tested the fix on macOS with pstack-for-codex 0.4.0 and Ponytail 5.2.0. Automatic hook activation was not tested.

Validation

image
  • npm run check: passed (5,372 web tests passed, 13 skipped; TypeScript, Rust formatting and Clippy passed; 655 Rust tests passed, one ignored).
  • npm run build: passed.
  • cargo build --locked: passed on the committed source.
  • An isolated Codex CLI 0.162.1 probe returned 55 pstack skills and six Ponytail skills with unique names and readable pinned paths. Disabling pstack in the copied configuration removed its 55 entries while retaining Ponytail's six.
  • Regression tests cover namespaces and duplicates, disabled entries, malformed responses, unavailable/older CLIs, probe cleanup, Settings previews, and source context during body injection.

Checklist

  • I ran npm run check
  • This PR is small and focused
  • I did not mix unrelated changes

Summary by CodeRabbit

  • New Features
    • Skills from Codex plugins now appear alongside standalone skills, with duplicate and disabled entries filtered out.
    • Selecting a plugin skill opens its discovered skill document.
    • Skill instructions now include file location context and guidance for resolving relative references.
  • Bug Fixes
    • Plugin discovery failures no longer prevent existing file skills from appearing.
    • Codex skill discovery now filters out malformed entries and results for other working directories.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8b37e2b6-15c1-4541-86ba-b7d16b2c2b4e
📥 Commits

Reviewing files that changed from the base of the PR and between e49a5ae and 00c25a0.

📒 Files selected for processing: 6
  • src/features/skills/model/skillCatalog.test.ts
  • src/features/skills/model/skills.ts
  • src/features/skills/ui/SkillsPage.test.ts
  • src/features/skills/ui/SkillsPage.tsx
  • src/integrations/harness/providers/codex/codexCatalog.test.ts
  • src/integrations/harness/providers/codex/codexCatalog.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

📝 Walkthrough

Codex plugin skills are discovered through the Codex harness, merged with standalone file skills, and displayed in the skills picker. File-skill prompts now include the skill path and instructions for resolving relative references.

Changes: Codex Plugin Skills

Layer / File(s) Summary
Codex discovery and probe lifecycle
src/integrations/harness/providers/codex/codexCatalog.ts, src/integrations/harness/providers/codex/codexCatalog.test.ts
Codex discovery requests plugin skills for the supplied working directory and filters invalid, disabled, mismatched, or duplicate entries. The shared probe wrapper releases the harness bridge after use. Tests cover request parameters, parsing, errors, and cleanup.
Catalog merge and prompt injection
src/features/skills/model/skills.ts, src/features/skills/model/skillCatalog.test.ts
discoverFileSkills combines standalone skills with Codex plugin skills, skips disabled paths and duplicates, and sorts the results. Plugin discovery errors leave standalone skills available. File-skill prompt blocks include the source path and reference-directory instructions.
Skills picker integration
src/features/skills/ui/SkillsPage.tsx, src/features/skills/ui/SkillsPage.test.ts
The skills page uses discoverFileSkills when loading and rescanning. The test verifies that a discovered Codex skill can be opened and previewed from its exact path.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant SkillsPage
  participant discoverFileSkills
  participant CodexCatalog
  participant CodexCLI
  participant FileSystem
  SkillsPage->>discoverFileSkills: Load skills for cwd
  discoverFileSkills->>CodexCatalog: Discover Codex plugin skills
  CodexCatalog->>CodexCLI: Request skills/list for cwd with forceReload
  CodexCLI-->>CodexCatalog: Return plugin skill entries
  CodexCatalog-->>discoverFileSkills: Return parsed plugin skills
  discoverFileSkills->>FileSystem: Discover standalone file skills
  discoverFileSkills-->>SkillsPage: Return combined skills
  SkillsPage->>FileSystem: Read selected skill path
  FileSystem-->>SkillsPage: Return skill document
Loading

Suggested reviewers: hardbeat920

Merge Risk: ⚪ Minimal · up to 00c25

No merge-blocking issue was identified; the change is ready for normal merge checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Issue #1041 requires installed Codex plugin skills to appear with standalone skills in the picker. discoverCodexPluginSkills requests Codex skills/list for the current working directory and keeps …
Out of Scope Changes check Passed The changes remain connected to issue #1041. The shared Codex probe supports the required skills/list request and cleanup. The merge, fallback, disabled-path filtering, Settings loading, composer lo…
Title check Passed The title clearly and concisely describes the main change: discovering enabled Codex plugin skills.
Description check Passed The description covers what changed, why it changed, UI impact, validation results, and all checklist items. It is complete and aligned with the pull request objectives.
Full details: Linked Issues check

Explanation

Issue #1041 requires installed Codex plugin skills to appear with standalone skills in the picker. discoverCodexPluginSkills requests Codex skills/list for the current working directory and keeps enabled plugin rows with namespaced names and exact SKILL.md paths. discoverFileSkills merges these rows with file skills, removes duplicate names and paths, respects disabled paths, and is used by both the composer catalog and Settings. The tests cover discovery, parsing, fallback, deduplication, Settings preview, and skill body injection with source context.

Full details: Out of Scope Changes check

Explanation

The changes remain connected to issue #1041. The shared Codex probe supports the required skills/list request and cleanup. The merge, fallback, disabled-path filtering, Settings loading, composer loading, source-context injection, and regression tests support the same skill discovery behavior. No unrelated feature or unrelated file change is demonstrated.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

Codex plugin skills missing from MonoCode’s skills picker

1 participant