Agent skill

Codex Exec

by boshu2 in boshu2/agentops

Run one prompt through headless Codex and capture the result.

Apache-2.0Auto-check passed

Install Codex Exec

skills CLI
$ npx skills add boshu2/agentops --skill codex-exec -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install boshu2/agentops codex-exec --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/boshu2/agentops.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/codex-exec .claude/skills/codex-exec && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
codex-exec
GitHub stars
447
Used in
1 other repo
Token cost
~1.4k tokens
SKILL.md length
539 words
Files
2 (incl. references)
Skills in repo
31
Repo updated
First seen
Licence
Apache-2.0

At a glance

Run one prompt through headless Codex and capture the result.

  • : wanting a one-shot codex exec run
  • SKILL.md covers Rules that change the command, Run it, Exit codes (guarded library) and Report, then stop
  • Calls codex

What it does

Codex Exec is an agent skill from boshu2/agentops. Run one prompt through headless Codex and capture the result. Use when: wanting a one-shot codex exec run or CI step. Not for batches or retries.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/guarded-runner.md`).

The repository describes itself as: DevOps discipline for AI coding agents: shape the work, track it as a graph, and get each change judged by a context that didn't write it. The licence is Apache-2.0.

When your agent uses it

  • : wanting a one-shot codex exec run

Example prompts

  • “/codex-exec”

What it can do on your machine

Read from SKILL.md and the folder at commit 3bdbfed. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • codex

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codex Exec loads about 1.4k tokens when it runs, and up to ~2.3k if it reads all its reference files. Until then it costs about 40 tokens; SKILL.md has 539 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~40
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from boshu2/agentops at commit 3bdbfed, republished under its Apache-2.0 licence (© boshu2). 539 words, ~1,421 tokens.

Download SKILL.mdSave it as .claude/skills/codex-exec/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
codex-exec
description
Run one prompt through headless Codex and capture the result. Use when: wanting a one-shot `codex exec` run or CI step. Not for batches or retries.
skill_api_version
1
user-invocable
true
hexagonal_role
driving-adapter
practices
pragmatic-programmer
consumes
codex-command-packet
produces
codex-run-output
context.window
inherit
metadata.capabilities
codex_exec
metadata.effects
run_codex_process, sandbox_tiered_workspace_and_network_effects
metadata.canonical_status
canonical

Codex Exec — one-shot runtime adapter

Run exactly one caller-supplied Codex prompt as one process and capture its result. This skill does not choose work, retry, validate or continue. One prompt, one process, one captured artifact keeps every output byte traceable to one invocation.

Rules that change the command

  • Sandbox from declared effects. -s read-only for review or analysis, workspace-write only for authorized edits, and network or wider access only when the caller explicitly requires those effects. "In case it needs it" is not a declared effect.
  • Close stdin. codex exec reads the prompt from stdin when no prompt argument is given, and appends piped stdin to a prompt argument. A non-TTY run (CI, a script) with an open stdin can wait forever: the stdin hang. Feed the prompt on stdin and let it end, or redirect </dev/null.
  • One deadline, never renewed. Fix one absolute deadline before the first attempt. Each invocation, including any retry the caller decides to make, gets only the time left before that deadline. A retry never gets a fresh budget: a loop that gives each attempt its own new timeout has silently multiplied the caller's bound. A missing, zero, negative or malformed bound prevents launch; an expired deadline stops before dispatch.
  • No retry here. Report a timeout, error or empty output as it is. Another invocation is the caller's decision, under the same deadline.
  • Capped capture, typed exit. Capture output to a file under a byte cap and report the exit status. A timeout is not a result.

Run it

In an AgentOps source checkout, use the guarded library. It enforces the deadline, the combined output cap (10 MiB default), process-group cleanup and echo detection:

bash
# DEADLINE_EPOCH: absolute Unix time fixed once by the caller and reused by
# every invocation in its scope.
. "$AGENTOPS_ROOT/scripts/lib/codex-exec.sh"
CODEX_EXEC_DIR="$WORKSPACE" CODEX_EXEC_SANDBOX=read-only \
CODEX_EXEC_PROMPT_FILE="$PROMPT_FILE" CODEX_EXEC_DEADLINE_EPOCH="$DEADLINE_EPOCH" \
CODEX_EXEC_MAX_OUTPUT_BYTES=10485760 CODEX_EXEC_OUT_FILE="$OUTPUT" \
  codex_exec_guarded </dev/null

An installed skill ships only this file, so scripts/lib/codex-exec.sh is absent outside a source checkout. Run codex exec directly instead (flags as of codex-cli 0.156.1; confirm with codex exec --help; on macOS, Homebrew coreutils may provide timeout only as gtimeout):

bash
remaining=$(( DEADLINE_EPOCH - $(date +%s) ))
[ "$remaining" -gt 0 ] || { echo "deadline passed; not launched" >&2; exit 124; }
timeout -k 10 "$remaining" \
  codex exec -C "$WORKSPACE" -s read-only - <"$PROMPT_FILE" 2>&1 \
  | head -c 10485760 >"$OUTPUT"
rc=${PIPESTATUS[0]}  # 124 timed out, 137 killed after grace, else codex's status

Add --skip-git-repo-check outside a Git repository and -o <file> to keep the final message separately (outside the cap). An output file exactly at the cap was truncated, and its status reflects the closed pipe, not a review. The fallback has no survivor check or echo detection; report both as not enforced.

Show full SKILL.md (169 more words)Show less

Exit codes (guarded library)

ExitMeaning
0Codex completed and produced output
2precondition: binary missing, bounds invalid or missing, capability unavailable, or cleanup unverified; not a result
122descendants survived Codex's exit; degraded run
123capture or prompt-preparation cap reached; partial evidence kept
124deadline expired, or a clean exit with empty output; a stall, not a result
125output repeats the prompt; not a result
128+Ncancelled by signal N (129 HUP, 130 INT, 143 TERM)
otherCodex's own nonzero status, preserved

Reserved codes are runtime evidence, never a semantic verdict. Codex's own status can coincide with a reserved code; the runner's stderr diagnostic tells them apart. Guarded runner internals covers inputs, host requirements, process supervision and the external sandbox wrapper.

Report, then stop

text
command:  exact argv or library call (prompt by reference)
sandbox:  -s value and the declared effect that needs it
bound:    absolute deadline and seconds remaining at launch
capture:  output path, byte cap, truncated yes/no
exit:     status and its meaning from the table
cleanup:  library result, or "not enforced" for the direct fallback

A Codex validator follows the judgment receipt convention and the agent-native model-dispatch recipe: a requested model flag or the model's own description does not prove which model ran. Siblings: one headless Claude prompt is claude-exec, AGY is agy-native, and worker batches are agent-native.

© boshu2, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/codex-exec of boshu2/agentops.

  • SKILL.md
  • references/guarded-runner.md

Open the folder on GitHubat commit 3bdbfed

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in boshu2/agentops, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Codex Exec next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Codex Exec compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codex Exec this skillboshu2/agentops4471 repos~1.4kAutomated safety check: PassApache-2.0
Capturealirezarezvani/claude-skills28k1 repos~2.8kAutomated safety check: PassMIT
Monitoring Capture ServicePostHog/posthog40k—~5kAutomated safety check: PassCustom licence
Canvas Capture Extensionremotion-dev/remotion62k—~903Automated safety check: PassCustom licence
Import Canvas Captureremotion-dev/remotion62k—~882Automated safety check: PassCustom licence
Elodin Headless Captureelodin-sys/elodin547—~2.2kAutomated safety check: NotesApache-2.0

Similar skills

  • Capture

    alirezarezvani/claude-skills

    Captures and organizes chaotic brain dumps into a structured, actionable system with zero information loss.

    28k GitHub starsUsed in 1 repo~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Official

    Guide for using the Grafana MCP to monitor and diagnose the capture service (rust/capture) in production.

    40k GitHub stars~5k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Canvas Capture Extension

    remotion-dev/remotion

    Official

    Rebuild, install, and reload the private Remotion Canvas Capture unpacked Chrome extension.

    62k GitHub stars~903 tokensUpdated today
    Media & CreativeAuto-check passed
  • Import Canvas Capture

    remotion-dev/remotion

    Official

    Import a recorded Remotion Canvas Capture into a project without Studio interactions using the internal experimental-codemod command.

    62k GitHub stars~882 tokensUpdated today
    Media & CreativeAuto-check passed
  • Elodin Headless Capture

    elodin-sys/elodin

    Run the Elodin Editor without a physical display in Gamescope, take screenshots, and record video through PipeWire and GStreamer.

    547 GitHub stars~2.2k tokensUpdated today
    Testing & QAAuto-check: notes
  • Latchshot Page Capture

    github/awesome-copilot

    Official

    A skill your agent uses when a user needs a screenshot, website thumbnail, full-page capture, or PDF of a public HTTP(S) webpage saved as a local artifact through Latchshot, including report, QA…

    40k GitHub stars~1.3k tokensUpdated today
    Documents & OfficeAuto-check passed

More from boshu2/agentops

All 31 skills in this repo
  • Agent Native

    boshu2/agentops

    Dispatch independent tasks to parallel workers or subagents without write collisions.

    447 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Council

    boshu2/agentops

    Compare independent opinions from several models or contexts without inflating agreement.

    447 GitHub starsUsed in 1 repo~3k tokens
    Auto-check passed
  • Craft Goal

    boshu2/agentops

    Draft or lint a bounded long-running goal prompt with a finish line and hard limits.

    447 GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Doc

    boshu2/agentops

    Write or update READMEs, docs, repo instructions and handoff notes, checked against source.

    447 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Idea Genie

    boshu2/agentops

    Brainstorm evidence-backed options for what to build, or stress-test an idea.

    447 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Implement

    boshu2/agentops

    Change or repair code, config or services without weakening tests; report what ran and what did not.

    447 GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed

Questions about Codex Exec

What does Codex Exec do?

Run one prompt through headless Codex and capture the result. Codex Exec is an agent skill from boshu2/agentops. Run one prompt through headless Codex and capture the result.

When should I use Codex Exec?

Codex Exec fits situations like: : wanting a one-shot codex exec run.

How do I install Codex Exec in Claude Code?

Run `npx skills add boshu2/agentops --skill codex-exec -a claude-code`. Or copy the skill folder (skills/codex-exec in boshu2/agentops) into .claude/skills/codex-exec in your project. Claude Code loads it when a task matches its description.

How do I install Codex Exec in Codex?

Run `npx skills add boshu2/agentops --skill codex-exec -a codex`. Or copy the skill folder (skills/codex-exec in boshu2/agentops) into .agents/skills/codex-exec in your project. Codex loads it when a task matches its description.

Can I use Codex Exec in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add boshu2/agentops --skill codex-exec -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codex-exec, .gemini/skills/codex-exec, .github/skills/codex-exec and .opencode/skills/codex-exec in your project.

What does Codex Exec need to run?

Going by SKILL.md and its folder, Codex Exec needs the command-line tools its instructions call (codex).

Does Codex Exec access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Codex Exec safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Codex Exec use?

Codex Exec is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codex Exec use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 894 tokens, read only when the agent opens those files.

What are the alternatives to Codex Exec?

Skills that share tags, products or a category with Codex Exec: Capture (alirezarezvani/claude-skills, 28k stars), Monitoring Capture Service (PostHog/posthog, 40k stars), Canvas Capture Extension (remotion-dev/remotion, 62k stars) and Import Canvas Capture (remotion-dev/remotion, 62k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codex Exec?

boshu2 (a GitHub user) maintains it in boshu2/agentops, which has 447 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on October 7, 2026.

Source: boshu2/agentops on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.