Opencode Hooks Plugin — Development skill for Claude Code
Use claude code hooks definition in opencode.
How to install Opencode Hooks Plugin
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open romain325/opencode-hooks-plugin and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Opencode Hooks Plugin does
Use claude code hooks definition in opencode.
Alternatives in Development
- Ecc Guide — Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su 243.5k ★
- Mempalace Help — Show comprehensive MemPalace help — available skills, MCP tools, CLI commands, hooks, and architecture 58.6k ★
- Claude Code Hooks Mastery — A resource for mastering Claude Code hooks 3.4k ★
README
opencode-hooks-api
An OpenCode plugin that runs your Claude Code hooks inside OpenCode. Same config format, same execution contract, different runtime. Because apparently one place to define your hooks wasn't ambitious enough.
What it does
Reads hook definitions from `.claude/settings.json` and fires them in response to OpenCode lifecycle events. If you already have Claude Code hooks set up, they'll work here without any changes.
Supports all four hook types: `command` (bash), `http` (POST), `prompt` (LLM call), and `agent` (LLM call, but it gets to think longer).
Local development setup
If you want to use the plugin directly from a local checkout — without publishing to npm — use OpenCode's local plugin directory instead of the `plugin` array in `opencode.json`.
**1. Clone the repo and build it**
git clone https://github.com/your-org/opencode-hooks-api
cd opencode-hooks-api
bun install
bun run build # compiles src/ → dist/
**2. Symlink (or copy) the compiled entry point into your project's plugin directory**
# From the root of the project where you want to use the plugin:
mkdir -p .opencode/plugins
ln -s /path/to/opencode-hooks-api/dist/index.js .opencode/plugins/opencode-hooks-api.js
Alternatively, copy the file if you don't want a symlink:
cp /path/to/opencode-hooks-api/dist/index.js .opencode/plugins/opencode-hooks-api.js
OpenCode automatically loads every `.js` / `.ts` file found in `.opencode/plugins/` at startup — no entry in `opencode.json` needed.
**3. Define your hooks** in `.claude/settings.json` (same as usual — see [Setup](#setup) below).
**4. Rebuild after changes**
If you edit the source, recompile before restarting OpenCode:
# One-off rebuild
bun run build
# Or keep a watcher running while you develop
bun run dev
Setup
**1. Register the plugin** in `opencode.json`:
{
"plugin": ["opencode-hooks-api"]
}
**2. Define your hooks** in `.claude/settings.
Related Skills
Dsh Movein
Migrate Claude Code setup into DeepSeek Harness. Import skills, commands, agents, hooks, permission rules, and
Megapowers
Skills, plugins, and hooks that change how coding agents work — Claude Code, Codex, OpenCode, Antigravity. Mea
Agenthooks
Author coding-agent hooks once in Go — Claude Code, Cursor, Codex, Gemini CLI, OpenCode, Kimi Code
.Dotfiles Agents
Catalog-driven config that syncs MCP servers, skills, plugins, hooks, and instructions into coding agents (ope
Opencode Agent Plugin Support
OpenCode plugin to load Claude Code plugins (skills, MCP, commands, instructions, agents, hooks)
TDD Sdd
Use-case-driven (SDD) and TDD harness for Claude Code and opencode. Human-approved specs, red → green → review
Related Agents
Agent Of Empires
Claude Code, OpenCode, Mistral Vibe, Codex CLI, Gemini CLI Coding Agent Terminal Session manager via tmux and
Web Search Opencode
Skills Manager (AI 技能管理器)
一款用于管理 AI 编程助手技能(Skills)的统一桌面应用。 无缝组织、同步和共享 Claude Code、Codex、Opencode 及其他 AI 工具的技能。 Version Platform