Files
OpenCode Agent d513808ac0 Implement pack registry system and management CLI
Add registry.json manifests to agent packs and commands to support
structured discovery. Include a CLI for project initialization, a
registry generator script, and a plugin version locker. Add a new
learn command for session documentation.
2026-01-28 21:00:03 +00:00
..

OpenCode Plugin Generator

This workflow pack enables OpenCode to generate its own TypeScript plugins. It bundles the SDK documentation, a slash command that triggers the workflow, and a required agent profile.

plugin-creator

Installation

Clone the OpenCode source repo and copy this pack into it. The scripts and paths assume the OpenCode repo layout and will not work as a global install.

git clone https://github.com/sst/opencode/
# place this pack inside the cloned repo

Usage

Use the slash command to generate a new plugin:

/create-plugin "block any bash command that contains 'rm -rf'"

The command triggers the workflow, loading the agent and skill to look up the correct SDK hooks and generate the TypeScript code.

Components

  • Command (/create-plugin): Triggers the workflow and passes your description to the agent.
  • Skill (create-opencode-plugin): Contains the API reference, event types, and TypeScript definitions. This ensures the generated code compiles.
  • Agent (Plugin Creator): Required specialized agent profile tuned for plugin development.

Skill Configuration

Note

The Plugin Creator agent has 1 skill enabled by default: create-opencode-plugin. All other skills are blocked with "*": "deny". This ensures the agent focuses on plugin development without context pollution.

The agent's YAML frontmatter controls skill access:

permission:
  skill:
    create-opencode-plugin: allow
    '*': deny