codex

Execute OpenAI Codex CLI commands for code analysis, refactoring, and automated editing.

1|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/discountry/ritmex-skills --skill codex-discountry
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex
Source: https://github.com/discountry/ritmex-skills/tree/main/skills/codex
Command: npx skills add https://github.com/discountry/ritmex-skills --skill codex-discountry

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the guesswork and manual research required to use the OpenAI Codex CLI effectively, solving the pain of misconfigured flags, incorrect sandbox modes, and suboptimal prompts that lead to failed or unsafe code tasks.

Core Features & Use Cases

  • Full CLI Reference: Complete documentation for all Codex commands, flags, sandbox/approval modes, and session management for both interactive and scripted use.
  • Workflow Best Practices: Proven guidance for prompt engineering, AGENTS.md configuration, MCP server setup, multi-agent orchestration, and safe execution of code analysis, refactoring, and editing tasks.
  • Use Case Example: A developer can use this Skill to quickly run a read-only code review of their recent changes, get actionable refactoring suggestions, and apply fixes without risking unintended modifications to their codebase.

Quick Start

Use the codex skill to run a read-only analysis of the current repository and suggest improvements for code readability and maintainability.

Frequently Asked Questions about codex

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

FAQPage Schema
How do I use OpenAI Codex CLI for automated code review and refactoring?

OpenAI Codex CLI automates code review and refactoring by applying correct sandbox and approval modes to analyze local repositories and suggest actionable edits without unintended modifications. It eliminates manual flag lookup for safe, read-only execution.

What is the best way to configure AGENTS.md and MCP servers for Codex CLI workflows?

Configuring AGENTS.md and MCP servers for Codex CLI involves defining multi-agent task orchestration rules and server connections to streamline automated code analysis. Proper setup ensures prompt optimization and correct session management for scripted developer workflows.

Can I run OpenAI Codex CLI in read-only mode to analyze my codebase safely?

Yes, OpenAI Codex CLI supports read-only sandbox modes to safely analyze your codebase and provide refactoring suggestions. This prevents unintended code modifications during automated reviews while still delivering actionable maintainability improvements.

How do I manage interactive and scripted sessions with OpenAI Codex CLI?

Managing interactive and scripted sessions with OpenAI Codex CLI requires selecting the correct session management flags to maintain context across code analysis tasks. This enables continuous multi-agent orchestration and safe execution of automated editing workflows.

Why does OpenAI Codex CLI fail to modify my local code during automated tasks?

OpenAI Codex CLI automated code modification tasks fail when misconfigured sandbox and approval modes restrict write access. Selecting the correct approval mode and optimizing your prompts ensures safe execution of intended codebase edits.