hook-development

Installation
SKILL.md

Hook Development (Codex)

Overview

Codex CLI does not provide Claude-style hook events. To replicate hook behavior, implement a hook runner (wrapper script or CI job) that:

  1. Runs hook scripts before/after codex exec.
  2. Optionally parses codex exec --json output to detect tool usage.
  3. Applies a hooks.json configuration to decide which hooks to run.

This skill defines a Codex hook contract and provides utilities for validating, testing, and linting hooks.

This repository ships a reference runner at scripts/codex-hook-runner (installed by install.sh) that implements the contract described below. Hooks are enabled by default in codex-autonomous; set CODEX_DISABLE_HOOKS=1 to disable.

Hook Types

Prompt Hooks (LLM-driven)

Use an LLM (Codex or another model) to make contextual decisions.

Installs
1
GitHub Stars
10
First Seen
Jul 7, 2026
hook-development — troykelly/codex-skills