Create or update Codex hooks for global or project scope by asking for scope and hook type when ambiguous, then writing the hook config, scripts, and any required feature flag config.
63
74%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./skills/create-hook/SKILL.mdUse when the user wants to add Codex hooks and explains the behavior they want.
Determine scope.
global, use the personal/home scope.project, use the repo scope.Should this be global or project-scoped?Determine hook type.
SessionStartUserPromptSubmitPreToolUsePostToolUseStopDetermine behavior.
Write the hook files in the chosen scope.
~/.codex/hooks.json and ~/.codex/hooks/<repo>/.codex/hooks.json and <repo>/.codex/hooks/Enable the feature flag if the target Codex build still gates hooks.
[features] codex_hooks = true in the relevant config.toml.Keep the hook output clear.
statusMessage for a short visible signal.Verify the result.
PreToolUse for prevention.PostToolUse for logging, formatting, or test follow-up.UserPromptSubmit for prompt shaping and injected context.SessionStart for startup context.Stop for end-of-turn checks.9f954c3
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.