agentsclimarketplace

Codex exec automation

Skill Xopoko/plug-n-skills/plugins/codex-cli/skills/codex-exec-automation

Use when preparing, running, debugging, or reviewing non-interactive Codex CLI automation with `codex exec`, `codex exec resume`, `codex review`, JSONL events, output schemas, last-message files, cwd/profile/config flags, sandbox and approval modes, or CI-style agent runs.From its SKILL.md

Install
npx -y skills add Xopoko/plug-n-skills --skill codex-exec-automation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 9 stars9 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.6 KB, ~1.0k tokens by cl100k_base, as published. Nobody here has run it

Codex Exec Automation

Bundled commands use $PLUGIN_ROOT ($env:PLUGIN_ROOT in PowerShell; same path suffix) for the plugin root. Set it once: use the host's plugin-root variable when defined (Claude Code: PLUGIN_ROOT="$CLAUDE_PLUGIN_ROOT"), otherwise the absolute path of this plugin's root directory.

Use this skill for non-interactive Codex CLI work: codex exec, codex e, codex exec resume, codex exec review, top-level codex review, JSONL event streams, final-message capture, output schemas, prompt stdin, images, cwd selection, and CI-like checks.

Inspect First

Before relying on a flag, verify the installed CLI:

python3 "$PLUGIN_ROOT/scripts/codex_cli_inspector.py" --commands exec review doctor --json

If the user supplied a binary path, pass --codex "$CODEX_CLI_PATH".

Command Assembly

Build commands from these decisions, in this order:

  1. Working root: use -C <repo> or run from the intended repository.
  2. Autonomy: choose --sandbox and --ask-for-approval.
  3. Config stack: add --profile, -c key=value, --enable, --disable, or --strict-config only when needed.
  4. Prompt input: pass a short prompt argument, read from stdin with -, or pipe a structured prompt.
  5. Output contract: use --json, --output-schema <file>, or -o <file> when automation must parse results.
  6. Persistence: use --ephemeral only when the run should not persist session files.

Common safe patterns:

codex exec -C "$PROJECT" --sandbox workspace-write --ask-for-approval on-request "Implement the requested fix and run targeted tests."
codex exec -C "$PROJECT" --sandbox read-only --ask-for-approval never --json "Inspect this repo and report risks only."
codex review -C "$PROJECT" --uncommitted
codex review -C "$PROJECT" --base main
codex exec resume --last "Continue from the last non-interactive session and verify the fix."

For prompts that contain shell metacharacters, quotes, YAML, JSON, or long instructions, prefer stdin:

codex exec -C "$PROJECT" --sandbox workspace-write --ask-for-approval on-request - < prompt.md

Review Runs

Use codex review when the user asks for code review findings, changed-file risk, commit review, base-branch comparison, or uncommitted changes. Choose one review target:

  • --uncommitted for staged, unstaged, and untracked changes.
  • --base <branch> for branch diff review.
  • --commit <sha> for one commit.

Keep custom review instructions narrow and actionable. Do not ask codex review to implement fixes; run a separate codex exec task if the user wants changes.

Output Handling

Use --json for event streams and parse line-by-line. Do not load large JSONL streams into memory as one array.

Use --output-schema <file> when downstream automation needs a typed final answer. Keep schemas small, explicit, and versioned.

Use -o <file> when the last assistant message should be saved for a report or handoff. Keep output files inside the intended workspace or an ignored output directory.

Safety Boundaries

  • Do not use dangerous bypass flags unless the user explicitly selected an external sandbox boundary.
  • Do not use --ignore-user-config, --ignore-rules, or --skip-git-repo-check casually. Explain what safety or reproducibility check is being bypassed.
  • Do not pass secrets in prompt arguments. Use existing environment variables or ignored local files only when the user already owns that setup.
  • For CI, prefer read-only or workspace-write with --ask-for-approval never; do not rely on interactive approval prompts.
  • For network-dependent tasks, state whether web search, command network access, or both are required. They are separate concerns.

Failure Triage

If a run fails:

  1. Re-run the relevant --help check if the error mentions an unknown flag.
  2. Check codex doctor --summary --ascii for installation/config/auth/runtime issues.
  3. If a persisted session exists and the failure is unclear, use codex-log-reader to inspect the rollout file safely.
  4. Reduce to a read-only inspection prompt before retrying an automated edit.

Completion Standard

Report the exact command used or recommended, the sandbox and approval policy, the cwd, whether session persistence was enabled, the output file/schema if any, and the verification result or blocker.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most automation workflows skills give in ~1.0k tokens

Counted across 745 of the 1,008 authors here whose files we hold, read 2026-08-07

  • Write conventional commit messagesin 36 of 745, across 35 files
  • Delete branches after mergein 30 of 745, across 21 files
  • Make atomic commitsin 25 of 745, across 15 files
  • Write minimal code to pass testsin 22 of 745, across 10 files
  • Re-snapshot after navigation or DOM changesin 21 of 745, across 13 files
  • Use try-catch for error handlingin 20 of 745, across 8 files
  • Run tests before committingin 20 of 745, across 12 files
  • Write tests before implementationin 20 of 745, across 8 files
  • Configure branch protection rulesin 19 of 745, across 5 files
  • Explain the why in commit messagesin 19 of 745, across 9 files
  • Refactor code while tests remain greenin 19 of 745, across 6 files
  • Interact with elements using refsin 19 of 745, across 11 files

Said here and by no other author read

  • Build commands in the specified order
  • Pass a short prompt argument, read from stdin, or pipe a structured prompt
  • Parse JSON event streams line-by-line
  • Keep output schemas small, explicit, and versioned
  • Keep custom review instructions narrow and actionable
  • State whether web search or command network access is required

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,750. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.