# Codex Exec

> Execute codex CLI as sub-agent for thorough code reviews (codex's specialty), alternative approaches when stuck, or complex problems requiring extended investigation. Note that inference takes significant time. Use when this capability is needed.

- Skill: `tomevault-io/codex-exec` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/codex-exec`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/codex-exec/raw
- Safety review: pending (external: skill-scanner PASS, skillspector CAUTION)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/codex-exec

---


# Codex Execution Skill

## Command Structure

Execute codex using the following command pattern:

```bash
codex exec --full-auto --sandbox read-only --cd <project_directory> "<request>"
```

### Parameters

- `--full-auto`: Enables autonomous operation without manual intervention
- `--sandbox read-only`: Runs in safe read-only mode (no file modifications)
- `--cd <directory>`: Specifies the project directory to analyze
- `<request>`: The natural language request describing what to analyze

## Execution Guidelines

### 1. Determine the Request

Formulate a clear, specific request. Examples:
- "Review the authentication module for security vulnerabilities"
- "Analyze the database query patterns for performance issues"
- "Explain how the user registration flow works"

### 2. Set Working Directory

- Default: `$PWD`
- Custom: User-provided path

### 3. Execute & Monitor

```bash
codex exec --full-auto --sandbox read-only --cd /path/to/project "Your request"
```

Display output, progress, errors, and final results to user.

## Example Usage Patterns

### Code Review
```bash
codex exec --full-auto --sandbox read-only --cd . "Review the recent changes for code quality and potential bugs"
```

### Architecture Analysis
```bash
codex exec --full-auto --sandbox read-only --cd . "Analyze the overall architecture and identify design patterns used"
```

### Bug Investigation
```bash
codex exec --full-auto --sandbox read-only --cd . "Investigate why the user authentication is failing intermittently"
```

### Refactoring Suggestions
```bash
codex exec --full-auto --sandbox read-only --cd . "Suggest refactoring opportunities to improve code maintainability"
```

## Prerequisites

Ensure the `codex` CLI tool is installed and available in PATH:

```bash
which codex
```

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/kecbigmt) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-14 -->

