codex

Delegate code analysis, refactoring, and automated changes to Codex CLI.

4|2|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/PeterFile/my-common-skills --skill codex-peterfile
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex
Source: https://github.com/PeterFile/my-common-skills/tree/main/codex
Command: npx skills add https://github.com/PeterFile/my-common-skills --skill codex-peterfile

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill delegates complex code tasks to Codex CLI for analysis, refactoring, and automated changes.

Core Features & Use Cases

  • Supports file references via @ syntax for precise edits and traceability.
  • Enables multi-model Codex sessions and sandbox controls to ensure safe, reproducible results across codebases.
  • Automates code changes across large codebases with structured output and review-friendly diffs.

Quick Start

Provide a task describing the code change, e.g., "refactor @src/utils.js for performance" and Codex will perform analysis, edits, and tests.

Frequently Asked Questions about codex

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

FAQPage Schema
How do I delegate complex code refactoring tasks to an AI agent for automated changes?

Automated code refactoring is handled by delegating tasks to Codex CLI, which performs analysis, edits, and tests across codebases. You provide a task description and the tool returns structured JSON with an agent message and session ID.

Can I reference specific files when automating code analysis and edits?

File references are supported using the @ syntax, allowing you to target specific files like @src/utils.js for precise edits and traceability during automated code analysis and refactoring.

How do I ensure safe and reproducible results when automating code changes across large codebases?

Safe and reproducible code changes are ensured through sandbox controls and multi-model sessions in Codex CLI, which generates review-friendly diffs and structured output for safe execution.

What is the process for executing Codex CLI tasks within my development environment?

Codex CLI must be invoked in the foreground via the Bash tool with a fixed 2-hour timeout, executing the code task and returning structured JSON output including an agent message and a session ID.

How do I start automating code changes with structured output and review-friendly diffs?

To start automating code changes, provide a task description such as "refactor @src/utils.js for performance" and the tool will perform analysis, edits, and tests, returning structured output with review-friendly diffs.

Are there limitations on the timeout duration when running code analysis tasks via the CLI?

The timeout duration for running code analysis tasks via Codex CLI is fixed at 2 hours, meaning long-running or highly complex codebase operations may need to be broken down into smaller tasks.