local-codex

Delegates coding tasks to the local OpenAI Codex CLI agent via OAuth.

1.4k|216|Updated Oct 22, 2025
One-click install
npx skills add https://github.com/daymade/claude-code-skills --skill local-codex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: local-codex
Source: https://github.com/daymade/claude-code-skills/tree/main/daymade-codex/local-codex
Command: npx skills add https://github.com/daymade/claude-code-skills --skill local-codex

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Running the OpenAI Codex CLI as a non-interactive coding sub-agent requires correct binary detection, OAuth authentication handling, sandbox configuration, and JSONL output parsing, which is error-prone to do manually.

Core Features & Use Cases

  • Non-interactive task execution: Run codex exec with configurable model, sandbox mode, working directory, and timeout through a Python wrapper that returns structured JSON results.
  • Automated code review: Trigger Codex code reviews on a repository, optionally limited to uncommitted changes.
  • Auth status checking: Verify ChatGPT Pro OAuth authentication from ~/.codex/auth.json without ever using pay-per-use API keys.
  • Use Case: Ask the agent to refactor a module in your project; the wrapper locates the Codex CLI, runs the task in a workspace-write sandbox, and returns the parsed final assistant message as JSON.

Quick Start

Ask the agent to run a Codex code review on the current repository using the local Codex CLI with your ChatGPT Pro login.

Frequently Asked Questions about local-codex

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

FAQPage Schema
How do I run Codex CLI non-interactively for coding tasks?

Use the codex_wrapper.py exec command with a prompt, working directory, model, sandbox mode, and timeout. It runs codex exec with --json and --skip-git-repo-check, returning structured JSON with the parsed final assistant message.

How do I run a code review with Codex CLI?

Run the wrapper's review command with a repository path, model, and an uncommitted flag to review only uncommitted changes. It executes codex exec review with JSON output and returns parsed results including exit code and elapsed time.

Does Codex CLI require an OpenAI API key?

No, this setup uses ChatGPT Pro OAuth from ~/.codex/auth.json for flat-rate billing. Setting OPENAI_API_KEY or passing an API key would switch to pay-per-use billing, which this skill explicitly avoids.

Why does Codex CLI authentication fail in automation?

Auth fails when the OAuth token in ~/.codex/auth.json is expired or missing. Run codex login to complete the browser flow, or use codex login --device-auth on headless servers; tokens auto-refresh on subsequent runs.

What sandbox modes does Codex exec support?

Codex exec supports read-only for analysis tasks, workspace-write for code generation in the working directory, and danger-full-access for full system access. Choose read-only for reviews and workspace-write for code changes.