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
- IPolloWork — Enterprise-grade, local-first Agent Workbench for people and agent teams 4.9k ★
- Petdex — A public gallery of animated pets for Codex, Claude Code, DeepSeek Harness, Hermes, OpenCode, Gemini CLI, and 4k ★
- Hapi — App for Claude Code / Codex / Gemini / OpenCode, vibe coding anytime, anywhere 3.6k ★
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
MCP Language Server
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, a
Engage.Scope
Execute Phase 0 - Scope Definition and Rules of Engagement
CI Mockup Figure
Read and follow the skill definition. Look for it at skills/ci-mockup-figure/SKILL.md first, then .claude/skil
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