← ClaudeAtlas

opencode-pluginslisted

Use this skill when building OpenCode plugins, hooking into OpenCode's lifecycle events, intercepting tool execution, injecting environment variables, adding custom tools via plugins, understanding plugin loading order and dependencies, or debugging plugin issues. Covers all plugin hooks, event types, TypeScript support, npm/local loading, custom tool creation, and real-world plugin patterns.
Timmy6942025/opencode-builder-skill · ★ 1 · AI & Automation · score 74
Install: claude install-skill Timmy6942025/opencode-builder-skill
# OpenCode Plugins > **📚 Official Docs:** For the latest information, always refer to the official documentation: > [https://opencode.ai/docs/plugins/](https://opencode.ai/docs/plugins/) Write your own plugins to extend OpenCode. Plugins hook into events, customize behavior, add custom tools, and integrate with external services. --- ## Plugin Loading OpenCode loads plugins from multiple sources. Understanding the loading mechanism is critical for correct plugin placement and debugging. ### Local Files Place JavaScript or TypeScript files in the plugin directory: - `.opencode/plugins/` — **Project-level plugins** (scoped to the current project) - `~/.config/opencode/plugins/` — **Global plugins** (available across all projects) Files in these directories are automatically loaded at startup. Each file must export one or more plugin functions (see [Plugin Structure](#plugin-structure)). ### npm Packages Specify npm packages in your config file's `"plugin"` array: ```json { "$schema": "https://opencode.ai/config.json", "plugin": [ "opencode-helicone-session", "opencode-wakatime", "@my-org/custom-plugin" ] } ``` Both **regular** (`package-name`) and **scoped** (`@scope/package-name`) npm packages are supported. Browse available plugins in the [ecosystem](https://opencode.ai/docs/ecosystem#plugins). ### How Plugins Are Installed **npm plugins** are installed automatically using Bun at startup. Packages and their dependencies are cached in `~/.cach