What problem does it solve? Automating custom logic around agent events requires knowing the correct hook events, file locations, JSON schema, and output fields, which is error-prone when done by hand. This Skill guides the creation of working Codex hooks that observe, block, modify, or follow up on agent behavior. ## Core Features & Use Cases - Hook Configuration: Creates or updates hooks.json files with schema version 1, choosing the correct project-level or user-level location and path style. - Event and Matcher Selection: Picks the narrowest hook event (such as beforeShellExecution, preToolUse, or afterFileEdit) and adds JavaScript-style regex matchers to limit when hooks fire. - Command and Prompt Hooks: Writes executable command hook scripts that exchange JSON over stdin/stdout, or prompt hooks for lightweight policy decisions. - Use Case: A user wants to block risky network commands in their repository. The Skill creates a project-level beforeShellExecution hook with a failClosed script that flags curl, wget, or nc commands for review before execution. ## Quick Start Create a project hook that asks for approval before any shell command containing curl or wget runs.