Repository navigation
fix(skill): resolve a skill name clash the same way on every load - #72
Closed
kevoconnell wants to merge 1 commit into
Closed
kevoconnell wants to merge 1 commit into
kevoconnell wants to merge 1 commit into
Conversation
Skills were parsed and registered concurrently, so when two folders held a skill with the same name, whichever file finished parsing last won. Parse in parallel but register in discovery order, and move a file found again to its latest source, so the skills path listed last always wins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: |
Member
Author
|
Closing: replohq/andytown#31715 now keeps each skill name in one folder (sharing moves a skill, and a new skill can't reuse a project skill's name), so the clash order no longer needs a fork change. |
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.
Issue for this PR
REPL-35247
Type of change
What does this PR do?
Replo sandboxes load skills from two folders: a person's own skills and their project's team skills. When both hold a skill with the same name, the person's own should win. Today the winner is random.
Two things caused that:
loadSkillsparsed and registered everySKILL.mdconcurrently. Each one wrotestate.skills[name]when its parse finished, so the slower file won.~/.agents/skillsand the project's team skills in its project folder (OPENCODE_CONFIG_DIR=/workspace/.opencode, so.opencode/skills). opencode reads the global folders first, so in discovery order the team skill comes later and would win. Ouropencode.jsonlists~/.agents/skillsagain inskills.pathsto put the person's folder last, but thematchesset kept a file's first position, so listing it again changed nothing.The fix:
skills.pathslisting the personal folder, the personal skill is registered last and wins.The "duplicate skill name" warning is unchanged.
How did you verify your code works?
test/skill/skill.test.tsputsbrand-voicein.opencode/skillsand inteam/, withskills.paths: ["team", ".opencode/skills"], and expects the personal copy. It fails ondev(3 of 3 runs) and passes with the fix.bun test test/skill/: 26 pass, 0 fail.bun run typecheckis clean.Screenshots / recordings
Not a UI change.
Checklist
🤖 Generated with Claude Code
Summary by cubic
Fixes skill name clashes so the personal skill always wins over a same-named team skill, instead of the winner being random on each load.
skills.pathswins.Written for commit 2e0371f. Summary will update on new commits.