omega-codex-cli
Original:🇺🇸 English
Translated
7 scriptsChecked / no sensitive code detected
Shell out to OpenAI Codex CLI for headless code generation, analysis, and question-answering. Optimized for code tasks. Requires OPENAI_API_KEY env var.
3installs
Sourceoimiragieo/agent-studio
Added on
NPX Install
npx skill4agent add oimiragieo/agent-studio omega-codex-cliTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Codex CLI Skill
Headless wrapper for OpenAI Codex CLI. Passes prompt as positional arg to .
Optimized for code generation and analysis. Requires OPENAI_API_KEY.
codex exec "PROMPT"When to Use
- Code generation tasks needing OpenAI/GPT model perspective
- Cross-validation of code solutions with a non-Claude model
- Tasks benefiting from Codex's code optimization focus
- Multi-LLM consultation workflows
Usage
Ask a question
bash
node .claude/skills/omega-codex-cli/scripts/ask-codex.mjs "Implement a Redis caching layer for Express"With timeout
bash
node .claude/skills/omega-codex-cli/scripts/ask-codex.mjs "Refactor this module" --timeout-ms 120000JSONL streaming output
bash
node .claude/skills/omega-codex-cli/scripts/ask-codex.mjs "Generate unit tests" --jsonSandbox mode
bash
node .claude/skills/omega-codex-cli/scripts/ask-codex.mjs "Write and test a sort algorithm" --sandboxAvailability Check
bash
node .claude/skills/omega-codex-cli/scripts/verify-setup.mjs
# Exit 0 = available (CLI found + OPENAI_API_KEY set)
# Exit 1 = not availableScripts
| Script | Purpose |
|---|---|
| Core headless wrapper — prompt as positional arg |
| Argument parser (--model, --json, --sandbox, --timeout-ms) |
| Availability check (CLI + OPENAI_API_KEY) |
| JSONL event stream normalization |
Flags
| Flag | Description |
|---|---|
| Codex model to use |
| JSONL event stream output |
| Workspace-write sandbox mode |
| Timeout in milliseconds (exit code 124 on expiry) |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error (CLI failure, auth issue, API error) |
| 124 | Timeout (--timeout-ms exceeded) |
Anti-Patterns & Iron Laws
- ALWAYS verify OPENAI_API_KEY is set before invocation
- NEVER use stdin for prompt delivery — Codex uses positional arg
- ALWAYS include --skip-git-repo-check (built into wrapper)
- ALWAYS set --timeout-ms for production usage
- NEVER assume --json output is standard JSON — it produces JSONL event stream
Integration Notes
- API key: env var required
OPENAI_API_KEY - Rate limits: OpenAI API rate limits apply
- Platform: Full cross-platform (Windows uses cmd.exe /d /s /c wrapper)
Memory Protocol (MANDATORY)
Before starting:
Read
.claude/context/memory/learnings.mdAfter completing:
- New pattern ->
.claude/context/memory/learnings.md - Issue found ->
.claude/context/memory/issues.md - Decision made ->
.claude/context/memory/decisions.md
ASSUME INTERRUPTION: If it's not in memory, it didn't happen.
Note: Use to discover references to this skill codebase-wide.
pnpm search:code