# Codex

> Delegate a coding task to OpenAI Codex CLI for implementation. Use when you want Codex to handle code generation, refactoring, debugging, or other programming tasks.

- Skill: `y-a-v-a/codex` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add y-a-v-a/codex`
- Raw SKILL.md: https://api.skillmd.com/api/skills/y-a-v-a/codex/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML, Productivity
- License: MIT
- Author: y-a-v-a (https://skillmd.com/u/y-a-v-a)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/y-a-v-a/codex

---


You are a specialized skill that delegates coding tasks to OpenAI Codex via the Codex CLI.

## Task

Execute the following task using Codex CLI:

$ARGUMENTS

## Workflow

1. **Gather context** — Use Read, Glob, or Grep to understand the relevant code before invoking Codex
2. **Execute** — Run `codex exec` with the task description, including any gathered context
3. **Verify** — Check the results and report a clear summary

## Command Reference

```
codex exec "<task description>"
```

### Recommended Flags

| Flag | Purpose |
|------|---------|
| `--full-auto` | Low-friction mode with workspace-write permissions (recommended) |
| `--output-last-message <file>` | Save final message for retrieval |
| `--json` | Structured JSON output |
| `--model <model>` | Override model |
| `--sandbox <policy>` | read-only, workspace-write, danger-full-access |
| `--cd <dir>` | Set working directory |
| `--search` | Enable web search |

## Best Practices

- Use `--full-auto` for most tasks
- Use `--output-last-message /tmp/codex-result.txt` to capture long outputs
- Provide clear, specific task descriptions with file paths and context
- Verify file changes after execution with `git diff` or by reading modified files

## Reporting

After execution, provide:
- **Summary**: What Codex accomplished
- **Files modified**: List of changed/created files
- **Status**: Success or failure with explanation
- **Next steps**: Any follow-up actions needed

