/agent-hooks:agent-hooksfrom agent-hooks
Load this skill immediately after a user mentions "@goodfoot/agent-hooks", Claude Code hooks, Codex hooks, or Antigravity hooks.
Ships in agent-hooks. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
@goodfoot/agent-hooks compiles TypeScript hook sources into executables for a host agent. Identify the host the user is targeting, then load that host's reference before writing, building, or debugging any hook — each host has its own build command, hook types, output shapes, and limits:
reference/claude-code.md — Claude Code hooks (@goodfoot/agent-hooks/claude-code): build/scaffold commands, the full hook-type capability table, typed tool inputs, patterns, and configuration. Detailed references live in reference/claude-code/.reference/codex.md — Codex hooks (@goodfoot/agent-hooks/codex): build/scaffold commands, the 10 hook types, tool_input narrowing, Codex-specific limits, and command-emission modes. Detailed references live in reference/codex/.reference/antigravity.md — Antigravity hooks (@goodfoot/agent-hooks/antigravity): the 5 events, the named-hook hooks.json shape, and the exit-0 wire invariant. Load whenever Antigravity hooks come up.reference/smoke-test.md — host-independent: how to prove a compiled hook installs and fires, and how to label the result. Load before claiming a hook works on any host.OpenCode 2.1.2: import @goodfoot/agent-hooks/opencode with @opencode/plugin@^2.1.2.
Default-export defineOpenCodePlugin({ id, async setup(ctx) { ... } }).
Build: --agent opencode -i "src/**/*.ts" -o .opencode/plugins.
Each source emits a package directory (package.json, index.js), discovered automatically there.
For output elsewhere, configure directory paths in plugins; file paths are rejected.
Register hooks with await ctx.tool.hook("execute.before", event => { ... });
arguments are in event.input. Use ctx.skill.transform for skill contributions and ctx.event.subscribe for events.
Return cleanup from setup. V1 plugin exports are unsupported.
Builds omit inline sourcemaps by default for smaller, reviewable, reproducible artifacts. Pass --sourcemap explicitly when original TypeScript locations are needed in runtime stack traces.
Do not answer from one host's reference about another host: the hosts differ in substance (hook vocabularies, output envelopes, capabilities), not just syntax.
reference/antigravity.md (opens in a new tab)reference/claude-code.md (opens in a new tab)reference/claude-code/environment.md (opens in a new tab)reference/claude-code/input-types.md (opens in a new tab)reference/claude-code/installation.md (opens in a new tab)reference/claude-code/logging.md (opens in a new tab)reference/claude-code/output-builders.md (opens in a new tab)reference/claude-code/porting.md (opens in a new tab)reference/codex.md (opens in a new tab)reference/codex/environment.md (opens in a new tab)reference/codex/input-types.md (opens in a new tab)reference/codex/installation.md (opens in a new tab)reference/codex/logging.md (opens in a new tab)reference/codex/output-builders.md (opens in a new tab)reference/codex/porting.md (opens in a new tab)reference/smoke-test.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub goodfoot-io/marketplace --plugin agent-hooks