Open Source CLI Tool
CodexOpt Logo

CodexOpt

Benchmark and optimize AGENTS.md and SKILL.md for Codex.

A lightweight CLI to measure quality, detect issues, and generate optimized instruction files - locally or with AI.

Get Started in Seconds

Install with uv or pip and start optimizing

1

Install CodexOpt

Choose uv (recommended) or pip

uvuv sync --extra dev
pippip install -e ".[dev]"
2

Initialize & Scan

Set up and analyze your project

uv run codexopt init
uv run codexopt scan
Ready to benchmark & optimize

Powerful Features

A complete toolkit to evaluate and improve your Codex instruction assets

Project Scanning

Detect issues in agents and skill files automatically.

Benchmark Scoring

Sub-scores and natural language feedback on quality.

Heuristic Optimizer

Local, fast optimization engine - no API needed.

GEPA Engine

AI-powered optimization for deeper improvements.

Safe Apply Flow

Automatic backups before any changes are applied.

Markdown Reporting

Generate detailed reports from optimization runs.

Complete Workflow

From Scan to Report

A structured pipeline to measure and improve instruction quality

codexopt workflow
$uv run codexopt init
$uv run codexopt scan
$uv run codexopt benchmark
$uv run codexopt optimize agents --file AGENTS.md
$uv run codexopt optimize skills --glob ".codex/skills/**/SKILL.md"
$uv run codexopt apply --kind agents
$uv run codexopt report --output codexopt-report.md

Two Optimization Engines

Choose the right engine for your needs

Heuristic Engine

Default - runs locally

Fast, deterministic optimization using rule-based heuristics. No API keys or external calls required. Perfect for CI/CD integration and quick iterations.

No API keys required
Deterministic results
Fast execution
CI/CD friendly

GEPA Engine

AI-powered - optional

Leverages large language models for deeper, context-aware optimization. Produces more nuanced improvements for complex instruction files.

Context-aware rewrites
Deeper improvements
Natural language feedback
Evidence-based suggestions

Ship Better Codex Instructions

CodexOpt is open source, MIT licensed, and built to make your Codex agents more effective.