Agent skill
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.
Install this agent skill to your Project
npx add-skill https://github.com/am-will/codex-skills/tree/main/skills/create-hook
SKILL.md
Create Hook
Use when the user wants to add Codex hooks and explains the behavior they want.
Workflow
-
Determine scope.
- If the user says
global, use the personal/home scope. - If the user says
project, use the repo scope. - If scope is missing or unclear, ask:
Should this be global or project-scoped?
- If the user says
-
Determine hook type.
- If the event is missing or unclear, ask which hook they want:
SessionStartUserPromptSubmitPreToolUsePostToolUseStop
- If the user wants more than one, keep them separate unless they explicitly want shared behavior.
- If the event is missing or unclear, ask which hook they want:
-
Determine behavior.
- Ask what the hook should do if the intent is not already clear.
- Prefer the smallest deterministic script that satisfies the request.
-
Write the hook files in the chosen scope.
- Global:
~/.codex/hooks.jsonand~/.codex/hooks/ - Project:
<repo>/.codex/hooks.jsonand<repo>/.codex/hooks/ - Keep script paths explicit and relative where practical.
- Global:
-
Enable the feature flag if the target Codex build still gates hooks.
- Set
[features] codex_hooks = truein the relevantconfig.toml.
- Set
-
Keep the hook output clear.
- Use
statusMessagefor a short visible signal. - For logging hooks, write to a repo-local or home-local log file.
- For blocking hooks, return a nonzero exit only when the hook should actually stop the tool.
- Use
-
Verify the result.
- Run a command that should trigger the hook.
- Confirm the log, output, or blocking behavior matches the requested scope and event.
Practical defaults
- Use
PreToolUsefor prevention. - Use
PostToolUsefor logging, formatting, or test follow-up. - Use
UserPromptSubmitfor prompt shaping and injected context. - Use
SessionStartfor startup context. - Use
Stopfor end-of-turn checks.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
markdown-url
Route any website you need to visit through markdown.new by prefixing the URL. **WHEN TO USE:** - You would normally open a website link to read content (docs, blog posts, changelogs, GitHub issues, etc.) - You need a cleaner, Markdown-friendly view for copying notes or summarizing
Frontend Responsive Design Standards
Build responsive, mobile-first layouts using fluid containers, flexible units, media queries, and touch-friendly design that works across all screen sizes. Use this skill when creating or modifying UI layouts, responsive grids, breakpoint styles, mobile navigation, or any interface that needs to adapt to different screen sizes. Apply when working with responsive CSS, media queries, viewport settings, flexbox/grid layouts, mobile-first styling, breakpoint definitions (mobile, tablet, desktop), touch target sizing, relative units (rem, em, %), image optimization for different screens, or testing layouts across multiple devices. Use for any task involving multi-device support, responsive design patterns, or adaptive layouts.
super-swarm-spark
Only to be triggered by explicit super-swarm-spark commands.
pluginstaller
Add a Codex plugin from a GitHub repo to a repo or personal marketplace using the current Codex plugin layout and marketplace metadata.
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
plan-harder
Use when user specfically says 'plan harder'.
Didn't find tool you were looking for?