codex

Automate code analysis, refactoring, and editing with Codex CLI and GPT-5.2.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Codex usage helps users automate code analysis, refactoring, and automated editing by running Codex CLI commands and leveraging GPT-5.2 for modern software engineering tasks. It reduces manual toil in inspecting and modifying codebases and enables guided AI-assisted edits.

Core Features & Use Cases

  • Default model and reasoning selection: Always start with gpt-5.2 and prompt the user to choose reasoning effort (xhigh, high, medium, or low).
  • Sandbox and resume support: Choose appropriate sandbox (read-only, workspace-write, danger-full-access) and resume sessions with the provided syntax.
  • Command orchestration: Assemble codex exec invocations with essential flags (-m, --model, --config, --sandbox, --full-auto, -C, and --skip-git-repo-check) and automatically prepend 2>/dev/null where applicable.
  • Session persistence and output handling: When resuming, pass the last session and summarize outputs for the user; suppress thinking tokens by default unless requested.
  • Use Case: A developer wants to analyze a repository, apply a refactor, and capture the resulting code changes with an AI-assisted workflow.

Quick Start

Speak a request to run Codex across a repository and report back with the edits.

Frequently Asked Questions about codex

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

FAQPage Schema
How do I automate code analysis and refactoring across an entire repository?

Automate code analysis and refactoring across a repository by using Codex CLI to orchestrate AI-assisted edits with GPT-5.2. It assembles execution commands with appropriate flags to inspect, modify, and capture code changes safely.

How do I resume an interrupted AI code editing session?

Resume an interrupted AI code editing session by passing the last session ID to the Codex CLI. The tool restores your previous context, summarizes the existing outputs, and continues the automated refactoring workflow.

Can I control the sandbox permissions when running AI-assisted code edits?

You can control sandbox permissions for AI-assisted code edits by selecting read-only, workspace-write, or danger-full-access modes. This ensures your automated refactoring and code analysis workflows execute within a safe, controlled environment.

What reasoning effort levels can I configure for GPT-5.2 during code reviews?

Configure GPT-5.2 reasoning effort levels as xhigh, high, medium, or low during code reviews. This allows you to balance the depth of architectural analysis and automated editing against processing speed.

How does the Codex CLI handle command output and thinking tokens during refactoring?

Codex CLI handles command output during refactoring by automatically suppressing thinking tokens by default and redirecting errors. It logs session details and summarizes outputs to keep automated editing workflows clean and readable.

What is the best way to apply architectural changes to a codebase using AI?

The best way to apply architectural changes using AI is leveraging Codex CLI for controlled, logged, and resumable sessions. It guides GPT-5.2 edits with configurable reasoning and sandbox options to ensure safe modifications.