From sd0x-dev-flow
Initializes sd0x-dev-flow for Codex CLI by generating AGENTS.md, installing git hooks (commit-msg/pre-push via husky/direct/fallback), copying Node.js runner scripts, and writing install state. Use /codex-setup init/doctor/sync for new projects or skill updates.
npx claudepluginhub sd0xdev/sd0x-dev-flow --plugin sd0x-dev-flowThis skill is limited to using the following tools:
- Keywords: codex setup, codex init, agents.md, setup codex, initialize codex, codex doctor, codex sync
Audits and syncs agent instruction files across coding agents like Claude Code, Cursor, Copilot, Gemini ensuring AGENTS.md matches targets (CLAUDE.md, .cursorrules). First-run scaffolding check; syncs after edits.
Sets up CWF environment: selects hook groups, detects external tools, bootstraps setup-contract and project config, enables optional Agent Teams, Codex integration, git hooks, capability and repo indexes.
Interactive wizard configures repositories for Claude Code best practices by creating CLAUDE.md, slash commands, agents, hooks, and permissions. Activates on 'setup claude', 'init claude', or repo setup requests.
Share bugs, ideas, or general feedback.
npx skills add sd0xdev/sd0x-dev-flow| Command | Purpose |
|---|---|
init | First-time setup: generate AGENTS.md + install hooks + copy scripts |
doctor | Verify installation integrity (files exist + hash match) |
sync | Re-generate AGENTS.md + update hooks/scripts after skill update |
Default (no subcommand): init
git rev-parse --show-toplevelpackage.json if present → extract name, scripts.test.claude/CLAUDE.md or CLAUDE.md → extract test command patternscripts/build-codex-artifacts.js relative to this skillnode <plugin-root>/scripts/build-codex-artifacts.js \
--project-dir <repo-root> \
--output <repo-root>/AGENTS.md
If the file already exists, warn and ask before overwriting.
Verify output:
wc -c < AGENTS.md ≤ 24576){PROJECT_NAME}, {VERSION}, {TEST_COMMAND})Install commit-msg and pre-push git hooks using priority-ordered detection:
| Priority | Condition | Action |
|---|---|---|
| 1 | .husky/ directory exists | Append sourcing to Husky hooks |
| 2 | git config core.hooksPath is set | Install to that path |
| 3 | .git/hooks/ is writable | Direct write |
| 4 | Fallback | Write to .githooks/ + print git config core.hooksPath .githooks |
Source scripts from plugin:
commit-msg-guard.sh → commit-msg hookpre-push-gate.sh → pre-push hookCopy these scripts to the host project:
| Source | Target |
|---|---|
scripts/precommit-runner.js | .sd0x/scripts/precommit-runner.js |
scripts/verify-runner.js | .sd0x/scripts/verify-runner.js |
scripts/lib/utils.js | .sd0x/scripts/lib/utils.js |
Ensure target directories exist (mkdir -p).
Write .sd0x/install-state.json to repo root:
{
"sd0x_version": "<from plugin.json>",
"agents_md_hash": "<git hash-object AGENTS.md>",
"agents_md_size": <bytes>,
"hooks_installed": {
"commit-msg": { "hash": "<sha1>", "mode": "<husky|hooksPath|direct|fallback>" },
"pre-push": { "hash": "<sha1>", "mode": "<mode>" }
},
"scripts_installed": {
"precommit-runner.js": "<sha1>",
"verify-runner.js": "<sha1>"
},
"generated_at": "<ISO8601>"
}
| Codex sandbox | Behavior |
|---|---|
workspace-write / danger-full-access | Execute all phases automatically |
read-only | Output command list for manual execution |
Detect sandbox: if mkdir -p or file write fails, switch to read-only output mode.
| Check | Method | Pass | Fail |
|---|---|---|---|
| AGENTS.md exists | test -f AGENTS.md | File found | Missing |
| AGENTS.md hash match | Compare git hash-object vs state file | Match | Drift detected |
| AGENTS.md size ≤ 24 KiB | wc -c | ≤ 24576 | Oversized |
| Hooks installed | Check hook files exist in detected mode | Present | Missing |
| Scripts installed | Check .sd0x/scripts/ files exist | Present | Missing |
| Version match | Compare state sd0x_version vs current plugin | Match | Update available |
Output a summary table with pass/fail status for each check.
build-codex-artifacts.js → overwrite AGENTS.md.sd0x/install-state.json with new hashesreferences/agents-kernel.md — AGENTS.md kernel template