create-opencode-plugin

Create custom OpenCode plugins using the official SDK.

Updated Feb 9, 2025
One-click install
npx skills add https://github.com/xeon826/dotfiles --skill create-opencode-plugin-xeon826
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-opencode-plugin
Source: https://github.com/xeon826/dotfiles/tree/main/opencode/skill/create-opencode-plugin
Command: npx skills add https://github.com/xeon826/dotfiles --skill create-opencode-plugin-xeon826

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating custom plugins for OpenCode, enabling developers to extend the platform's functionality without deep-diving into SDK specifics.

Core Features & Use Cases

  • Plugin Scaffolding: Generates the basic structure for new plugins.
  • SDK Integration: Guides users on using the @opencode-ai/plugin SDK.
  • Hook Implementation: Provides patterns for implementing various hooks (events, tools, permissions, etc.).
  • Use Case: You need to create a plugin that intercepts specific tool calls to add custom validation logic before they are executed by OpenCode.

Quick Start

Use the create-opencode-plugin skill to build a new plugin that blocks dangerous commands.

Frequently Asked Questions about create-opencode-plugin

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

FAQPage Schema
How do I build a custom plugin for the OpenCode AI platform?

To build a custom OpenCode plugin, use the official `@opencode-ai/plugin` SDK to scaffold the project structure, implement hooks, and define custom tools. The workflow covers feasibility validation, implementation, testing, and publishing.

Can I intercept tool calls to add custom validation logic in OpenCode?

Yes, you can intercept tool calls by implementing execution interception logic via the OpenCode plugin SDK. This allows you to inject custom validation or permission checks before OpenCode executes the requested tools.

What types of hooks can I implement when developing an OpenCode plugin?

When developing an OpenCode plugin, you can implement hooks for events, custom tools, permissions, and authentication providers. These hooks integrate directly with the OpenCode AI platform using the official TypeScript SDK.

Does creating an OpenCode plugin require TypeScript and the official SDK?

Creating an OpenCode plugin relies on the official `@opencode-ai/plugin` SDK and uses TypeScript for development. The scaffolding process generates the required TypeScript project structure to extend the platform.

What is the best way to add custom authentication providers to OpenCode?

The best way to add custom authentication providers to OpenCode is by developing a dedicated plugin using the `@opencode-ai/plugin` SDK. This approach provides structured patterns for integrating external authentication workflows.