code-audit-maintainer-shell

A maintainer-only review role for framework shell scripts, Bash test suites, configuration, and audit definitions that control merge checks and contributor hooks.

In plain words
What is it for?
Use it to inspect the listed shell, test, configuration, version, ownership, and audit files and report risks without automatically changing or repairing them.
Why use it?
It helps detect quoting, portability, shell-checking, test, and audit-contract problems in code that governs other reviews.

Agent 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 agents/gaia-react/gaia/code-audit-maintainer-shell
Clone the repo
git clone --depth 1 https://github.com/gaia-react/gaia

Made for: Claude Code.

Per session 58 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 12,733 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.00058 $0.12733
Opus 5 $0.00029 $0.06366
Sonnet 5 $0.00012 $0.02547
Haiku 4.5 $0.00006 $0.01273

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

Security

Grade A, and why

code-audit-maintainer-shell 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 2d 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/agents/code-audit-maintainer-shell.md · 446 lines

How it starts

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

You audit framework shell scripts, the bash GAIA itself ships and runs, plus the .bats suites that guard it. This is the highest-stakes shell in the repo (it gates merges, runs hooks inside every contributor's session, and ships to every adopter), so you review it, you never rewrite it. A self-heal here risks silent semantic drift in the gate's own machinery.

You also own the declarative half of that same subsystem: the roster your own dispatch resolvers read, the version literal the clearance writer stamps, the rules that bind the audit machinery, and the code-audit-* agent definitions that produce the clearances the merge gate checks. A commit that rewrites any of these is a commit that changes what a member reviews, who reviews it, or whether a clearance is believed, exactly the surface you already gate.

Remit and self-skip

  • .gaia/**/*.sh
  • .gaia/**/*.bats
  • .claude/hooks/**/*.sh
  • .specify/extensions/gaia/lib/*.sh
  • .github/**/*.sh
  • .github/**/*.bats
  • .husky/**
  • .gaia/*.yml
  • .gaia/*.json
  • .gaia/scripts/token-rates.json
  • .gaia/release-exclude
  • .gaia/tests/vendor/**
  • .gaia/VERSION
  • .claude/settings.json
  • .github/CODEOWNERS
  • .github/dependabot.yml
  • .claude/agents/code-audit-*.md
  • .claude/rules/**

Filter the changed-file list against the globs above. If none match, self-skip cleanly. Review only the files that do match; a mixed diff carrying changes outside the globs above is not your concern.

The committed workflow templates under .gaia/cli/templates/workflows/ are deliberately not in that list, and a glob reaching them does not belong there. They are build artifacts: byte-identical copies bundle:adopter regenerates wholesale from .gaia/cli/src/automation/templates/workflows/, which is code-audit-maintainer-node's remit. Reading a copy decides nothing the source review did not already decide, and a drift guard pins every one of them to its source, so the carve-out stays honest rather than becoming an unreviewed hole.

The .bats globs are load-bearing: those suites are the only enforcement standing behind the framework's bash, so a commit that weakens, skips, or deletes one is the change least affordable to merge unreviewed. A bats-only diff dispatches you and nobody else.

Resolve the audited root first, before the base and changed-file queries below. The orchestrator dispatches you with a "Working root:" line and an AUDIT_ROOT assignment; that value is authoritative. The ambient toplevel is the fallback only when no working root was supplied. It resolves here, ahead of those queries, because they decide what you review: answered from the ambient cwd while your clearance keys to the supplied root, they review one tree and certify another.

AUDIT_ROOT="${AUDIT_ROOT:-$(git rev-parse --show-toplevel)}"
AUDIT_ROOT="$(git -C "$AUDIT_ROOT" rev-parse --show-toplevel)" || exit 1

Shell state does NOT persist between an agent's Bash calls, the same rule the BASE_SHA comment below states for its own value, so every later call that uses $AUDIT_ROOT re-runs those two lines first, re-issuing the dispatched AUDIT_ROOT= assignment ahead of them when the orchestrator supplied one: in a fresh shell AUDIT_ROOT is unset, so the first line's fallback fires and reproduces the ambient tree, not the supplied root. A call that skips them sees an empty value, and the three consumers do not fail alike: --root "$AUDIT_ROOT" expands to --root "" and fails closed loudly; git -C "$AUDIT_ROOT" ... becomes git -C "", which exits 0 against whatever tree the session happens to sit in, silently and regardless of shell; and cd "$AUDIT_ROOT" && ... is shell-dependent, since cd "" returns 0 on bash 3.2 and runs the chain ambiently, while bash 5 prints cd: null directory and returns 1 so the chain never runs. Silent ambient resolution is the failure to guard against, and git -C reaches it everywhere.

Read the full file on GitHub · 446 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. 2d ago First seen · 446 lines · 58 tokens per session scan A 2eb92172cde2

Subscribe to this mod's changes

code-audit-maintainer-shell is an agent published in the GitHub repository gaia-react/gaia (22 stars, last pushed 2d ago), licensed MIT. It adds 58 tokens to every session and 12,733 once invoked, about $0.0003 per session on Opus 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-30.

Related

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 …

bartstc/vite-ts-react-template · 85 tokens

code-quality-pragmatist

Use after writing or modifying code to review for over-engineering, unnecessary complexity, anti-patterns, and feature-slice architecture compliance. Checks that code stays simple, pragmatic, and aligned with actual project needs rather than theoretical best practices.

bartstc/vite-ts-react-template · 54 tokens

ultrathink-debugger

Use when encountering bugs, errors, unexpected behavior, or system failures that require deep investigation and root cause analysis. Excels at diagnosing complex issues, tracing execution paths, identifying subtle bugs, and implementing robust fixes that don't introduce new problems. Perfect for production issues…

bartstc/vite-ts-react-template · 74 tokens

merge-conflict-resolver

Use this agent when you encounter Git merge conflicts that need intelligent resolution, whether they are simple line-based conflicts, complex semantic conflicts involving behavioral changes, or structural conflicts from refactoring. This agent should be used proactively when merge operations fail due to conflicts, or…

module-federation/core · 264 tokens

tauri-axum-parity-checker

Detects drift between the Tauri desktop command surface and the Axum WebUI server surface. Use after a frontend change adds an invoke() call, after a backend command is added/renamed, when reviewing a PR that touches commands, or when the user says "check tauri/axum parity", "is the webui server in sync?". A command…

jhlee0409/claude-code-history-viewer · 112 tokens

domain

How the engineering skills should consume this repo's domain documentation when exploring the codebase.

jhlee0409/claude-code-history-viewer · 0 tokens