fix: avoid duplicate Codex skill discovery#236
Open
shichangs wants to merge 2 commits intogarrytan:mainfrom
Open
fix: avoid duplicate Codex skill discovery#236shichangs wants to merge 2 commits intogarrytan:mainfrom
shichangs wants to merge 2 commits intogarrytan:mainfrom
Conversation
Migrate direct ~/.codex/skills/gstack installs into ~/.gstack/repos/gstack during setup.\n\nCreate a minimal Codex runtime root that only exposes runtime assets and generated SKILL.md files so Codex no longer discovers duplicate source skills recursively.
Generated Codex skills (review, ship, plan-ceo-review, plan-eng-review) reference checklist.md, design-checklist.md, greptile-triage.md, and TODOS-format.md under .agents/skills/gstack/review/. Symlink these individual files instead of the whole review/ dir (which contains SKILL.md and would re-introduce duplicate discovery). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
@wmzhai @garrytan This PR is ready for review. It fixes the duplicate Codex skill discovery issue (#235) by:
@wmzhai — could you verify this fixes the duplicate skills you were seeing? After pulling, run |
Author
|
@garrytan Friendly ping — this is ready for review. No conflicts with main, tests included. Happy to adjust anything. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix duplicate Codex skill discovery when gstack is installed directly into
~/.codex/skills/gstack.This changes the Codex setup flow so we no longer expose the full repo under the Codex skills root, which was letting Codex recursively discover both:
That produced duplicate entries in the skill picker because both copies shared the same
name:frontmatter.What changed
~/.codex/skills/gstackto~/.gstack/repos/gstackduring./setup --host codex~/.codex/skills/gstackruntime root instead of symlinking the whole repoSKILL.mdbin/browse/binbrowse/distgstack-upgrade/SKILL.mdreview/checklist.md,review/design-checklist.md,review/greptile-triage.md,review/TODOS-format.md(individual files, not the wholereview/dir which contains its ownSKILL.md)~/.codex/skillsWhy this fixes the issue
Codex scans
~/.codex/skillsrecursively. Before this change, a direct install left the full gstack repo under~/.codex/skills/gstack, so Codex could discover both the source SKILLs and the generatedgstack-*Codex skills.After this change:
~/.codex/skills~/.codex/skills/gstackis now only a runtime sidecar, not a second discoverable skill treereview/dir) to avoid re-introducing duplicate discovery viareview/SKILL.mdThat removes the duplicate discovery path without changing the absolute paths referenced by generated Codex skills.
Testing
Automated
bash -n setup✅bun test test/gen-skill-docs.test.ts✅ (88 tests pass)bun run gen:skill-docs --dry-run✅bun run gen:skill-docs --host codex --dry-run✅Manual regression
~/.codex/skills/gstack./setup --host codex~/.gstack/repos/gstack~/.codex/skills/gstackbecame a minimal runtime rootgstack-*Codex skills were linked at the top level~/.codex/skills./setup --host codexNot run
bun run test:e2ebun run test:evalsThese remain gated by the project's Tier 2 / Tier 3 eval setup.
Closes #235