codex-audit

An automated code review that uses Codex CLI to find possible problems and Claude to independently check those findings before deciding whether to fix them. A code audit is a structured review of code for issues such as security, performance, or logic errors.

In plain words
What is it for?
Audit uncommitted work, branches, commits, files, directories, crates, or the full project; focus on selected issue types; preview findings; and optionally apply verified fixes.
Why use it?
It adds a second review of proposed findings, reducing the chance of applying an incorrect fix. It can either report findings only or apply findings that pass the review.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/sprklai/zenii/codex-audit
Clone the repo
git clone --depth 1 https://github.com/sprklai/zenii

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,111 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.07111
Opus 5 $0.00000 $0.03556
Sonnet 5 $0.00000 $0.01422
Haiku 4.5 $0.00000 $0.00711

Measured 3d ago against content hash 16546406c436, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codex-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/codex-audit.md · 583 lines

How it starts

The opening of the file, as written. The whole thing — 583 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cross-Model Code Audit: Codex Audits, Claude Judges & Fixes

This command runs a dual-agent audit: Codex CLI reviews code with fresh eyes, then Claude independently reads the actual code, judges each finding's validity, designs its own fixes where warranted, and applies only what passes rigorous verification.

Codex proposes, Claude disposes. Claude is the architect — it reads every referenced file, forms its own opinion, and never applies Codex's suggested fixes verbatim. A wrong fix is worse than no fix.

It runs automatically with NO user prompts unless findings need user decisions.

Arguments

$ARGUMENTS

Parse the arguments string for these options:

Arg Values Default Description
SCOPE uncommitted, branch:NAME, commit:SHA, files:p1,p2, dir:PATH, crate:NAME, full uncommitted What code to review
--focus security, performance, logic, error-handling, concurrency, race-conditions, api, frontend, architecture, all all Narrow the audit focus
--fix flag off Auto-apply "Apply" findings without asking
--dry-run flag off Show Codex findings only, no validation or fixes

Scope details:

  • uncommitted — audit only uncommitted changes (git diff)
  • branch:NAME — audit diff between current branch and NAME
  • commit:SHA — audit a specific commit's changes
  • files:p1,p2 — audit specific files (comma-separated paths)
  • dir:PATH — audit all source files under a directory (e.g., dir:crates/zenii-core/src/gateway)
  • crate:NAME — shorthand for auditing a workspace crate (e.g., crate:zenii-corecrates/zenii-core/)
  • full — audit entire codebase

If $ARGUMENTS is empty, use defaults: scope=uncommitted, focus=all, no flags.


Instructions

Follow these steps strictly and sequentially. Stop immediately if any pre-flight check fails.

Step 0: Pre-flight checks

0a. Check Codex is installed

Run which codex. If it fails, print:

Codex CLI not found. Install it:
  npm install -g @openai/codex
Then authenticate:
  codex login

STOP.

Read the full file on GitHub · 583 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 583 lines · 0 tokens per session scan A 16546406c436

Subscribe to this mod's changes

codex-audit is a command published in the GitHub repository sprklai/zenii (23 stars, last pushed 24d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 7,111 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.