metis: Command for Claude Code

.claude/commands/cli-audit.md

cli-audit is a command for Claude Code from terrene-foundation/metis. It costs 30 tokens per session (1,570 once invoked), scanned A, original, Apache-2.0.

A command for auditing a system that generates equivalent instruction files for several command-line coding tools. It compares the source rules, overlays, shortened versions, and final files for consistency and limits.

In plain words
What is it for?
Use it to audit all generated files or focus on emission, parity, drift, or validator checks across the three command-line interfaces.
Why use it?
It finds differences and drift between the Claude Code, Codex, and Gemini outputs before those differences cause inconsistent agent behavior.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions AGENTS.md; mentions Codex.

This is terrene-foundation/metis's own configuration. It tells Claude Code how to work on metis 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 metis configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node .claude/bin/emit.mjs --all --out /tmp/cli-audit-$(date +%s) -v.

Reuse

Borrowing it

Nothing to install: this file belongs to terrene-foundation/metis. 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/terrene-foundation/metis/main/.claude/commands/cli-audit.md
Clone the repo
git clone --depth 1 https://github.com/terrene-foundation/metis

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 cli-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/terrene-foundation/metis/cli-audit/github.svg)](https://agentmods.dev/commands/terrene-foundation/metis/cli-audit)
Your own site
<a href="https://agentmods.dev/commands/terrene-foundation/metis/cli-audit"><img src="https://agentmods.dev/badge/commands/terrene-foundation/metis/cli-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 cli-audit

Your own site · 80×15
<a href="https://agentmods.dev/commands/terrene-foundation/metis/cli-audit"><img src="https://agentmods.dev/badge/commands/terrene-foundation/metis/cli-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,570 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.00030 $0.01570
Opus 5.5 $0.00012 $0.00628
Sonnet 5.5 $0.00006 $0.00314
Haiku 4.5 $0.00003 $0.00157

Measured 1mo ago against content hash ff1456b417d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cli-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 1mo 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/cli-audit.md · 97 lines

How it starts

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

Multi-CLI Audit

Dispatch entry point for cli-orchestrator.audits per spec v6 §6.2. Reviews the full multi-CLI emission pipeline (source rules → slot overlays → abridgement → per-CLI target files) for parity, drift, and cap compliance across CC, Codex, and Gemini.

Your Role

Specify scope: all (default), emission, parity, drift, or validators.

Dispatch Contract (v6 §6.2)

You MUST dispatch cc-architect, codex-architect, and gemini-architect via the Task tool in the SAME TURN with run_in_background: true (parallel launch per rules/agents.md § Parallel Execution). Sequential dispatch is BLOCKED — it bypasses the parallel-execution multiplier and re-runs the same audit three times in series.

# DO — single turn, three parallel architects
Agent(subagent_type="cc-architect", run_in_background=true, prompt="...CC audit brief with emission report...")
Agent(subagent_type="codex-architect", run_in_background=true, prompt="...Codex audit brief with AGENTS.md...")
Agent(subagent_type="gemini-architect", run_in_background=true, prompt="...Gemini audit brief with GEMINI.md...")

# DO NOT — sequential
Agent(subagent_type="cc-architect", ...)     # wait for return
Agent(subagent_type="codex-architect", ...)  # then this

Phase 1: Produce the emission (dry-run)

Run the E4 emitter in dry-run mode to produce per-CLI baseline emissions the architects will audit:

node .claude/bin/emit.mjs --all --out /tmp/cli-audit-$(date +%s) -v

This writes:

  • /tmp/cli-audit-<ts>/codex/AGENTS.md + emit-report-codex.json
  • /tmp/cli-audit-<ts>/gemini/GEMINI.md + emit-report-gemini.json
  • /tmp/cli-audit-<ts>/codex-mcp-guard/policies.json (V13 POLICIES table)
  • /tmp/cli-audit-<ts>/emit-telemetry.json — consolidated headroom summary (per-CLI bytes, tier, headroom_bytes, headroom_pct) keyed off warn_cap_bytes + block_cap_bytes loaded from sync-manifest.yaml. Surfaces the trend metric for Risk-0004 (baseline-cap headroom ~4%).

Exit code ≠ 0 means V12 slot-round-trip failed, V13 MCP bijection failed, or the emission exceeded block_cap_bytes. A non-zero exit is a HARD BLOCK on this audit — fix before dispatching architects.

Read the full file on GitHub · 97 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. 1mo ago First seen · 97 lines · 30 tokens per session scan A ff1456b417d4

Subscribe to this mod's changes

cli-audit is a command published in the GitHub repository terrene-foundation/metis (2 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 30 tokens to every session and 1,570 once invoked, about $0.0001 per session on Opus 5.5. 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-31.