codex-cli-rules

Verify Codex CLI script invocations for genuine outputs and clean exits.

6|Updated Apr 23, 2026
One-click install
npx skills add https://github.com/ImL1s/flutter-claude-skills --skill codex-cli-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex-cli-rules
Source: https://github.com/ImL1s/flutter-claude-skills/tree/main/skills/codex-cli-rules
Command: npx skills add https://github.com/ImL1s/flutter-claude-skills --skill codex-cli-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This workflow provides deterministic control over Codex CLI invocations from automation scripts by ensuring that silent failures, non-success exits, and missing outputs are detected, clarified, and guarded.

Core Features & Use Cases

  • Programmable run verification: Verify that codex exec calls produce substantial output and completion signatures, not just a 0 exit code.
  • Three-element validation: Enforce checks for output size, completion tokens, and successful process exit to distinguish real responses from stalls or crashes.
  • Worktree and piping reliability: Manage Codex executions from different worktrees and handle stdin vs argv to avoid argument-length issues and ensure correct input transmission.

Quick Start

Install the Codex CLI wrappers, then run a scripted codex exec invocation to validate a model response in your workflow.

Frequently Asked Questions about codex-cli-rules

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

FAQPage Schema
How do I validate Codex CLI output in automated scripts?

To validate Codex CLI output in automated scripts, enforce three checks: non-empty output size, 'tokens used' completion signatures in logs, and a clean process exit code to distinguish genuine responses from silent failures or stalls.

What is the best way to prevent silent failures in programmatic Codex CLI invocations?

The best way to prevent silent failures in programmatic Codex invocations is applying run verification to detect non-success exits and missing outputs, ensuring deterministic control over cron pipelines and automation workflows.

Does the Codex CLI run verification require a specific version?

Yes, Codex CLI run verification requires Codex CLI v0.118.0 or higher to properly automate invocation checks and ensure outputs and final responses are genuine in scripted automation.

How do I handle stdin vs argv arguments for scripted codex exec calls?

To handle stdin vs argv arguments for scripted codex exec calls, use piping reliability techniques to avoid argument-length issues and ensure correct input transmission across different worktrees.

Why does my codex exec call return zero exit code but no output?

A codex exec call may return a zero exit code with no output due to silent failures or stalls. Run verification checks for output size and completion tokens to detect and clarify these missing outputs.