with one click
codex
Delegate coding to OpenAI Codex CLI (features, PRs).
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Delegate coding to OpenAI Codex CLI (features, PRs).
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Use when a problem or request is underspecified and you need to decide WHAT to clarify before doing the work — the NEXT-BEST QUESTIONS to answer, ranked. Interrogates the prompt into candidate questions, projects plausible answers with probabilities, estimates each question's value of information (how much the answer would change the recommended plan, weighted by likelihood and stakes), discards low-value/redundant ones, and keeps generating until a diverse bucket of high-value questions is filled. Reports a ranked list with recommendations (pre-answer / assume-default) using role-specialized local Ollama models. Reports only — it does not ask the user or answer the questions itself. Triggers: "what should I clarify", "what questions matter here", "is this spec complete", "what am I missing before I start".
Use to run one improvement iteration on the next-best-questions skill: review its learnings journal, research opportunities, pre-register a cost-aware experiment, build off-default, evaluate Δresult AND Δcost, and journal the verdict either way. Triggers: 'improve nbq', 'run the nbq loop', 'next-best-questions iteration'. There are NO scripts; this protocol is agent-executed.
Prompt any model or alias via "ask <model> <question>". Resolves short names (deepseek, kimi, qwen, glm) to full model IDs. Captures session IDs for follow-up questions. Comparison mode: "ask deepseek kimi <question>" dispatches multiple models in parallel. Each call is a full Hermes agent with tools and multi-turn reasoning. Replies inline with a model badge.
Autonomous end-to-end build/debug engine. Use it when asked to build, implement, fix, or debug a module/feature: it runs the WHOLE loop unattended — drafts a checkable Definition of Done, fail-closed gates it (vague or ambiguous requests come back with the blocking questions instead of guesses), generates tests, then loops implement -> lint -> evidence until coverage + two distinct-model judges + real exit codes + a whole-suite regression gate all pass — and on COMPLETE AUTO-MERGES the work into the target repo's current branch (no repo named = a fresh workspace under the write-safe root is the deliverable). Prefer this over the `dev` skill for any multi-file task whose outcome should be verified, merged code rather than role-by-role assistance. NOT for trivial one-shot asks (a quick answer, a one-line edit, running a command) — just do those directly. Run: `devloop "<request>" [--repo PATH]` (or python3 ${HERMES_HOME}/skills/software-development/devloop/scripts/devloop_cli.py) — see "How to run".
An LLM authors a JSON/YAML workflow spec (states, prompts, routing, failure policy); a durable interpreter runs it, passing state from step to step, with suspend/resume, human gates, and replay that never re-runs completed steps. Use when an LLM should define-and-run a multi-step workflow that must pause for a human (approve, decide, fix something) and resume later, survive a crash and continue exactly once, or route declaratively on step errors. Rides a durable-execution-lite engine (append-only journal, deterministic replay). Triggers: LLM-authored workflow, workflow spec, prompt routing, durable resume, resumable script, pause and resume, checkpoint and continue, don't re-run completed steps.
Cron job that reviews Hermes conversation history and captures durable knowledge into the wiki. Handles triage (SKIP/NOTE/PAGE), Slack-session cleanup, and post-capture lint.
| name | codex |
| description | Delegate coding to OpenAI Codex CLI (features, PRs). |
| version | 1.0.0 |
| author | Hermes Agent |
| license | MIT |
| platforms | ["linux","macos","windows"] |
| metadata | {"hermes":{"tags":["Coding-Agent","Codex","OpenAI","Code-Review","Refactoring"],"related_skills":["claude-code","hermes-agent"],"config":[{"key":"codex.enabled","description":"Enable codex skill behavior","default":true,"prompt":"Enable codex skill?"}],"category":"software-development"}} |
Delegate coding tasks to Codex via the Hermes terminal. Codex is OpenAI's autonomous coding agent CLI.
Requires the codex CLI and a git repository.
npm install -g @openai/codexOPENAI_API_KEY or Codex OAuth credentials
from the Codex CLI login flowpty=true in terminal calls — Codex is an interactive terminal appFor Hermes itself, model.provider: openai-codex uses Hermes-managed Codex
OAuth from ~/.hermes/auth.json after hermes auth add openai-codex. For the
standalone Codex CLI, a valid CLI OAuth session may live under
~/.codex/auth.json; do not treat a missing OPENAI_API_KEY alone as proof
that Codex auth is missing.
terminal(command="codex exec 'Add dark mode toggle to settings'", workdir="~/project", pty=true)
For scratch work (Codex needs a git repo):
terminal(command="cd $(mktemp -d) && git init && codex exec 'Build a snake game in Python'", pty=true)
# Start in background with PTY
terminal(command="codex exec --full-auto 'Refactor the auth module'", workdir="~/project", background=true, pty=true)
# Returns session_id
# Monitor progress
process(action="poll", session_id="<id>")
process(action="log", session_id="<id>")
# Send input if Codex asks a question
process(action="submit", session_id="<id>", data="yes")
# Kill if needed
process(action="kill", session_id="<id>")
| Flag | Effect |
|---|---|
exec "prompt" | One-shot execution, exits when done |
--full-auto | Sandboxed but auto-approves file changes in workspace |
--yolo | No sandbox, no approvals (fastest, most dangerous) |
--sandbox danger-full-access | No Codex sandbox; useful when the host service context breaks bubblewrap |
When invoking the Codex CLI from a Hermes gateway/service context (for example,
Telegram-driven agent sessions), Codex workspace-write sandboxing may fail even
when the same command works in the user's interactive shell. A typical symptom is
bubblewrap/user-namespace errors such as setting up uid map: Permission denied
or loopback: Failed RTM_NEWADDR: Operation not permitted.
In that context, prefer:
codex exec --sandbox danger-full-access "<task>"
Use process boundaries as the safety layer instead: explicit workdir, clean git
status before launch, narrow task prompts, git diff review, targeted tests, and
human/agent confirmation before committing broad changes.
Clone to a temp directory for safe review:
terminal(command="REVIEW=$(mktemp -d) && git clone https://github.com/user/repo.git $REVIEW && cd $REVIEW && gh pr checkout 42 && codex review --base origin/main", pty=true)
# Create worktrees
terminal(command="git worktree add -b fix/issue-78 /tmp/issue-78 main", workdir="~/project")
terminal(command="git worktree add -b fix/issue-99 /tmp/issue-99 main", workdir="~/project")
# Launch Codex in each
terminal(command="codex --yolo exec 'Fix issue #78: <description>. Commit when done.'", workdir="/tmp/issue-78", background=true, pty=true)
terminal(command="codex --yolo exec 'Fix issue #99: <description>. Commit when done.'", workdir="/tmp/issue-99", background=true, pty=true)
# Monitor
process(action="list")
# After completion, push and create PRs
terminal(command="cd /tmp/issue-78 && git push -u origin fix/issue-78")
terminal(command="gh pr create --repo user/repo --head fix/issue-78 --title 'fix: ...' --body '...'")
# Cleanup
terminal(command="git worktree remove /tmp/issue-78", workdir="~/project")
# Fetch all PR refs
terminal(command="git fetch origin '+refs/pull/*/head:refs/remotes/origin/pr/*'", workdir="~/project")
# Review multiple PRs in parallel
terminal(command="codex exec 'Review PR #86. git diff origin/main...origin/pr/86'", workdir="~/project", background=true, pty=true)
terminal(command="codex exec 'Review PR #87. git diff origin/main...origin/pr/87'", workdir="~/project", background=true, pty=true)
# Post results
terminal(command="gh pr comment 86 --body '<review>'", workdir="~/project")
pty=true — Codex is an interactive terminal app and hangs without a PTYmktemp -d && git init for scratchexec for one-shots — codex exec "prompt" runs and exits cleanly--full-auto for building — auto-approves changes within the sandboxbackground=true and monitor with process toolpoll/log, be patient with long-running tasks