Skip to content
Back to skills

Codex

BSecurity

Delegate coding tasks to the OpenAI Codex CLI for features, refactoring, PR reviews, and batch fixes. Requires the codex CLI and typically a git repository.

  • 53 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 26, 2026
ai-agentspythongoshellbashrefactoringcode-reviewgitapi

Works with

  • terminal
  • cli
  • api

Security analysis

B84/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned May 27, 2026

npx -y skills add deepelementlab/jupyter-studio --skill codex --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Codex?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Codex
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/deepelementlab-codex/badge)](https://www.skillsdirectory.com/skills/deepelementlab-codex)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: codex
description: Delegate coding tasks to the OpenAI Codex CLI for features, refactoring, PR reviews, and batch fixes. Requires the codex CLI and typically a git repository.
version: 1.0.0
license: MIT
metadata:
  clawcode:
    tags: [Coding-Agent, Codex, OpenAI, Code-Review, Refactoring]
    related_skills: [coding-standards, python-patterns, opencode]
---

# Codex CLI (clawcode)

Use [OpenAI Codex](https://github.com/openai/codex) as an external coding agent when the user wants Codex specifically.

**Do not confuse these entry points** (they are not interchangeable):

| Entry | Role |
|-------|------|
| **`/codex-cli`** (TUI slash) | **One-shot** probe or command via [`codex_cli_bridge`](../../../../../llm/claw_support/codex_cli_bridge.py): merged stdout/stderr, **not** a PTY session and **not** multi-turn TUI control. Default args often `--version`. |
| **`bash`** | One-shot shell in agent turns, e.g. `codex exec '…'`. |
| **`terminal`** + **`process`** (Agent tools) | **Multi-turn** driving of Codex: `terminal` with `background=true` (and `pty=true` on POSIX with `clawcode[terminal-pty]`), then `process` for `poll` / `submit` / `kill`. **Codex expects a git repo**; for scratch dirs use `mktemp -d && git init`. **Windows** local PTY is limited—full TUI automation use **WSL/Linux**. |

Optional: `pip install 'clawcode[terminal-pty]'` for `ptyprocess` on POSIX.

## Prerequisites

- Install Codex: `npm install -g @openai/codex` (command name `codex` on `PATH`).
- Configure OpenAI credentials per Codex docs (API key / auth).
- **Git repository** — many Codex flows refuse to run outside a repo; use a temp dir + `git init` for greenfield scratch.

## When to use

- User asks for Codex or `codex` explicitly.
- You need a bounded task: prefer `codex exec '...'` via **bash** in the project workspace.
- Quick install check: **`/codex-cli`** after **`/claw`** (default `codex --version`); same terminal stack as **`/claude-cli`** / **`/opencode-cli`**.

## clawcode-specific capabilities

| Goal | What to use |
|------|---------------|
| **Quick probe** | **`/codex-cli`** only—single run, not multi-run TUI. |
| **One-shot exec** | **`bash`** or **`terminal`** foreground: `codex exec 'task'` with `working_directory` in a git repo. |
| **Long / background** | **`terminal`** (`background=true`, `pty=true` where supported) + **`process`**. Optional **`check_interval`** on `terminal` for TUI completion notifications (see `CLAW_SUPPORT_MAP.md`). |

## One-shot examples (foreground)

```
terminal(command="codex exec 'Add dark mode toggle to settings'", workdir="~/project", pty=true)
```

Scratch with new repo:

```
terminal(command="cd $(mktemp -d) && git init && codex exec 'Build a snake game in Python'", pty=true)
```

## Background mode

```
terminal(command="codex exec --full-auto 'Refactor the auth module'", workdir="~/project", background=true, pty=true)
process(action="poll", session_id="<id>")
process(action="log", session_id="<id>")
process(action="submit", session_id="<id>", data="yes")
process(action="kill", session_id="<id>")
```

## Key flags (Codex upstream)

| Flag | Effect |
|------|--------|
| `exec "prompt"` | One-shot run, exits when done |
| `--full-auto` | Sandboxed; auto-approves file changes in workspace |
| `--yolo` | No sandbox (dangerous; use with care) |

## Rules

1. Prefer **`pty=true`** for interactive Codex sessions on POSIX; without PTY many CLIs misbehave.
2. Respect **git repo** requirements; document when you create a throwaway repo.
3. **`/codex-cli`** does not replace **`terminal`/`process`** for long interactive work.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.