Fix discovery for plugin-bundled OpenCode skills#2688
Open
walioo wants to merge 1 commit intocode-yeongyu:devfrom
Open
Fix discovery for plugin-bundled OpenCode skills#2688walioo wants to merge 1 commit intocode-yeongyu:devfrom
walioo wants to merge 1 commit intocode-yeongyu:devfrom
Conversation
Contributor
|
All contributors have signed the CLA. Thank you! ✅ |
There was a problem hiding this comment.
1 issue found across 2 files
Confidence score: 3/5
- There is a concrete compatibility risk in
src/features/opencode-skill-loader/loader.ts: usingbasename()for skill names can strip scoped package prefixes (for example,@org/pluginbecomingplugin). - Because this is a high-confidence, user-impacting behavior change (severity 7/10, confidence 9/10), the merge risk is moderate rather than low.
- Pay close attention to
src/features/opencode-skill-loader/loader.ts- scoped plugin names may be incorrectly normalized and break OpenCode naming compatibility.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/features/opencode-skill-loader/loader.ts">
<violation number="1" location="src/features/opencode-skill-loader/loader.ts:162">
P1: Custom agent: **Opencode Compatibility**
Using `basename()` to namespace skills drops the `@scope` directory for scoped packages (e.g., `@org/plugin` becomes `plugin`), violating OpenCode's plugin naming compatibility.
OpenCode relies on the full package name (including scope) to identify plugins. It recently patched a similar bug (Issue #17716) where stripping paths caused its internal loader to silently drop unrelated scoped plugins due to name collisions. By using `basename()` here, if a user installs multiple scoped plugins with the same base name (e.g., `@org1/cli` and `@org2/cli`), both will be prefixed as `cli/...` and `deduplicateSkillsByName()` will silently drop one of them.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
Addressed the scoped package compatibility issue in |
Author
|
recheck |
34371ab to
b1b0407
Compare
b1b0407 to
8e87ea6
Compare
magicJie
pushed a commit
to magicJie/oh-my-opencode
that referenced
this pull request
Mar 19, 2026
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.
Title: Fix discovery for plugin-bundled OpenCode skills
Summary:
OMO's custom skill loader currently discovers filesystem-backed OpenCode skills under config skill dirs, but misses skills bundled inside OpenCode plugins that are injected at runtime, such as
superpowers/systematic-debugging.Problem:
superpowersfollows the official OpenCode installation flow by registering an OpenCode plugin and exposing its skills from the packageskills/directory.skilltool only scans physical OpenCode skill directories and does not discover plugin-bundled skills from package roots.Skill or command "systematic-debugging" not foundeven thoughsuperpowers/systematic-debuggingis installed and available.What this changes:
node_modulesnode_modules.opencode/plugins/*skills/superpowers/...Regression coverage:
discoverSkills({ includeClaudeCodePaths: false })findssuperpowers/systematic-debuggingWhy this is safe:
Validation:
bun test src/features/opencode-skill-loader/loader.test.tssuperpowersthat all namespaced skills load through OMO after discovery is fixedSummary by cubic
Fixes OpenCode plugin skill discovery so OMO finds skills bundled in plugins (e.g.,
superpowers/systematic-debugging,@obra/superpowers/systematic-debugging) and stops “skill not found” errors. OMO now scans plugin package roots in config/cachenode_modulesand loads theirskills/with a namespaced prefix that preserves npm scopes.node_modulesfor plugin packages..opencode/plugins/*JS/TS entries; load fromskills/.discoverSkills,discoverAllSkills, andloadOpencodeGlobalSkillswith existing priority unchanged.Written for commit 8e87ea6. Summary will update on new commits.