Files
Trevin Chow 1681de57e7 fix(opencode): generate slash-command stubs for each skill
Installing the compound-engineering plugin to OpenCode produced zero
slash commands: convertClaudeToOpenCode only consumed plugin.commands (a
commands/ directory), but the plugin ships skills only. OpenCode users
had no /ce-work, /ce-plan, etc. even though every skill installed
correctly. The post-#967 skills-only, root-native plugin makes this
total — the plugin now ships no commands at all.

Add convertSkillsToCommands(): one slash-command stub per skill, carrying
the skill's description (and argument-hint when present) as frontmatter
and a body that loads/executes the named skill with $ARGUMENTS passed
through. Skills with disable-model-invocation or user-invocable: false
are excluded. Stubs are deduped against explicit commands/ entries and
each other by normalized path key (colons -> slashes) so foo:bar and a
skill named foo/bar don't both write commands/foo/bar.md; explicit
commands win. applyPermissions now force-allows the skill tool (clearing
any patterned skill(...) rule) whenever stubs are emitted, so a
skills-only plugin doesn't get permission.skill = deny.

Cleanup on skill rename/delete rides the existing managed-install
manifest: stubs appear in bundle.commandFiles, so currentCommands tracks
them and stale stubs are swept on reinstall.

Parser/types gain user-invocable so a skill can opt out of being exposed
as a slash command. Drift test derives the expected stub set
independently from source frontmatter.

Reapplies PR #776 onto post-#967 root-native paths and current types;
that PR was anchored to the old plugins/compound-engineering/skills/ tree
and its hand-built test literals predated the root/skillPath fields.

Co-authored-by: Luca Battistini <lucabattistini@users.noreply.github.com>
2026-06-22 17:10:24 -07:00
..