codex-compat
Installation
SKILL.md
Codex Compatibility Layer
Codex supports Claude-style lifecycle hooks for SessionStart, SubagentStart, PreToolUse, PermissionRequest, PostToolUse, PreCompact, PostCompact, UserPromptSubmit, SubagentStop, and Stop (https://developers.openai.com/codex/hooks). Claude-only events with no Codex analog -- FileChanged, WorktreeCreate, SessionEnd, PostToolUseFailure (folded into Codex PostToolUse) -- use the Stop-batch fallback or are dropped by design. PreToolUse/PostToolUse matchers support Bash, MCP tool names, apply_patch, and Edit|Write aliases. Map Edit|Write hooks direct whenever possible. Run /read-the-damn-docs for current hook behavior; use /plan-arbiter when direct-vs-fallback mapping is ambiguous.
What This Creates
.codex/hooks.json-- direct translation for supported Claude hooks.codex/hooks/codex-batch-check.sh-- fallback only for checks that cannot run per tool eventAGENTS.md+CLAUDE.md-- shared project rules (Codex reads AGENTS.md, Claude Code reads CLAUDE.md)- compatibility matrix -- classify hooks as
direct,direct with shim,fallback only, orunsupported