opencode-plugin-development

Build OpenCode plugins with TypeScript using the OpenCode Plugin SDK.

1|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/pantheon-org/opencode-plugins --skill opencode-plugin-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode-plugin-development
Source: https://github.com/pantheon-org/opencode-plugins/tree/main/.opencode/skills/opencode-plugin-development
Command: npx skills add https://github.com/pantheon-org/opencode-plugins --skill opencode-plugin-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured guide to building OpenCode plugins with TypeScript, including plugin structure, tooling, authentication providers, event hooks, chat and permission hooks, shell integration, testing, and configuration.

Core Features & Use Cases

  • Plugin scaffolding: Clear steps to scaffold a new OpenCode plugin using TypeScript with a consistent project layout.
  • Tooling & Hooks: Covers tool definitions, chat hooks, permission checks, and tool execution lifecycle.
  • Deployment & Testing: Guidance on building, testing, and deploying plugins, including shell integration for commands.
  • Use Case: A developer wants to create a new OpenCode plugin that exposes a custom tool and authenticates with a provider.

Quick Start

  1. Create a new plugin package and initialize with bun or npm.
  2. Install dependencies: @opencode-ai/plugin, @opencode-ai/sdk, and typescript.
  3. Implement the plugin by exporting a Plugin function with hooks and tools, then build and test locally.

Frequently Asked Questions about opencode-plugin-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an OpenCode plugin with TypeScript?

To build an OpenCode plugin with TypeScript, initialize a package with bun or npm, install the @opencode-ai/plugin and @opencode-ai/sdk dependencies, and export a Plugin function containing your hooks and tools.

How do OpenCode plugin hooks and tools work?

OpenCode plugin hooks intercept chat and permission requests during the tool execution lifecycle, while custom tools define specific executable actions exposed by the plugin to the OpenCode environment.

Do I need the OpenCode Plugin SDK to add authentication to my plugin?

Yes, you need the OpenCode Plugin SDK and the @opencode-ai/plugin package to implement authentication providers, enabling your custom tools to securely authenticate with external services.

What's the best way to test and deploy an OpenCode plugin locally?

The best way to test and deploy an OpenCode plugin locally is to build the TypeScript project, configure shell integration for commands, and run the plugin directly in your development environment.

Can I use shell integration commands within my OpenCode plugin?

Yes, you can use shell integration within OpenCode plugins to execute shell commands, allowing your custom tools to interact directly with the system environment during tool execution.

What are the limitations of OpenCode plugin development?

OpenCode plugin development requires basic TypeScript tooling knowledge and relies on the @opencode-ai/sdk, meaning plugins must adhere to the SDK's defined tool execution lifecycle and chat hook structures.