codex

Runs Codex CLI as background sub-agents for image generation, code analysis, and parallel review.

197|85|Updated Jul 5, 2026
One-click install
npx skills add https://github.com/yan-labs/yan-skills --skill codex-yan-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex
Source: https://github.com/yan-labs/yan-skills/tree/main/codex
Command: npx skills add https://github.com/yan-labs/yan-skills --skill codex-yan-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running Codex CLI in the foreground blocks the main conversation, and its capabilities like built-in image generation are easy to miss or misuse. This Skill turns Codex into a background sub-agent you launch, monitor, and compose into parallel agent teams without stalling your workflow. ## Core Features & Use Cases - Image Generation via Codex: Generate image sets (logos, illustrations, og images) through Codex's built-in OpenAI image tool, with prompt-file conventions, three-pass acceptance checks (thumbnail contact sheet, alpha bounding-box ratio, independent blind review), and compression guidance. - Background Sub-Agent Launches: Run codex exec with run_in_background, stdin-piped prompt files, sandbox selection, and 2>/dev/null stderr suppression so thinking tokens never flood the main context. - Parallel Agent Teams: Split work into independent slices (security review, perf review, migration drafts) across multiple Codex workers with collision-avoidance rules for workspace-write sandboxes. - Use Case: Ask for a set of 6 character illustrations for a landing page; the Skill writes a prompt file with exact filenames, palette, and sizing rules, launches Codex in the background, then verifies every image before wiring it into the page. ## Quick Start Ask the agent to use Codex to generate a set of images or to review a repository in the background, and it will launch codex exec with the right sandbox and effort level automatically.

Frequently Asked Questions about codex

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Codex CLI in the background from Claude Code?

Launch `codex exec` with `run_in_background: true`, pipe the prompt via stdin from a temp file, and append `2>/dev/null` to suppress thinking tokens. Read results later with BashOutput when the completion notification arrives instead of polling.

Can Codex CLI generate images?

Yes. Codex has a built-in OpenAI image generation tool as an agent capability, not a CLI subcommand. Describe the images in the prompt with exact filenames, style, and palette, and run with `--sandbox danger-full-access` since generation needs network access.

How do I run multiple Codex agents in parallel?

Split the task into independent slices, write a prompt file per slice, and launch separate background Bash calls in the same message with distinct tags. Never run two `workspace-write` workers on overlapping paths; use disjoint directories or separate git worktrees.

Should I pass a model flag to codex exec?

No. By default do not pass `-m` or `--model`; Codex reads its default model from `~/.codex/config.toml`. Only add an explicit model flag when the user names a specific model in the request.

Why does codex exec flood the conversation with output?

Codex streams thinking tokens to stderr, which bloats the main context window. Always append `2>/dev/null` to suppress them unless you are deliberately debugging Codex's reasoning process.

What should I check before using Codex-generated images?

Open every image with Read before shipping it, then run three checks: a 120px thumbnail contact sheet for composition, an alpha bounding-box ratio for subject size, and an independent blind review for style compliance. Compress PNGs to JPEG before committing.