Skip to content

feat(opencode): native plugin with auto-discovery for all 68 skills + 42 commands#48

Open
jeongY-Cho wants to merge 4 commits into
phuryn:mainfrom
jeongY-Cho:docs/opencode-plugin-proposal
Open

feat(opencode): native plugin with auto-discovery for all 68 skills + 42 commands#48
jeongY-Cho wants to merge 4 commits into
phuryn:mainfrom
jeongY-Cho:docs/opencode-plugin-proposal

Conversation

@jeongY-Cho

@jeongY-Cho jeongY-Cho commented Jun 22, 2026

Copy link
Copy Markdown

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 /slash command workflows. This PR ships a bundled plugin that auto-registers everything at runtime: one-line install, nothing to copy, stays in sync on git pull.

What's in here

.opencode/plugins/pm-skills.js — the plugin itself. On init it scans pm-*/ dirs at the repo root, injects each pm-*/skills/ path into config.skills.paths (OpenCode lazily discovers every SKILL.md — no symlinks, no config edits; works because Config.get() is a cached singleton), frontmatter-parses pm-*/commands/*.md with gray-matter, and registers each as config.command[name]. Structured logging throughout (init / scan / per-command load / totals) under the opencode-pm-skills service so setup is observable.

package.json — root npm manifest. OpenCode reads the root package.json to find the plugin entry point; without it the plugin doesn't load. Declares gray-matter as 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 — ignores node_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.js first. 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

  • Plugin loads and logs Found 9 plugin directories.
  • All 9 pm-*/skills/ paths land in config.skills.paths.
  • All 42 pm-*/commands/*.md register in config.command (one per file).
  • /write-prd and the create-prd skill resolve and invoke in a fresh OpenCode session.

Result

All 68 skills + 42 /slash commands available natively. One-line install. Stays in sync with the repo on git pull — no manual copying, no drift.

@jeongY-Cho jeongY-Cho marked this pull request as draft June 22, 2026 02:29
@jeongY-Cho jeongY-Cho changed the title docs: add OpenCode auto-discovery plugin proposal feat(opencode): native plugin with auto-discovery for all 68 skills + 42 commands Jun 22, 2026
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.
@jeongY-Cho jeongY-Cho force-pushed the docs/opencode-plugin-proposal branch from df393d0 to 71b712e Compare June 22, 2026 23:38
@jeongY-Cho jeongY-Cho marked this pull request as ready for review June 22, 2026 23:54
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