feat(opencode): native plugin with auto-discovery for all 68 skills + 42 commands#48
Open
jeongY-Cho wants to merge 4 commits into
Open
feat(opencode): native plugin with auto-discovery for all 68 skills + 42 commands#48jeongY-Cho wants to merge 4 commits into
jeongY-Cho wants to merge 4 commits into
Conversation
Bundle a native OpenCode plugin (.opencode/plugins/pm-skills.js) that auto-registers all 68 PM skills and 42 /slash commands at runtime. Scans pm-*/ dirs, injects skills paths into config.skills.paths, and frontmatter-parses commands/*.md into config.command. Root package.json declares gray-matter; .gitignore excludes node_modules.
Add OpenCode install section to README with one-line config snippet. Update CLAUDE.md repo structure and OpenCode reference. Add docs/opencode-auto-discovery-plugin.md design proposal.
df393d0 to
71b712e
Compare
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.
What this does
Gives OpenCode first-class PM Skills support. Until now it was the only major target with no native path — users had to hand-copy
skills/folders, re-do it on every update, and still got none of the/slashcommand workflows. This PR ships a bundled plugin that auto-registers everything at runtime: one-line install, nothing to copy, stays in sync ongit pull.What's in here
.opencode/plugins/pm-skills.js— the plugin itself. On init it scanspm-*/dirs at the repo root, injects eachpm-*/skills/path intoconfig.skills.paths(OpenCode lazily discovers everySKILL.md— no symlinks, no config edits; works becauseConfig.get()is a cached singleton), frontmatter-parsespm-*/commands/*.mdwithgray-matter, and registers each asconfig.command[name]. Structured logging throughout (init / scan / per-command load / totals) under theopencode-pm-skillsservice so setup is observable.package.json— root npm manifest. OpenCode reads the rootpackage.jsonto find the plugin entry point; without it the plugin doesn't load. Declaresgray-matteras a dependency.README.md— adds the OpenCode install section with the one-line config snippet, plus formatting consistency fixes.CLAUDE.md— updates the repo structure docs and the OpenCode reference in the project overview..gitignore— ignoresnode_modules/for the plugin's npm deps.docs/opencode-auto-discovery-plugin.md— written proposal capturing the design (gap, approach, install, verification) for record and discussion.How to review
The plugin file is the core — read
.opencode/plugins/pm-skills.jsfirst. The rest is wiring (package.json at root so OpenCode finds the entry point), docs (README + CLAUDE.md sections), and the proposal. 13 commits because this was iterated to working state (rename, package.json location, default→named export, formatting) — the final state is what matters.Install
{ "plugin": ["pm-skills@git+https://github.com/phuryn/pm-skills.git"] }Then restart OpenCode.
Verification
Found 9 plugin directories.pm-*/skills/paths land inconfig.skills.paths.pm-*/commands/*.mdregister inconfig.command(one per file)./write-prdand thecreate-prdskill resolve and invoke in a fresh OpenCode session.Result
All 68 skills + 42
/slashcommands available natively. One-line install. Stays in sync with the repo ongit pull— no manual copying, no drift.