

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# src/hooks/claude-code-hooks/ (Claude Code Compatibility)23**Generated:** 2026-07-17 (7d664b96b)45## OVERVIEW67~2850 LOC across 23 files. Claude Code `settings.json` compatibility layer. Parses CC hooks config and maps CC hook events (PreToolUse, PostToolUse, Stop, Notification, PreCompact, Session*) to OpenCode event handlers.89## WHAT IT DOES10111. Parses Claude Code `settings.json` hooks config (PreToolUse, PostToolUse, Stop, Notification, PreCompact, SessionStart/End, Subagent*, etc.) from `.claude/settings.json` and `.claude/settings.local.json` (`config.ts`)122. Maps CC hook events to OpenCode event handlers (`claude-code-hooks-hook.ts`)133. Dispatches CC hook commands (shell via zsh, or HTTP) and reads PermissionDecision / stop / suppress output (`dispatch-hook.ts`, `execute-http-hook.ts`)144. Loads plugin extended config (`opencode-cc-plugin.json`) from plural OpenCode config dirs + project, merging `disabledHooks` (`config-loader.ts`)1516## CC → OPENCODE HOOK MAPPING1718| CC Hook | OpenCode Event |19|---------|---------------|20| PreToolUse | tool.execute.before |21| PostToolUse | tool.execute.after |22| Notification | event (session.idle) |23| Stop | event (session.idle) |2425## PERMISSIONS & DISABLED HOOKS2627- PreToolUse hooks return a `PermissionDecision` (`allow` / `deny` / `ask`); legacy `approve` / `block` are mapped. `permission_mode` (`default` / `plan` / `acceptEdits` / `bypassPermissions`) is forwarded to CC hooks.28- `disabledHooks` in `opencode-cc-plugin.json` disables specific hook commands by regex per event type. `config-loader.ts` `isHookCommandDisabled()` checks a command against the configured patterns.2930```json31{32 "disabledHooks": {33 "PreToolUse": ["bash-forever", "^dangerous-"],34 "PostToolUse": ["telemetry"]35 }36}37```3839## PLUGIN CONFIG LOADING4041`config-loader.ts` loads `opencode-cc-plugin.json` from every OpenCode config dir returned by `getOpenCodeConfigDirs({ binary: "opencode" })` (plural), plus the project-local `.opencode/opencode-cc-plugin.json`. User dirs are merged in reverse order so later (custom) dirs override earlier (default) ones; project config overrides all. Only `disabledHooks` is merged. Result is cached 30s (`CONFIG_CACHE_TTL_MS`); the cache key includes `process.cwd()` and the joined user paths.4243## FILES4445| File | Purpose |46|------|---------|47| `claude-code-hooks-hook.ts` | `createClaudeCodeHooksHook()`: main factory, maps OpenCode events to CC handlers |48| `config.ts` | Parse CC `settings.json` hooks config from `.claude/` (matchers + hook actions) |49| `config-loader.ts` | Load `opencode-cc-plugin.json` (plural config dirs + project), merge `disabledHooks`, cache; `isHookCommandDisabled()` |50| `dispatch-hook.ts` | `dispatchHook()`: run a CC hook command (shell via zsh, or HTTP) |51| `execute-http-hook.ts` | Execute HTTP-type CC hooks |52| `plugin-config.ts` | `DEFAULT_CONFIG` (forceZsh, zshPath) |53| `pre-tool-use.ts` / `post-tool-use.ts` / `stop.ts` / `user-prompt-submit.ts` / `pre-compact.ts` | Per-event CC hook handlers |54| `handlers/` | OpenCode event handlers (tool-execute-before/after, chat-message, pre-compact, session-event) |55| `types.ts` | CC type definitions |56
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/tools/look-at/AGENTS.md · 68k | AGENTS.md | arch | 68/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentassets/AGENTS.md · 68k | AGENTS.md | buildteststylearch | 88/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/AGENTS.md · 68k | AGENTS.md | buildtestlint-formatstyle+3 | 83/100 | today | |
| code-yeongyu/oh-my-openagentpackages/omo-codex/plugin/components/ultrawork/AGENTS.md · 68k | AGENTS.md | buildteststylearch+1 | 77/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/tools/background-task/AGENTS.md · 68k | AGENTS.md | arch | 70/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/agents/sisyphus/AGENTS.md · 68k | AGENTS.md | arch | 56/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/hooks/ralph-loop/AGENTS.md · 68k | AGENTS.md | arch | 62/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/hooks/rules-injector/AGENTS.md · 68k | AGENTS.md | archdo-not | 69/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/hooks/runtime-fallback/AGENTS.md · 68k | AGENTS.md | stylearchtypes | 70/100 | 13 days ago | |
| code-yeongyu/oh-my-openagent.agents/AGENTS.md · 68k | AGENTS.md | stylearchtesting-strategydatabase | 64/100 | 13 days ago | |
| code-yeongyu/oh-my-openagent.opencode/AGENTS.md · 68k | AGENTS.md | stylearchdo-not | 71/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentAGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+11 | 84/100 | today | |
| code-yeongyu/oh-my-openagentpackages/agents-md-core/AGENTS.md · 68k | AGENTS.md | archdependenciesapi | 48/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/ast-grep-mcp/AGENTS.md · 68k | AGENTS.md | buildstylearchdependencies+1 | 78/100 | 7 days ago | |
| code-yeongyu/oh-my-openagentpackages/boulder-state/AGENTS.md · 68k | AGENTS.md | archapi | 48/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/claude-code-compat-core/AGENTS.md · 68k | AGENTS.md | archagent-behaviour | 56/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/comment-checker-core/AGENTS.md · 68k | AGENTS.md | archdependenciesapi | 48/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/delegate-core/AGENTS.md · 68k | AGENTS.md | stylearchdependenciesapi | 60/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/git-bash-mcp/AGENTS.md · 68k | AGENTS.md | buildtestlint-formatarch+1 | 82/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/hashline-core/AGENTS.md · 68k | AGENTS.md | archtypesdependenciesapi | 48/100 | 13 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 8 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/code-yeongyu-oh-my-openagent-packages-omo-opencode-src-hooks-claude-code-hooks-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.