en un clic
create-hook
// 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.
// 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.
| name | create-hook |
| description | 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. |
Use 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.Use when the user wants an end-to-end premium visual design workflow for any type of website or web page created directly from images.
Add a Codex plugin from a GitHub repo to a repo or personal marketplace using the current Codex plugin layout and marketplace metadata.
Create and update Codex custom agents using standalone custom-agent TOML files.
Only to be triggered by explicit /parallel-task commands.
[EXPLICIT INVOCATION ONLY] Creates dependency-aware implementation plans optimized for parallel multi-agent execution.
Only to be triggered by explicit super-swarm-spark commands.