OpenCode SDK Development

Installation
SKILL.md

OpenCode SDK Development

Guide for creating custom tools and plugins using the OpenCode SDK.

Overview

OpenCode provides two main packages for SDK development:

Package Purpose
@opencode-ai/sdk Client SDK for interacting with OpenCode server (sessions, messages, files)
@opencode-ai/plugin Plugin system for creating custom tools with schema validation

Quick Start: Custom Tools

Custom tools extend OpenCode's capabilities. Tools are TypeScript/JavaScript files auto-discovered from:

  • Local: .opencode/tool/ in project directory
  • Global: ~/.config/opencode/tool/
Installs
Repository
smithery/ai
First Seen
OpenCode SDK Development — smithery/ai