Skip to content

Conversation

@devkade
Copy link

@devkade devkade commented Jan 14, 2026

Summary

Changes

Types - Add plugin scope

Files: src/features/opencode-skill-loader/types.ts, src/tools/slashcommand/types.ts

Added plugin to SkillScope and CommandScope union types.

- export type SkillScope = "builtin" | "config" | "user" | "project" | "opencode" | "opencode-project"
+ export type SkillScope = "builtin" | "config" | "user" | "project" | "opencode" | "opencode-project" | "plugin"

Skill Resolution - Support plugin skills lookup

File: src/features/opencode-skill-loader/skill-content.ts

resolveSkillContent and resolveMultipleSkills now accept pluginSkills option to resolve plugin-provided skills.

export interface SkillResolutionOptions {
  gitMasterConfig?: GitMasterConfig
  pluginSkills?: Map<string, LoadedSkill>  // NEW
}

Skill Merging - Plugin skills priority

File: src/features/opencode-skill-loader/merger.ts

mergeSkills integrates plugin skills with proper priority ordering. Plugin scope has highest priority (7).

const SCOPE_PRIORITY: Record<SkillScope, number> = {
  builtin: 1,
  config: 2,
  user: 3,
  opencode: 4,
  project: 5,
  "opencode-project": 6,
  plugin: 7,  // NEW - highest priority
}

Agent Utils - Pass plugin skills for skill injection

File: src/agents/utils.ts

buildAgent and createBuiltinAgents now accept and pass pluginSkills parameter for agent skill injection.

Sisyphus Task - Plugin skills in task delegation

File: src/tools/sisyphus-task/tools.ts

Plugin skills available in task delegation. Error messages now include plugin skill names in available list.

const builtinNames = createBuiltinSkills().map(s => s.name)
const pluginNames = pluginSkills ? Array.from(pluginSkills.keys()) : []
const available = [...builtinNames, ...pluginNames].join(", ")

Plugin Loaders - Load plugin skills

Files: src/index.ts, src/plugin-handlers/config-handler.ts

Plugin skills loaded via discoverInstalledPlugins and loadPluginSkillsAsCommands, then passed to relevant functions.

Testing

  • bun run typecheck passes
  • Added 8 new test cases for plugin skill resolution in skill-content.test.ts
    • Plugin skill resolution with options
    • Plugin skill not found without options
    • Plugin skill priority over builtin (conflict)
    • Mixed builtin and plugin skills resolution
    • Multiple plugin skills resolution

Summary by cubic

Integrates plugin-provided skills into the skill system so plugins can register skills that resolve across agents and tasks and override other sources.

  • New Features
    • Added plugin scope to SkillScope and CommandScope.
    • Plugin skills have highest priority (7) in merge order.
    • resolveSkillContent/resolveMultipleSkills accept pluginSkills and check them first.
    • mergeSkills now accepts pluginSkills and merges them with priority.
    • buildAgent/createBuiltinAgents accept pluginSkills for skill injection.
    • Sisyphus task supports plugin skills and shows them in “available” errors.
    • Plugin skills are discovered and loaded, then passed as LoadedSkill map/array where needed.
    • Added tests covering resolution, priority, and mixed builtin+plugin cases.

Written for commit 46d7a2e. Summary will update on new commits.

- Add 'plugin' to SkillScope type with highest priority (7)
- Add pluginSkills option to MergeSkillsOptions interface
- Add pluginSkills option to SkillResolutionOptions interface
- Update resolveSkillContent to check plugin skills first
- Update resolveMultipleSkills to check plugin skills first
- Add 'plugin' to CommandScope for slashcommand compatibility
- Add 8 new tests for plugin skill resolution
- Add pluginSkills parameter to SisyphusTaskToolOptions
- Update createSisyphusTask to pass pluginSkills to resolveMultipleSkills
- Update error message to include plugin skill names
- Add pluginSkills parameter to buildAgent and createBuiltinAgents
- Convert plugin commands to LoadedSkill format in config-handler
- Update mergeSkills to accept and merge plugin skills with highest priority (7)
- Add try/catch for plugin skill loading in index.ts
- Remove unnecessary comments in config-handler.ts
- Update JSON schema from build
@github-actions
Copy link
Contributor

github-actions bot commented Jan 14, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

@devkade
Copy link
Author

devkade commented Jan 14, 2026

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jan 14, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a6d1abdbb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 9 files

Confidence score: 3/5

  • Merging plugin metadata after applying the disable list in src/features/opencode-skill-loader/merger.ts can re-enable previously blocked skills, so user-facing configurations may silently regress.
  • The issue is well understood and should be straightforward to fix, but until the merge order changes, the configuration safety net isn’t reliable.
  • Pay close attention to src/features/opencode-skill-loader/merger.ts – plugin merge order currently overrides the disable list.
Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="src/features/opencode-skill-loader/merger.ts">

<violation number="1" location="src/features/opencode-skill-loader/merger.ts:259">
P2: Disabled skills can be reintroduced because plugins are merged after the disable list is applied</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
  • 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.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="src/features/opencode-skill-loader/merger.ts">

<violation number="1" location="src/features/opencode-skill-loader/merger.ts:264">
P2: Per-entry disables (`entries[name]=false`/`entry.disable`) are applied before plugin skills are merged, so a plugin skill with the same name can be re-added and bypass the disable.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant