@howaboua/create-opencode-plugin
v1.0.1
Published
OpenCode workflow pack that generates plugins via /create-plugin
Maintainers
Readme
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.
Installation
Add to your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@howaboua/create-opencode-plugin@latest"]
}OpenCode installs plugin dependencies automatically on next launch.
For local development:
{
"plugin": ["file:///absolute/path/to/create-opencode-plugin/dist/index.js"]
}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 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