codex-setup

Initializes AGENTS.md and installs git hooks for Codex CLI projects.

189|25|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/sd0xdev/sd0x-harness --skill codex-setup-sd0xdev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codex-setup
Source: https://github.com/sd0xdev/sd0x-harness/tree/main/skills/codex-setup
Command: npx skills add https://github.com/sd0xdev/sd0x-harness --skill codex-setup-sd0xdev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up the sd0x-dev-flow harness for Codex CLI and other non-Claude agents requires manually generating an AGENTS.md kernel, wiring git hooks across different hook managers (Husky, core.hooksPath, .git/hooks), and verifying the installation actually works. This Skill automates that entire bootstrap and keeps it verifiable. ## Core Features & Use Cases - init: Generates the AGENTS.md kernel from project context, installs the commit-msg attribution guard, and copies runner scripts, with the pre-push gate available as an opt-in via --with-push-gate. - doctor: Verifies installation integrity by checking that files exist, the AGENTS.md hash matches, and each recorded hook is actually the one git resolves and executes. - sync: Re-generates AGENTS.md and refreshes installed hooks and scripts after a skill update, preserving prior opt-in choices recorded in state. - Use Case: After running npx skills add sd0xdev/sd0x-harness in a repository that uses Husky, run the setup to get a working AGENTS.md plus a commit-msg guard prepended into .husky/commit-msg without clobbering existing hooks. ## Quick Start Ask the agent to run codex-setup init in your repository to generate AGENTS.md and install the commit-msg hook, optionally adding --with-push-gate for the pre-push gate.

Frequently Asked Questions about codex-setup

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

FAQPage Schema
How do I set up AGENTS.md for Codex CLI in a new project?▼

Run codex-setup init after installing skills with npx skills add sd0xdev/sd0x-harness. It detects your repo root and test command, generates AGENTS.md via the build-codex-artifacts script, and installs the commit-msg hook.

How do I install the pre-push gate hook?▼

Pass --with-push-gate to init or sync. The gate is opt-in because it reads /dev/tty and waits for a human, so it is never installed by default or via an interactive prompt.

Does codex-setup work with Husky git hooks?▼

Yes. When a .husky directory exists, it prepends a hardened stanza into .husky/commit-msg or .husky/pre-push rather than overwriting the file, and verifies git's resolved hook path actually reaches the stanza.

What happens if my repository already has a pre-push hook?▼

The installer classifies the existing hook by content and refuses to overwrite anything not owned by sd0x. It records the status as pending and tells you to move or rename the foreign hook, then re-run.

How do I verify the hook installation actually works?▼

Run codex-setup doctor. It checks that files exist, the AGENTS.md hash matches, and each recorded hook is active by comparing git's resolved hook path against the written file, including executability and ownership.

Why does doctor report pending after setup?▼

Pending means the hook was written but git does not resolve to it, for example when core.hooksPath points elsewhere or the fallback .githooks directory was used without running git config core.hooksPath .githooks.