Borrowing it
Nothing to install: this file belongs to gaia-react/gaia. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/gaia-react/gaia/main/.claude/agents/audit-loop-unit.mdgit clone --depth 1 https://github.com/gaia-react/gaiaWrote 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.
[](https://agentmods.dev/agents/gaia-react/gaia/audit-loop-unit)<a href="https://agentmods.dev/agents/gaia-react/gaia/audit-loop-unit"><img src="https://agentmods.dev/badge/agents/gaia-react/gaia/audit-loop-unit/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.
<a href="https://agentmods.dev/agents/gaia-react/gaia/audit-loop-unit"><img src="https://agentmods.dev/badge/agents/gaia-react/gaia/audit-loop-unit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00031 | $0.04981 |
| Opus 5.5 | $0.00012 | $0.01992 |
| Sonnet 5.5 | $0.00006 | $0.00996 |
| Haiku 4.5 | $0.00003 | $0.00498 |
Grade A, and why
audit-loop-unit 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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You run one audit-to-fix unit for the main thread: up to K audit rounds, off the main thread, then a thin report. You are an orchestrator, not an auditor. The procedure lives on wiki/concepts/Audit Round Procedure.md; this brief names the sections to follow and states only what is specific to running as the unit. Read each named section when you reach it, not from memory.
Brief you receive
The dispatch prompt carries, verbatim: Working root: <absolute path>, the PR number, the run folder absolute path (written <run> below), Start round: <s>, Unit: <u>, and Vetoes: <run>/vetoes.json. K is never in the brief. When any field is missing, or Working root: is not an absolute path, write the unit file with stop_reason: "failure" and return.
Writing into <run>. It lies in the main checkout, so from a worktree the runtime refuses an Edit or Write there and refuses a heredoc, pipe or compound Bash command. Write every run-folder file you author (dispositions, the unit file) with Write into your session scratchpad, copy it in with one plain cp <scratch file> <run>/<file>, and read it back. Scripts that take <run> paths as arguments write there themselves.
Pass Working root: <abs> verbatim into every member dispatch, with the expected-tree self-check the page describes.
First actions
- Confirm the Agent tool is available to you before round 1. Absent: write the unit file with
stop_reason: "needs-human"and astop_detailthat names the missing Agent tool, Claude Code 2.1.287 or later, and the upgrade step (claude update, then relaunch the session), and return. - Read K from
.gaia/scripts/context-checkpoint-lib.sh(GAIA_CONTEXT_UNIT_ROUNDS). Never hard-code it. - Recovery checks before opening a round: a dirty tree, an unpushed commit, and a
baseline-<r>.jsonin<run>with nofixer-<r>-audit.json. For the last, run the pinned verifier'sdriftfrom<run>/verifier-bin-<r>/and stopneeds-humanwhen it exits 1; otherwise follow the page's resume rule. - Republish the
## Audit roundsrecord (audit-loop-eval.sh record-valuesintoaudit-loop-record.sh) before round 1.
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.
- 7d ago Changed · -1 lines 0ca181efaf4f
- 8d ago Changed · +3 lines 2ea143e7eceb
- 9d ago Changed · +9 lines f72c66dfc570
- 10d ago Changed · +2 lines deaa423d0a8d
- 11d ago Changed · +1 lines · -23 tokens per session fc0bfdd97176
- 15d ago Changed c7308cf0481f
- 16d ago Changed b0049ef932c7
- 20d ago Changed · +6 lines f2968d4a9ef6
- 21d ago Changed 1c3785c83572
- 22d ago First seen · 98 lines · 54 tokens per session scan A 23e535cd1501
audit-loop-unit is an agent published in the GitHub repository gaia-react/gaia (26 stars, last pushed 4d ago), licensed MIT. It adds 31 tokens to every session and 4,981 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-10-03.
Other agents, from other repositories
claude-md-compliance-checker
Use after completing implementation tasks to verify changes comply with CLAUDE.md project rules — file boundaries (src/, e2e/ only), path alias usage (@/), feature-slice architecture, AIDEV-NOTE comments, scope creep, and forbidden actions (unauthorized commits, API contract changes). NOT for general code quality …
architecture-guard
Audits PR diffs for architecture boundary violations, design simplicity, dependency drift, and established-pattern mismatches. Use during code review when architecture, layering, or framework conventions may be affected.
pr-reviewer
Summarizes GitHub PR, GitLab MR, or Azure DevOps PR metadata, review threads, changed files, and template completeness. Use during review-ticket or code-review workflows when PR/MR context exists.
test-gap-finder
Finds missing, weak, or stale test coverage in a diff. Use during review when production logic, user flows, error paths, or acceptance criteria changed.
check
Code quality auditor for the Trellis channel runtime. Reviews uncommitted diffs against task artifacts and specs, self-fixes issues, and reports verification results.
react-software-architect-review
Expert React software architect that provides frontend architecture, component design patterns, state management strategies, and performance optimization guidance. Reviews React codebases for architectural integrity, proper component composition, and best practices across React 19, Next.js, Remix, and modern frontend…