Hamza-Abili

Opencode Hooks — Development skill for Claude Code

Development community

OpenCode plugin (V1+V2) that runs your existing Claude Code hooks natively: settings, plugin, skill and subagent hooks, with trust, timeouts, structured decisions and a compatibility doctor.

How to install Opencode Hooks

This entry records only its repository, not the path inside it, so there is no exact command to give. Open Hamza-Abili/opencode-hooks and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Opencode Hooks does

OpenCode plugin (V1+V2) that runs your existing Claude Code hooks natively: settings, plugin, skill and subagent hooks, with trust, timeouts, structured decisions and a compatibility doctor. Zero runtime dependencies.

Alternatives in Development

  • Doctor — Environment diagnostics with interactive fixes — providers, auth, RTK, hooks, token optimization 2.8k ★
  • Save Session Log — Save a structured record of the current session — what was discussed, what was analyzed/built, where files wer 31 ★
  • Ableton Export — Pre-export checklist before rendering audio 26 ★

README

opencode-hooks

[![CI](https://github.com/Hamza-Abili/opencode-hooks/actions/workflows/ci.yml/badge.svg)](https://github.com/Hamza-Abili/opencode-hooks/actions/workflows/ci.yml) [![npm](https://img.shields.io/npm/v/%40hamzaabili%2Fopencode-hooks)](https://www.npmjs.com/package/@hamzaabili/opencode-hooks) [![npm downloads](https://img.shields.io/npm/dt/%40hamzaabili%2Fopencode-hooks)](https://www.npmjs.com/package/@hamzaabili/opencode-hooks) [![GitHub stars](https://img.shields.io/github/stars/Hamza-Abili/opencode-hooks?style=social)](https://github.com/Hamza-Abili/opencode-hooks/stargazers) [![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)

**Run Claude Code and Codex hooks natively in OpenCode V1 and V2.**

`opencode-hooks` reads the native configuration you already use — Claude Code settings, plugins, skills and subagent frontmatter, and Codex `hooks.json` — and executes it at the matching OpenCode lifecycle point. One package, two dialects, no wrapper binary, no daemon, zero runtime dependencies.

Claude Code settings / plugins / skills ─┐
                                          ├─▶ discovery ─▶ trust ─▶ execute ─▶ decision
Codex hooks.json                         ─┘                                      │
                                                                          OpenCode hooks

The previous package name, `@hamzaabili/opencode-claude-hooks`, is retained for existing Claude-only installs. New installs should use `@hamzaabili/opencode-hooks`.

Why

Hooks are small, useful, and already written: block `rm -rf`, run a formatter after edits, inject project context at session start, validate a prompt, stop a turn until tests pass. Moving between harnesses should not mean rewriting them.

Most compatibility packages cover commands, agents, skills or provider auth, but not the hook runtime. This plugin is the missing layer, with the safety rails a hook runner needs: explicit trust, timeouts, output limits, environment m