Skip to content
Back to skills

Codex Cli

ASecurity

Run OpenAI Codex CLI for coding tasks and second-opinion audits. Use when a user asks to run/ask/use Codex, says "codex prompt", or wants Claude to delegate a logic/code review to OpenAI models.

  • 28 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added February 7, 2026
ai-agentsrustbashsecurityperformance

Works with

  • cli

Security analysis

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

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

Scanned February 12, 2026

npx -y skills add georgekhananaev/claude-skills-vault --skill codex-cli --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Codex Cli?

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

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

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-cli
description: Run OpenAI Codex CLI for coding tasks and second-opinion audits. Use when a user asks to run/ask/use Codex, says "codex prompt", or wants Claude to delegate a logic/code review to OpenAI models.
---

# Codex CLI

Run OpenAI Codex CLI locally for second-opinion audits, code review, and non-interactive task execution.

## Prerequisites

Codex CLI must be installed and authenticated:

1. **Install:** `npm install -g @openai/codex`
2. **Auth:** `codex login`
3. **Verify:** `codex --version`

## Core Execution Pattern

Use `codex exec` for delegated prompts (non-interactive):

```bash
codex exec "Your prompt here"
```

When the user says "codex prompt", treat it as:

```bash
codex exec "<user prompt>"
```

## Model Guidance

Use the default configured model unless the user asks otherwise.

Latest tested working model in this environment:

```bash
codex exec -m gpt-5.3-codex "Your prompt"
```

Compatibility note:
- `gpt-5-codex` may fail if config uses `model_reasoning_effort = "xhigh"`.
- If you must use `gpt-5-codex`, set reasoning effort explicitly:

```bash
codex exec -m gpt-5-codex -c model_reasoning_effort="high" "Your prompt"
```

## Commands

### Non-Interactive Execution

```bash
# Basic task
codex exec "Audit this logic for edge cases"

# Explicit model
codex exec -m gpt-5.3-codex "Review this implementation strategy"

# Full-auto mode (sandboxed, lower friction)
codex exec --full-auto "Implement the requested refactor"

# Read-only sandbox (analysis only)
codex exec -s read-only "Find bugs in this code path"

# Workspace-write sandbox
codex exec -s workspace-write "Apply the fix and update tests"

# Custom working directory
codex exec -C /path/to/project "Evaluate this repository"

# Save final output to file
codex exec -o output.txt "Summarize key risks"

# JSONL event stream
codex exec --json "Produce structured findings"

# Pipe context from stdin
cat context.txt | codex exec -
```

### Code Review

Use `codex review` for repository diffs:

```bash
# Review uncommitted changes
codex review --uncommitted

# Review against a base branch
codex review --base main

# Review a specific commit
codex review --commit abc123

# Custom review instructions
codex review "Focus on security issues"

# Combined
codex review --base main "Check for performance regressions"
```

## Important Flag Placement

`--search` and `-a/--ask-for-approval` are top-level flags. Put them before `exec` or `review`.

Correct:

```bash
codex --search -a on-request exec "Your prompt"
codex --search -a on-request review --uncommitted
```

Avoid:

```bash
codex exec --search "Your prompt"
codex exec -a on-request "Your prompt"
```

## Useful Flags

| Flag | Description |
|------|-------------|
| `-m` | Model (recommended explicit example: `gpt-5.3-codex`) |
| `-s` | Sandbox: `read-only`, `workspace-write`, `danger-full-access` |
| `-a` | Approval policy (`untrusted`, `on-failure`, `on-request`, `never`) as a top-level flag |
| `-C` | Working directory |
| `-o` | Write last message to file |
| `--full-auto` | Sandboxed auto-execution (`-a on-request -s workspace-write`) |
| `--json` | JSONL event output |
| `--search` | Enable web search tool as a top-level flag |
| `--add-dir` | Additional writable directories |
| `-c key=value` | Override config (example: `-c model_reasoning_effort="high"`) |

## Best Practices

- Prefer `codex exec` for delegated prompts instead of interactive `codex`
- Start with `-s read-only` for audits and second opinions
- Use `--full-auto` only when you expect autonomous edits
- Keep prompts explicit about expected output format
- Add `-o` when another tool or agent must consume the result
- Run `codex review --uncommitted` before committing as a quick extra pass

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.