agents-hooks

Featured

Configures Claude Code hooks and Codex hooks.json/notify callbacks. Use when adding guardrails, preflight, audit trails, worktree automation, or budget enforcement.

AI & Automation 80 stars 17 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
64
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Claude Code Hooks + Codex Notifications Use this skill when hook behavior is the main concern: Claude lifecycle hooks, runtime preflight, guardrails, async verification, worktree lifecycle checks, subagent coordination, or Codex notification callbacks. Claude and Codex are not equivalent here. Claude has a broad, stable hook system (30 events, re-verified against official docs 2026-07-11). Codex has two surfaces: the long-stable notification surface (`notify` + `tui.notifications`), and a newer lifecycle-hooks system (`hooks.json` with events including `SessionStart`, `UserPromptSubmit`, `SubagentStop`, `Stop`, `PreCompact`/`PostCompact` — see [developers.openai.com/codex/hooks](https://developers.openai.com/codex/hooks)). The Codex hooks system is less mature than Claude's and has known firing-reliability gaps (e.g. [codex#17532](https://github.com/openai/codex/issues/17532): repo-local `.codex/config.toml` hooks may not fire in interactive sessions). Prefer `notify` for anything that must be dependable; treat Codex `hooks.json` as usable-but-verify and confirm it fires on your runtime before relying on it. ## Quick Reference | Need | Event / Approach | |------|---------| | enforce pre-tool policy or guardrails | `PreToolUse` command hook | | fast runtime checks at session start | `SessionStart` or `Setup` | | react to user prompt before Claude sees it | `UserPromptSubmit` | | run checks after edits (non-blocking) | `PostToolUse` (async/background) | | catch tool failu...

Details

Author
vasilyu1983
Repository
vasilyu1983/AI-Agents-public
Created
9 months ago
Last Updated
1 weeks ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category