[codex] Avoid shadowing user skills in lab setup#1285
Open
Conversation
willccbb
approved these changes
May 4, 2026
Member
|
@cursoragent fix ruff pls |
|
Co-authored-by: will brown <willccbb@users.noreply.github.com>
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
prime lab setupnow treats.prime/skillsas the shared Lab skills source and avoids installing project-level agent skill links that would shadow same-name user-scope skills.Problem
The setup flow downloaded bundled Lab skills to
.prime/skills, then linked/copied them into agent-specific project directories such as.codex/skills. If a user already had a same-name skill in~/.codex/skills, the project skill could take precedence and effectively override the user's skill.Changes
.prime/skillswhen there are no user-scope conflicts.CLAUDE.mdwhenclaudeis one of the selected agents.Validation
uv run pytest tests/test_setup_script.py->17 passeduv run ruff check verifiers/scripts/setup.py tests/test_setup_script.py-> passedNote
Medium Risk
Changes how
prime lab setupcreates agent skill directories and symlinks, including deleting previously-managed symlinks; mistakes could remove/skip intended project skills or create incorrect links on reruns.Overview
prime lab setupnow detects user-scoped agent skills (e.g.~/.codex/skills) and avoids creating project-level links in.codex/skillsthat would shadow them; when conflicts exist it removes only previously-managed symlinks and skips conflicting skills while still materializing non-conflicting ones.When there are no user conflicts (and no skill-name mapping), the setup prefers linking the agent’s skills root directly to
.prime/skills. It also only downloadsCLAUDE.mdwhenclaudeis among the selected agents, and adds targeted tests covering HOME isolation, user-skill conflict handling, and Claude-specific file generation.Reviewed by Cursor Bugbot for commit b4a4c26. Bugbot is set up for automated code reviews on this repo. Configure here.