opencode-plugin-development

Guide plugin creation for OpenCode using hooks like event and tool.

2|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/ucirello/sgai --skill opencode-plugin-development-ucirello
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode-plugin-development
Source: https://github.com/ucirello/sgai/tree/main/cmd/sgai/skel/.sgai/skills/opencode-plugin-development
Command: npx skills add https://github.com/ucirello/sgai --skill opencode-plugin-development-ucirello

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance on developing and implementing plugins to enhance the functionality of OpenCode, enabling custom integrations and behavior modifications.

Core Features & Use Cases

  • Plugin Development: Learn the structure, context parameters, and available hooks for creating plugins.
  • Customization: Add new features, modify default behavior, implement custom tools, and handle specific events.
  • Use Case: You need to add a custom tool to OpenCode that analyzes code for specific security vulnerabilities or integrate a notification system that alerts you when a session becomes idle.

Quick Start

Follow the guide to create a new plugin file in the specified directory and implement the necessary hooks.

Frequently Asked Questions about opencode-plugin-development

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

FAQPage Schema
How do I develop custom plugins to extend OpenCode capabilities?

OpenCode plugin development involves creating a new plugin file and implementing necessary hooks like 'event', 'tool', and 'tool.execute.before' to modify behavior or add integrations within the environment.

What hooks are available when building OpenCode plugins?

Available OpenCode plugin hooks include 'event', 'tool', and 'tool.execute.before'. These hooks facilitate custom functionality by handling specific events and modifying tool execution behavior.

Can I add custom tools to OpenCode using TypeScript?

Yes, you can implement custom tools in OpenCode using TypeScript. The plugin structure supports defining new tools to add features like analyzing code for specific security vulnerabilities.

How do I create a notification system for idle sessions in OpenCode?

To create an OpenCode notification system that alerts when a session becomes idle, implement an event handling plugin using the available hooks to monitor and trigger notifications.

What are context parameters in OpenCode plugin development?

Context parameters in OpenCode plugin development provide the necessary environmental data and state required to execute custom logic within hooks like 'event' and 'tool.execute.before'.