agentleFS
malinskibeniaminmalinskibeniamin/skills/codex-compat/SKILL.md

codex-compat

Skill4 starsChanged 10 days agoMITView on GitHub

Generate Codex hooks.json and AGENTS.md parity surfaces from the Claude hook manifest.

The file

Files
SKILL.md

Codex supports Claude-style SessionStart, SubagentStart, PreToolUse, PermissionRequest, PostToolUse, PreCompact, PostCompact, UserPromptSubmit, SubagentStop, and Stop hooks. Claude-only events (FileChanged, WorktreeCreate, SessionEnd, PostToolUseFailure) use a safe Stop-batch fallback or are dropped. Tool matchers cover Bash, MCP, apply_patch, and Edit|Write; map edit hooks direct when possible. Use /read-the-damn-docs for current behavior and /plan-arbiter for ambiguous mappings.

Creates

  • .codex/hooks.json: supported direct hooks.
  • .codex/hooks/codex-batch-check.sh: fallback-only checks.
  • .codex/rules/frontend-skills.rules: execpolicy floor.
  • Root AGENTS.md + CLAUDE.md: shared rules.
  • compatibility matrix: direct|direct with shim|fallback only|unsupported.

Steps

  1. Classify every .claude/settings.json hook with REFERENCE.md.
  2. Generate .codex/hooks.json: lifecycle events direct; Bash/Edit|Write/apply_patch/mcp__.* pre/post direct; PermissionRequest direct only when scripts accept Codex payloads; omit/document unsafe unsupported cases.
  3. Copy scripts/codex-batch-check.sh only when fallback is required; make executable.
  4. Copy hooks/frontend-skills.rules to .codex/rules/.
  5. Generate AGENTS/CLAUDE from the reference template.
  6. Set [features] hooks = true in config.toml; run /hooks and trust definitions again after changes. CI uses managed hooks or --dangerously-bypass-hook-trust. Optional notify = ["bash", "<repo>/.claude/hooks/codex-notify.sh"].

Verify

  • Direct source Edit|Write PostToolUse hooks exist; batch checker exists only for fallback.
  • Rules copy is byte-identical; hooks active/trusted, not pending.
  • Root AGENTS/CLAUDE exist; .claude/settings.json unchanged.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.