Delegate coding to OpenAI Codex CLI (features, PRs). An agent skill from NousResearch/hermes-agent.

MITAuto-check passedDevelopment

Install Codex

skills CLI
$ npx skills add NousResearch/hermes-agent --skill codex -a claude-code

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

GitHub CLI
$ gh skill install NousResearch/hermes-agent codex --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/NousResearch/hermes-agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/autonomous-ai-agents/codex .claude/skills/codex && 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
GitHub stars
252k
Used in
1 other repo
Token cost
~1.5k tokens
SKILL.md length
412 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
MIT

At a glance

Delegate coding to OpenAI Codex CLI (features, PRs). An agent skill from NousResearch/hermes-agent.

  • Works in 7 steps: Always use pty=true — Codex is an… → Git repo required — Codex won't run… → Use exec for one-shots — codex exec… → …
  • Development work in your project
  • SKILL.md covers When to use, Prerequisites, One-Shot Tasks and Background Mode (Long Tasks), plus 6 more sections
  • Calls git, codex and gh; reaches github.com; needs OPENAI_API_KEY

What it does

Codex is an agent skill from NousResearch/hermes-agent. Delegate coding to OpenAI Codex CLI (features, PRs).

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. It works with OpenAI and Git. The repository describes itself as: The agent that grows with you. The licence is MIT.

When your agent uses it

  • Development work in your project

Example prompts

  • “/codex”

Requirements

  • Node.js
  • A credential in OPENAI_API_KEY

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Always use pty=true — Codex is an interactive terminal app and hangs without a PTY
  2. Git repo required — Codex won't run outside a git directory. Use mktemp -d && git init for scratch
  3. Use exec for one-shots — codex exec "prompt" runs and exits cleanly
  4. sandbox workspace-write for building — auto-approves changes within the sandbox (--full-auto is deprecated for this)
  5. Background for long tasks — use background=true and monitor with process tool
  6. Don't interfere — monitor with poll/log, be patient with long-running tasks
  7. Parallel is fine — run multiple Codex processes at once for batch work

What it can do on your machine

Read from SKILL.md and the folder at commit 0e37a43. 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:

    • git
    • codex
    • gh
    • npm

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • OPENAI_API_KEY

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

Context cost

Codex loads about 1.5k tokens when it runs. Until then it costs about 15 tokens; SKILL.md has 412 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~15
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

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 NousResearch/hermes-agent at commit 0e37a43, republished under its MIT licence (© NousResearch). 412 words, ~1,459 tokens.

Download SKILL.mdSave it as .claude/skills/codex/SKILL.md (or your agent's skills folder).
name
codex
description
Delegate coding to OpenAI Codex CLI (features, PRs).
version
1.0.1
author
Hermes Agent
license
MIT
platforms
linux, macos, windows

Codex CLI

Delegate coding tasks to Codex via the Hermes terminal. Codex is OpenAI's autonomous coding agent CLI.

When to use

  • Building features
  • Refactoring
  • PR reviews
  • Batch issue fixing

Requires the codex CLI and a git repository.

Prerequisites

  • Codex installed: npm install -g @openai/codex
  • OpenAI auth configured: either OPENAI_API_KEY or Codex OAuth credentials from the Codex CLI login flow
  • Must run inside a git repository — Codex refuses to run outside one
  • Use pty=true in terminal calls — Codex is an interactive terminal app

For 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.

One-Shot Tasks

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)

Background Mode (Long Tasks)

# Start in background with PTY
terminal(command="codex exec --sandbox workspace-write '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>")

Key Flags

FlagEffect
exec "prompt"One-shot execution, exits when done
--sandbox workspace-write (-s)Sandboxed but auto-approves file changes in the workspace (the recommended auto-build mode)
--dangerously-bypass-approvals-and-sandboxNo sandbox, no approvals (fastest, most dangerous; --yolo still works as a hidden alias)
--sandbox danger-full-accessNo Codex sandbox; useful when the host service context breaks bubblewrap

Deprecated: --full-auto still works but the live CLI warns to use --sandbox workspace-write instead.

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

Hermes Gateway Caveat

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.

PR Reviews

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)

Parallel Issue Fixing with Worktrees

# Create worktrees
terminal(command="git worktree add -b fix/issue-78 ~/.hermes/cache/scratch/issue-78 main", workdir="~/project")
terminal(command="git worktree add -b fix/issue-99 ~/.hermes/cache/scratch/issue-99 main", workdir="~/project")

# Launch Codex in each
terminal(command="codex --sandbox workspace-write exec 'Fix issue #78: <description>. Commit when done.'", workdir="~/.hermes/cache/scratch/issue-78", background=true, pty=true)
terminal(command="codex --sandbox workspace-write exec 'Fix issue #99: <description>. Commit when done.'", workdir="~/.hermes/cache/scratch/issue-99", background=true, pty=true)

# Monitor
process(action="list")

# After completion, push and create PRs
terminal(command="cd ~/.hermes/cache/scratch/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 ~/.hermes/cache/scratch/issue-78", workdir="~/project")

Batch PR Reviews

# 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")

Rules

  1. Always use pty=true — Codex is an interactive terminal app and hangs without a PTY
  2. Git repo required — Codex won't run outside a git directory. Use mktemp -d && git init for scratch
  3. Use exec for one-shots — codex exec "prompt" runs and exits cleanly
  4. --sandbox workspace-write for building — auto-approves changes within the sandbox (--full-auto is deprecated for this)
  5. Background for long tasks — use background=true and monitor with process tool
  6. Don't interfere — monitor with poll/log, be patient with long-running tasks
  7. Parallel is fine — run multiple Codex processes at once for batch work

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

