# Hook Development

> Design and implement Codex guardrail hooks and policy checks using repository automation (scripts/CI/pre-commit) plus AGENTS.md rules. Use when user asks to prevent risky actions, enforce standards, or validate operations before/after changes.

- Skill: `rldyourmnd/hook-development` (Agent Skill)
- Install (CLI): `npx skillmds@latest add rldyourmnd/hook-development`
- Raw SKILL.md: https://api.skillmd.com/api/skills/rldyourmnd/hook-development/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: rldyourmnd (https://skillmd.com/u/rldyourmnd)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/rldyourmnd/hook-development

---


# Hook Development (Codex)

Codex does not use Claude plugin hooks directly. Build equivalent guardrails with repository-native tooling.

## Preferred Mechanisms
1. `AGENTS.md` for behavioral policy.
2. Pre-commit/CI checks for enforcement.
3. Wrapper scripts or Make targets for safe workflows.

## Workflow
1. Define the exact unsafe behavior to catch.
2. Add deterministic checks (lint/static/security/tests) with clear failure output.
3. Keep checks fast and scoped.
4. Add bypass policy only if necessary and auditable.
5. Document remediation steps for each failure.

