Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Based on the search results, I found one potentially related PR: Related PR:
Other potentially adjacent PRs:
The most likely duplicate or closely related work would be PR #48881 since it's explicitly about unifying skill loading logic, which could conflict with or complement the explicit skill sources feature you're adding. |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
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
Closes #49108
Type of change
What does this PR do?
OpenCode discovers skills from several compatibility directories. Separate Claude, Agent, OpenCode, model-version, and A/B skill trees can intentionally contain the same skill directory names, but the current loader stores them under one name-keyed collection and loads them concurrently. This makes collisions ambiguous and can fail while constructing the system prompt.
This PR adds explicit skill source configuration:
{ "skills": { "sources": [ { "id": "opencode", "path": "~/.config/opencode/skills", "enabled": true }, { "id": "agents", "path": "~/.agents/skills", "enabled": true }, { "id": "claude", "path": "~/.claude/skills", "enabled": true } ], "collision": "source-qualified" } }Explicit sources replace implicit compatibility-root discovery. In
source-qualifiedmode, same-named skills remain separate asclaude/reviewandagents/review. Inlast-winsmode, duplicate selection is deterministic because discovered files load in stable order. Existing discovery behavior remains unchanged when explicit sources are absent. Malformed skill files continue through the existing diagnostic path without crashing.The implementation is limited to configuration schema, skill discovery, deterministic loading, and regression coverage. It does not replace or duplicate the compatibility-loader refactor in #48881; it adds the user-facing source-selection and collision policy on top of the loader contract.
How did you verify your code works?
bun test test/skill/skill.test.ts: 19 passed, 0 failed, 53 assertionsbun run typecheck: passedbunx prettier --check: passedbunx oxlint: 0 warnings, 0 errorsdebug skill --purereported bothagents/reviewandclaude/reviewfrom an isolated configScreenshots / recordings
Not applicable; this is a configuration and backend behavior change.
Checklist
If you do not follow this template your PR will be automatically rejected.