codex-cli
Skill2 starsChanged 8 months agoMITView on GitHub
Expert control of Codex CLI tooling including exec, review, login/logout, and MCP server management. Covers all commands, flags, options, configuration profiles, sandbox modes, and usage patterns for working with the Codex AI coding agent from command line.
- Reads credentials
23 other projects use a version of this.
Adopted by
Most recently taken up by
- kortix-ai/sunatheir own version, first seen Nov 8, 2026
- Awakehsh/awesome-agent-toolstheir own version, first seen Nov 8, 2026
- kortix-ai/CompanyOStheir own version, first seen Nov 8, 2026
- legibet/agent-skillstheir own version, first seen Nov 1, 2026
- samirpatil2000/skillstheir own version, first seen Nov 1, 2026
- sugarforever/01coder-agent-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use antigravity-cli and claude-code.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
yu-iskwSkillantigravity-cli
Executes coding, review, research, and automation tasks using Google Antigravity CLI (`agy`). Uses Antigravity's native fine-grained allow/ask/deny permissions instead of Gemini CLI approval modes.
Also in 3 projects that use this
mrgoonieSkillclaude-code
Also in 4 projects that use this
Other versions23 projects use a version of this.
Word for word · 1
- julweber/ai_agent_skills★ 2100% same
Edited · 0
None found.
Wrote their own version · 22
- kortix-ai/suna★ 21ksame name
- kortix-ai/CompanyOS★ 21ksame name
- wentorai/Research-Claw★ 858same name
- scarletkc/agents★ 227same name
- revfactory/skills★ 160same name
- sugarforever/01coder-agent-skills★ 139same name
- georgekhananaev/claude-skills-vault★ 28same name
- samirpatil2000/skills★ 17same name
- mr-ske1r/1c-ai-devstart★ 16same name
- Awakehsh/awesome-agent-tools★ 8same name
12 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository51 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-agent-skills-assistantSkill
- ansibleSkill
- artificial-analysisSkill
- cavemanSkill
- claude-cliSkill
- code-doctorSkill
- code-summarizerSkill
- concourse-ciSkill
- dev-brainstormingSkill
- docker-cliSkill
- file-organizerSkill
- frontend-web-developerSkill
- github-actions-cicdSkill
- github-cliSkill
- gitlab-ci-cdSkill
- grill-meSkill
- gtd-assistantSkill
- herdr-cliSkill
- hf-cliSkill
- karpathy-guidelinesSkill
- kestraSkill
- list-large-filesSkill
- list-most-intensive-processesSkill
- llama-cppSkill
- llm-wikiSkill
- mermaidSkill
- morning-ritualSkill
- obsidian-masterSkill
- obsidian-open-loops-collectorSkill
- opencode-agent-creatorSkill
- opencode-cliSkill
- pi-cliSkill
- pi-subagents-masterSkill
- planka-development-flowSkill
- plnk-cliSkill
- ponytailSkill
- product-prd-brainstormingSkill
- python-api-developerSkill
- ralph-prd-converterSkill
- ralph-prd-generatorSkill
- release-managementSkill
- rest-testsuite-skillSkill
- skill-loaderSkill
- design-taste-frontendSkill
- terraformSkill
- tmux-coderSkill
- tmux-specialistSkill
- trello-cliSkill
- tts-conversationSkill
- uvSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 19 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 304
Sandbox permissions: Default to read-only unless specified otherwise
- Distinctive: line 376
read-only: Only allows reading files (safe for viewing sensitive information)
“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Overview
Codex provides a powerful AI coding assistant with various subcommands for different workflows including interactive sessions, non-interactive execution, code reviews, authentication management, MCP server operations, and sandbox debugging. This skill covers all discovered commands and flags.
Main Commands & Flags
Global Options (applies to all subcommands)
codex [OPTIONS] [PROMPT]
Global options:
- -c, --config <key=value> # Override configuration values from ~/.codex/config.toml
- --enable <FEATURE> # Enable a feature (repeatable)
- --disable <FEATURE> # Disable a feature (repeatable)
- -i, --image <FILE>... # Optional image(s) to attach to the initial prompt
- -m, --model <MODEL> # Specify which model to use
- --oss # Use open-source provider instead of default
- --local-provider <OSS_PROVIDER># Specify local provider (lmstudio or ollama)
- -s, --sandbox <SANDBOX_MODE> # Select sandbox policy for shell commands
- -p, --profile <CONFIG_PROFILE> # Use configuration profile from config.toml
- -C, --cd <DIR> # Change working directory
- --full-auto # Low-friction mode (equivalent to certain flags)
- --dangerously-bypass-approvals-and-sandbox # Skip all safety checks (EXTREMELY DANGEROUS)
- --search # Enable web search capabilities
- -a, --ask-for-approval <APPROVAL_POLICY> # Configure approval requirements
- -h, --help # Show help message
- -V, --version # Show version informationNon-interactive execution (exec or e)
codex exec [OPTIONS] [PROMPT] [COMMAND]
Usage patterns:
- codex exec "fix the bug in main.py"
- echo "fix the bug" | codex exec -
- codex exec --review "analyze this file for security issues"
- codex e -c model="o3" "add tests to utils.rs"
Subcommands:
- resume # Resume a previous session by ID or use --last
- review # Run code review against current repository
Options:
- --uncommitted # Review staged, unstaged, and untracked changes
- --base <BRANCH># Review changes against specified base branch
- --commit <SHA> # Review specific commit's changes
- --title <TITLE> # Optional title for review summaries
- --ephemeral # Run without persisting session files
- --output-schema <FILE> # Path to JSON Schema file describing response format
- --color <auto|always|never># Color output settings (default: auto)
- --progress-cursor # Force cursor-based progress updates
- --json # Output events as JSONL format
- -o, --output-last-message <FILE> # Write last message to specified file
- --skip-git-repo-check # Allow running outside Git repositoryCode review (review)
codex review [OPTIONS] [PROMPT]
Options:
- --uncommitted # Review all uncommitted changes
- --base <BRANCH> # Specify base branch for comparison
- --commit <SHA> # Review specific commit's changes
- --title <TITLE> # Optional title for review summary outputAuthentication management (login, logout)
codex login [OPTIONS] <COMMAND>
Subcommands:
- status # Show current login status
- --with-api-key # Read API key from stdin
- --device-auth # Use device-based authentication flow
Usage: codex login [status|--with-api-key]
Examples:
- echo $OPENAI_API_KEY | codex login --with-api-key # Login with existing API key
- codex login status # Check login statusMCP server operations (mcp)
codex mcp [OPTIONS] <COMMAND>
Subcommands:
- list # List configured MCP servers
- get # Get information about a specific MCP server
- add # Add a new MCP server configuration
- remove # Remove an existing MCP server
- login # Login to MCP server authentication
- logout # Logout from MCP server authenticationSandbox operations (sandbox)
codex sandbox [OPTIONS] <COMMAND>
Subcommands:
- macos # Run commands under Seatbelt (macOS only) [aliases: seatbelt]
- linux # Run commands under Landlock+seccomp (Linux only) [aliases: landlock]
- windows # Run commands under Windows restricted token sandboxmacOS Sandbox (sandbox macos)
codex sandbox macos [OPTIONS] [COMMAND]...
Options:
- --full-auto # Convenience alias for low-friction automatic execution
- --log-denials # Capture and log macOS sandbox denials via `log stream`
Usage patterns:
- codex sandbox macos "echo hello"
- codex s linux -c model="o3" "ls -la"Linux Sandbox (sandbox linux)
codex sandbox linux [OPTIONS] [COMMAND]...
Options:
- --full-auto # Low-friction mode that disables network access but allows local writesWindows Sandbox (sandbox windows)
codex sandbox windows [OPTIONS] [COMMAND]...
Options:
Same as global options plus platform-specific restrictions via Windows restricted tokens.Completion scripts (completion)
codex completion [OPTIONS] [SHELL]
Arguments:
- [SHELL] # Shell to generate completions for (default: bash)
Possible values: bash, elvish, fish, powershell, zsh
Options:
Same global configuration options apply.Debugging tools (debug)
codex debug [OPTIONS] <COMMAND>
Subcommands:
- app-server # Tooling to help debug the app server operationsCloud operations (cloud)
[EXPERIMENTAL]
codex cloud [OPTIONS] [COMMAND]
Subcommands:
- exec # Submit new Codex Cloud tasks without TUI
- status # Show task status in Codex Cloud
- list # List available Codex Cloud tasks
- apply # Apply diffs from Codex Cloud tasks locally
- diff # Show unified diff for a specific taskGlobal Codex cloud options:
- --enable
<FEATURE># Enable experimental features - --disable
<FEATURE># Disable experimental features
Configuration Profiles
The -p, --profile flag allows loading predefined configuration profiles from ~/.codex/config.toml.
Example profile structure in config.toml:
[profiles]
my-profile = { model = "o3", sandbox_permissions = ["workspace-write-access"] }
review-profile = { model = "claude-sonnet-4", features = { code_review_enabled = true } }Usage:
codex exec -p my-profile "fix the bug in main.py"
codex review --profile review-profile "analyze this file"Important Configuration Values
Default configuration file location: ~/.codex/config.toml
Key configuration settings include:
[model]- Default model selection[sandbox_permissions]- Array of allowed sandbox permissions Possible values: ["read-only", "workspace-write", "danger-full-access"][shell_environment_policy]- Controls environment variable inheritance Possible nested values: inherit, restricted, all[features.<name>]- Feature flags configuration
Sandbox permission policies:
--sandbox read-only # Only read workspace files
--sandbox workspace-write # Read and modify workspace files
--sandbox danger-full-access # Full filesystem access with potential system impactCommon Usage Examples
Interactive development sessions
# Start an interactive session
codex "help me implement a REST API endpoint"
# Continue previous session
codex resume --last
# Fork current session to continue in parallel
codex fork <session-id>Non-interactive code analysis
# Run code review on all changes
codex review
# Review specific commit
codex review --commit abc1234
# Run non-interactive model with custom prompt
codex exec "analyze this Rust file for memory safety issues"Authentication workflows
# Login using existing API key from environment variable
export OPENAI_API_KEY="your-key-here"
echo $OPENAI_API_KEY | codex login --with-api-key
# Check current authentication status
codex login status
# Logout to clear stored credentials
codex logoutMCP server management
# List configured MCP servers
codex mcp list
# Add a new MCP server configuration
codex mcp add --name some-server --server some-provider:some-tool
# Remove an existing MCP server
codex mcp remove --name some-serverSandbox debugging operations
# Run command in macOS sandbox with denial logging
codex sandbox macos --log-denials "git commit -m 'test'"
# Linux sandbox execution (network disabled)
codex s linux "make build"
# Windows restricted token sandbox
codex sandbox windows "dir C:\\Users"Shell completion generation
# Generate bash completion scripts
codex completion bash > ~/.local/share/bash-completion/completions/codex
source ~/.local/share/bash-completion/completions/codex
# Generate zsh completions
codez completion zsh > ~/.oh-my-zsh/completions/_codexConfiguration overrides for specific tasks
# Override model and sandbox permissions temporarily
codex exec -c model="o3" -s workspace-write "fix the code"
# Enable specific features for a session
codex --enable search --disable untrusted-commands "analyze this file with web search"
# Use custom config values via dotted notation
codex exec -c 'shell_environment_policy.inherit.all=true' "show me environment variables"Known defaults and behaviors:
- Model: Uses the configured default model unless overridden with
-m/--modelormodel="..."in config - Sandbox permissions: Default to
read-onlyunless specified otherwise - Color output: Automatic based on terminal capabilities unless
--coloris set - Progress display: Cursor-based updates are preferred for interactive sessions
- Working directory: Current working directory by default unless changed with
-C/--cd - Feature flags: Most features disabled by default and must be explicitly enabled
Security considerations:
Sandbox modes and approval policies:
# Read-only sandbox (safe for viewing files)
codex --sandbox read-only exec "analyze the code"
# Workspace-write sandbox (allows file modifications within workspace only)
codex --sandbox workspace-write exec "fix security issues in src/"
# Danger-full-access sandbox (potentially unsafe - use with caution!)
codex --sandbox danger-full-access exec "system maintenance task"
# Ask for approval on every potentially dangerous command
codez --ask-for-approval never exec "run this without asking me"Dangerous flags to avoid:
--dangerously-bypass-approvals-and-sandbox # EXTREMELY DANGEROUS - skips ALL safety checks
--full-auto # Convenience alias that enables potentially dangerous modesTroubleshooting and debugging
Debugging features:
# Enable debug logging for troubleshooting
codex --enable debug-logging exec "help me"
# Check feature flags status
codex features list
# Get detailed information about a specific feature
codez features get <feature-name>Platform-specific sandbox operations:
- macOS: Uses Seatbelt profile with
--log-denialsto capture macOS sandbox violations - Linux: Uses Landlock+seccomp restrictions; requires kernel support for Landlock
- Windows: Uses restricted tokens; may require elevated privileges for certain configurations
Integration patterns
Using Codex with environment variables:
# Set API key via environment variable before login
OPENAI_API_KEY="your-api-key" codex login --with-api-key
# Use local provider configuration
codez --oss exec "help me with this local model"Working directory management:
# Change working directory for the session
codex -C /path/to/project exec "fix files in this project"
# Add additional directories to workspace access
codex --add-dir /tmp/some-dir exec "work with files from multiple locations"File system and tool permissions
Workspace write vs read-only modes:
- workspace-write: Allows file modifications within the primary workspace directory
- read-only: Only allows reading files (safe for viewing sensitive information)
- danger-full-access: Grants full filesystem access including potentially dangerous operations
Environment policy inheritance:
# Inherit all environment variables from shell
codex exec -c shell_environment_policy.inherit=all "show me the env"
# Restricted inheritance (safer)
codez --local-provider lmstudio exec "work with local model without network access"Notes
- Codex uses TOML-based configuration files by default
- Configuration values can be overridden via command line flags using dotted notation
- Most commands support both direct arguments and stdin input (using
-) - Sandbox modes are platform-specific and may require additional setup
- Cloud operations are experimental and subject to change
- Feature flags enable/disable specific Codex capabilities like web search, approval policies, etc.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

