optimize-codex-config

Audit and optimize local Codex CLI configuration with redacted evidence and atomic writes.

2|Updated Jul 6, 2026
One-click install
npx skills add https://github.com/NAMEWTA/learning-open-code --skill optimize-codex-config-namewta
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: optimize-codex-config
Source: https://github.com/NAMEWTA/learning-open-code/tree/main/speculo/skills/optimize-codex-config
Command: npx skills add https://github.com/NAMEWTA/learning-open-code --skill optimize-codex-config-namewta

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Codex CLI setups accumulate configuration drift, misconfigured model providers, permission issues, and hard-to-diagnose failures like 401, 403, 404, 413, SSE interruptions, timeouts, and remote compaction errors. This Skill performs a read-only health audit of your local Codex configuration first, then proposes and safely applies verified changes only after explicit confirmation. ## Core Features & Use Cases - Read-Only Config Audit: Runs a Node.js audit script that fingerprints config.toml, checks auth.json permissions, scans recent session logs for classified error incidents, and probes the installed Codex CLI without ever exposing secrets, tokens, or full URLs. - Failure Attribution: Classifies HTTP status codes, SSE interruptions, timeouts, and compaction failures into local config, authentication, provider contract, external proxy, or upstream service domains using an evidence gradient. - Confirmed Atomic Writes: Presents a redacted diff confirmation package, creates timestamped backups, writes via atomic rename, and rolls back automatically if verification with codex doctor fails. - Use Case: Your Codex CLI suddenly returns 413 errors during remote compaction behind an Nginx reverse proxy. The Skill audits your setup, attributes the failure to the proxy body-size limit with evidence, suggests a local mitigation, and produces a server handoff recommendation. ## Quick Start Ask the agent to run a read-only health check of my local Codex configuration and diagnose any recent errors before suggesting changes.

Frequently Asked Questions about optimize-codex-config

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

FAQPage Schema
How do I audit my Codex CLI configuration for problems?▼

Run the included audit script with your Codex home directory to get a structured report covering config.toml fingerprints, auth.json permissions, provider contracts, session error incidents, and CLI probe results. The audit is fully read-only and redacts all secrets, tokens, and URLs.

How to fix Codex 413 errors during remote compaction?▼

A 413 during remote compaction usually indicates a proxy body-size limit rather than a model issue. The Skill checks for proxy signatures like Nginx in the response, then suggests local mitigations such as lowering model_auto_compact_token_limit and provides a server handoff for adjusting client_max_body_size.

Does the audit script read my auth.json API keys?▼

No, the audit never reads auth.json contents. It only checks the file's existence, type, and permission mode, and verifies the authentication mode reported by codex doctor. All bearer tokens, headers, and URLs in config.toml are redacted before appearing in any report.

Can this Skill modify my Codex config.toml automatically?▼

Only after explicit confirmation. The Skill first presents a confirmation package with redacted diffs, backup paths, and rollback conditions. Writes use atomic rename with timestamped backups, and any failed verification triggers automatic restoration of the previous state.

Why does Codex return 404 errors with a custom model provider?▼

A 404 typically means an endpoint or wire API mismatch, such as an incorrect base_url or an erroneously appended /v1 path. The Skill verifies that custom providers use the responses wire API and that the final request path matches what the provider actually serves.

What are the limitations of this Codex configuration audit?▼

The audit only covers the local machine and does not modify remote APIs, reverse proxies, or Nginx servers; those receive attribution and handoff recommendations instead. On Windows, active writer detection via lsof is unavailable, and modification tasks stay blocked without writer observation.