Files

Just SKILL.md in skills/autonomous-ai-agents/codex of NousResearch/hermes-agent.

Open the folder on GitHubat commit 0e37a43

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 NousResearch/hermes-agent, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Codex 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 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codex this skillNousResearch/hermes-agent252k1 repos~1.5kAutomated safety check: PassMIT
Open Code Review CLIalibaba/open-code-review44k—~3.1kAutomated safety check: PassApache-2.0
Codexskills-directory/skill-codex1.5k3 repos~1.8kAutomated safety check: PassMIT
Changeset Validationopenai/openai-agents-js3.9k—~607Automated safety check: PassMIT
Openai Security Ownership Maptrailofbits/skills-curated5125 repos~2.2kAutomated safety check: NotesCC-BY-SA-4.0
Pulse Releasequnqin24/Pulse516—~1.3kAutomated safety check: PassApache-2.0

Similar skills

  • Open Code Review CLI

    alibaba/open-code-review

    Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.

    44k GitHub stars~3.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Codex

    skills-directory/skill-codex

    A skill your agent uses when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

    1.5k GitHub starsUsed in 3 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Changeset Validation

    openai/openai-agents-js

    Official

    Validate changesets in openai-agents-js using LLM judgment against git diffs (including uncommitted local changes).

    3.9k GitHub stars~607 tokensUpdated today
    DevelopmentAuto-check passed
  • Openai Security Ownership Map

    trailofbits/skills-curated

    Official

    Analyze git repositories to build a security ownership topology (people-to-file), compute bus factor and sensitive-code ownership, and export CSV/JSON for graph databases and visualization.

    512 GitHub starsUsed in 5 repos~2.2k tokens
    DevelopmentAuto-check: notes
  • Pulse Release

    qunqin24/Pulse

    Release a new Pulse version end to end — checks, bilingual CHANGELOG entry, VERSION, tag, the release workflow, syncing main, and the issue replies that go with it.

    516 GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Pypi Release

    alchemiststudiosDOTai/tunacode

    This skill should be used when releasing tunacode-cli to PyPI.

    125 GitHub stars~2.2k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from NousResearch/hermes-agent

All 29 skills in this repo
  • AI Presenter Video

    NousResearch/hermes-agent

    Produces a presenter-led video from a topic or script plus one authorized presenter image, with captions, lip-sync checks and acceptance reports.

    252k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Word DOCX Toolkit

    NousResearch/hermes-agent

    Creates, reads, edits and templates Word .docx files with python-docx scripts, including tracked changes, comments, tables of contents and health checks.

    252k GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Grounded Citations

    NousResearch/hermes-agent

    Attaches a numbered, URL-backed citation to every outside fact in an answer or document, rejecting quotes that aren't real.

    252k GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • PDF

    NousResearch/hermes-agent

    PDF files: create, read, merge, fill, OCR, edit text. An agent skill from NousResearch/hermes-agent.

    252k GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Scrollcraft

    NousResearch/hermes-agent

    Premium scroll-driven landing pages; scroll = timeline. An agent skill from NousResearch/hermes-agent.

    252k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • XLSX

    NousResearch/hermes-agent

    Create, read, edit Excel .xlsx workbooks and CSVs. An agent skill from NousResearch/hermes-agent.

    252k GitHub stars~2.4k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Codex

What does Codex do?

Delegate coding to OpenAI Codex CLI (features, PRs). An agent skill from NousResearch/hermes-agent. Codex is an agent skill from NousResearch/hermes-agent. Delegate coding to OpenAI Codex CLI (features, PRs).

When should I use Codex?

Codex fits situations like: development work in your project.

How do I install Codex in Claude Code?

Run `npx skills add NousResearch/hermes-agent --skill codex -a claude-code`. Or copy the skill folder (skills/autonomous-ai-agents/codex in NousResearch/hermes-agent) into .claude/skills/codex in your project. Claude Code loads it when a task matches its description.

How do I install Codex in Codex?

Run `npx skills add NousResearch/hermes-agent --skill codex -a codex`. Or copy the skill folder (skills/autonomous-ai-agents/codex in NousResearch/hermes-agent) into .agents/skills/codex in your project. Codex loads it when a task matches its description.

Can I use Codex 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 NousResearch/hermes-agent --skill codex -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, .gemini/skills/codex, .github/skills/codex and .opencode/skills/codex in your project.

What does Codex need to run?

Going by SKILL.md and its folder, Codex needs the command-line tools its instructions call (git, codex, gh and npm) and credentials named OPENAI_API_KEY. Our summary lists: Node.js; A credential in OPENAI_API_KEY.

Does Codex access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Codex 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 use?

Codex is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codex use?

About 1.5k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Codex?

Skills that share tags, products or a category with Codex: Open Code Review CLI (alibaba/open-code-review, 44k stars), Codex (skills-directory/skill-codex, 1.5k stars), Changeset Validation (openai/openai-agents-js, 3.9k stars) and Openai Security Ownership Map (trailofbits/skills-curated, 512 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codex?

NousResearch (a GitHub organization) maintains it in NousResearch/hermes-agent, which has 251,739 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 7, 2026.

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