zenii: Command for Claude Code

.claude/commands/codex-audit.md

codex-audit is a command for Claude Code from sprklai/zenii. It costs 0 tokens per session (7,111 once invoked), scanned A, original, MIT.

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

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions CLAUDE.md; mentions subagents; runs codex exec.

This is sprklai/zenii's own configuration. It tells Claude Code how to work on zenii itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything zenii configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sprklai/zenii. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sprklai/zenii/main/.claude/commands/codex-audit.md
Clone the repo
git clone --depth 1 https://github.com/sprklai/zenii

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codex-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/sprklai/zenii/codex-audit/github.svg)](https://agentmods.dev/commands/sprklai/zenii/codex-audit)
Your own site
<a href="https://agentmods.dev/commands/sprklai/zenii/codex-audit"><img src="https://agentmods.dev/badge/commands/sprklai/zenii/codex-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codex-audit

Your own site · 80×15
<a href="https://agentmods.dev/commands/sprklai/zenii/codex-audit"><img src="https://agentmods.dev/badge/commands/sprklai/zenii/codex-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.07111
Opus 5.5 $0.00000 $0.02844
Sonnet 5.5 $0.00000 $0.01422
Haiku 4.5 $0.00000 $0.00711

Measured 2mo ago against content hash 16546406c436, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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-core → crates/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. 2mo 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 (24 stars, last pushed 1mo 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.