codex-compat

Map Claude Code hooks to Codex-compatible hooks and generate .codex/hooks.json.

3|1|Updated Mar 23, 2026
One-click install
npx skills add https://github.com/malinskibeniamin/skills --skill codex-compat
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codex-compat
Source: https://github.com/malinskibeniamin/skills/tree/main/codex-compat
Command: npx skills add https://github.com/malinskibeniamin/skills --skill codex-compat

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Bridges Claude Code hooks to Codex-compatible hooks to enable dual-agent workflows and easier plugin compatibility.

Core Features & Use Cases

  • Generate .codex/hooks.json with direct translations for supported Claude hooks (SessionStart, UserPromptSubmit, Stop) and direct mappings for PreToolUse / PostToolUse including Edit|Write and apply_patch.
  • Create codex-batch-check.sh as a fallback checker for batch-level validation of hooks that can't run per-tool.
  • Produce AGENTS.md and CLAUDE.md to document project rules and compatibility.
  • Provide an explicit compatibility matrix to classify hooks as direct, direct with shim, fallback only, or unsupported.

Quick Start

Run the mapping workflow to generate Codex-compatible hooks and documentation from Claude Code hooks.

Frequently Asked Questions about codex-compat

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Claude Code hooks to Codex-compatible hooks?▼

Hook compatibility for Codex is achieved by mapping supported Claude hooks directly and using a batch-level fallback checker script for those that cannot run per-tool, ensuring cross-agent workflows function seamlessly.

How does PreToolUse hook translation work for Codex integration?▼

Generating Codex hooks involves mapping supported Claude hooks directly, using shims for intermediate compatibility, or applying fallback batch scripts, producing a `.codex/hooks.json` file alongside compatibility documentation.

Can I use Claude Code settings with Codex without manual rewriting?▼

Running the hook mapping workflow requires an existing `.claude/settings.json` file to analyze, producing a Codex-compatible hooks configuration and project documentation without manual rewriting.

What is the fallback mechanism for unsupported Codex hooks?▼

Hook compatibility limitations arise when specific Claude hooks cannot run per-tool in Codex, requiring a fallback batch-level checker and resulting in an explicit classification of direct, shim, fallback, or unsupported.