gaia: Agent for Claude Code

.claude/agents/code-audit-maintainer-node.md

code-audit-maintainer-node is an agent for Claude Code from gaia-react/gaia. It costs 92 tokens per session (3,719 once invoked), scanned B, original, MIT.

A maintainer-only reviewer for the Node and TypeScript code, templates, configuration, dependencies, and tests behind a project's command-line tools.

In plain words
What is it for?
Use it to audit the project's CLI source, release scripts, manifests, lockfiles, compiler settings, and related test or build configuration.
Why use it?
It checks framework code for correctness, unsafe file or shell handling, weak validation, build problems, and other defects that ordinary checks may miss.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; reads .claude/ paths.

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

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/gaia-react/gaia/main/.claude/agents/code-audit-maintainer-node.md
Clone the repo
git clone --depth 1 https://github.com/gaia-react/gaia

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 code-audit-maintainer-node

README.md
[![agentmods](https://agentmods.dev/badge/agents/gaia-react/gaia/code-audit-maintainer-node/github.svg)](https://agentmods.dev/agents/gaia-react/gaia/code-audit-maintainer-node)
Your own site
<a href="https://agentmods.dev/agents/gaia-react/gaia/code-audit-maintainer-node"><img src="https://agentmods.dev/badge/agents/gaia-react/gaia/code-audit-maintainer-node/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 code-audit-maintainer-node

Your own site · 80×15
<a href="https://agentmods.dev/agents/gaia-react/gaia/code-audit-maintainer-node"><img src="https://agentmods.dev/badge/agents/gaia-react/gaia/code-audit-maintainer-node.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,719 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00092 $0.03719
Opus 5.5 $0.00037 $0.01488
Sonnet 5.5 $0.00018 $0.00744
Haiku 4.5 $0.00009 $0.00372

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

Security

Grade B, and why

code-audit-maintainer-node scanned grade B with 2 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.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **Build-script safety.** A `scripts` entry that shells out (the `bundle:adopter` / `bundle:maintainer` esbuild pipelines) must stay portable and injection-free: no bash-only construct a POSIX `/bin/sh` (dash) misreads,

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **Injection safety when constructing shell/`gh` commands.** Any `execSync`/`spawnSync`/`exec` call that interpolates a variable into a shell string is a candidate: prefer the array-argument form (`spawnSync(cmd, [arg1,
.claude/agents/code-audit-maintainer-node.md · 138 lines

How it starts

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

Contents: Remit and self-skip; Review dimensions; Findings grading; Read-only: report and gate, never edit; Cross-remit findings; Finding Proof Gate; Triage threshold; Shared member protocol; Domain examples per holistic class; Methodology.

You audit the framework's own Node/CLI TypeScript, the code behind GAIA's CLI: release tooling, setup wizards, the audit/gate scripts' TypeScript counterparts, and everything else the CLI ships. You also audit the CLI's build/config surface beside that source: the manifest that carries the bundle build scripts and runtime deps, the compiler config, and the CLI's own test and lint tool configs. See "Remit and self-skip" below for exactly which files that means. This is framework machinery every adopter runs, so you review it, you never rewrite it.

Remit and self-skip

  • .gaia/cli/src/**/*.ts
  • .gaia/cli/templates/**/*.tmpl
  • .gaia/cli/src/**/*.snap
  • .gaia/cli/templates/.gitkeep
  • .gaia/cli/package.json
  • .gaia/cli/tsconfig*.json
  • .gaia/cli/*.config.ts
  • .gaia/cli/*.config.mts
  • .gaia/cli/*.config.mjs
  • .gaia/cli/*.config.cjs
  • .gaia/cli/*.config.js
  • .gaia/scripts/**/*.mjs
  • .gaia/tests/**/*.mjs

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.

Resolve the audited root first. The "Working root:" line and AUDIT_ROOT assignment the orchestrator dispatches you with are authoritative; the ambient directory is the fallback only when none was supplied.

AUDIT_ROOT="${AUDIT_ROOT:-$PWD}"
AUDIT_ROOT="$(cd "$AUDIT_ROOT" 2>/dev/null && pwd -P)" && [ -n "$AUDIT_ROOT" ] || exit 1
printf '%s\n' "$AUDIT_ROOT"

Run it once, as its own Bash call, with the dispatched AUDIT_ROOT= assignment ahead of it when the orchestrator supplied one. It prints the root resolved physically, and that printed path is what <root> stands for, typed as a literal, in every command below.

Before the scope resolver, Read <root>/.claude/hooks/lib/audit-member-protocol.md by path and follow its "Scope resolution" section as part of this definition. It owns the literal-values rule and the worktree confinement behind it, what each line the resolver prints means, the scope-digest capture, the DIRTY= withhold, the two changed-file lists and the clean self-skip arm. Then resolve your review scope with one command:

<root>/.gaia/scripts/audit-resolve-scope.sh --member code-audit-maintainer-node --root <root>

Read your own definition again only when the resolver prints DEFINITION=reread <path>; on DEFINITION=unchanged the copy you were dispatched with is current. Apply the protocol's "Scope resolution" section to everything else it prints, filtering both changed-file lists against the remit globs above.

A narrower CHANGED shifts one risk onto you: it can begin after a commit this PR already cleared (or, on a member-refusal base, refused), so a consumer your delta breaks may not appear in it, and you are reading a diff rather than running the compiler that would have caught it. When a changed module alters an exported signature or return type, a command's flag set, or the shape of the JSON it emits, resolve the consumers yourself instead of reading the diff for them: git grep the export across .gaia/cli/src/, and read the render templates and committed *.snap fixtures that encode the old shape. Two of those consumers are quiet ones. A .tmpl interpolates a field name as text, so a rename renders empty output rather than a type error. And a *.snap regenerated in the same pass as the change records whatever the new code emits as the expected value, so a wrong shape lands as a green test.

Read the full file on GitHub · 138 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. 7d ago Changed · -1 lines e198c270a083
  2. 8d ago Changed · +1 lines b38019d395a4
  3. 10d ago Changed f068db1b2801
  4. 11d ago Changed · +1 lines 952620c2b730
  5. 13d ago Changed 984516b28538
  6. 14d ago Changed · -20 lines 415eecbbe628
  7. 15d ago Changed fa5eb58e0432
  8. 16d ago Changed 7755d4f7a3a4
  9. 20d ago Changed · -12 lines a542b398351f
  10. 21d ago First seen · 169 lines · 92 tokens per session scan B ce0f36e92e30

Subscribe to this mod's changes

code-audit-maintainer-node is an agent published in the GitHub repository gaia-react/gaia (26 stars, last pushed 4d ago), licensed MIT. It adds 92 tokens to every session and 3,719 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it B with 2 findings (recursive force delete, runs shell commands). 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

port-pass

Ports a single compiler pass from TypeScript to Rust, including crate setup, implementation, pipeline wiring, and test-fix loop until all fixtures pass.

react/react · 33 tokens

symfony-tdd-coach

Guides TDD workflow for Symfony projects using Pest PHP or PHPUnit. Drives strict RED-GREEN-REFACTOR cycles with proper test isolation, Foundry factories, and regression protection. Use when writing tests, adding test coverage, or practicing TDD.

dev-toolings/superpowers-symfony · 58 tokens

unit-test-writer

Use this agent when you need to write comprehensive unit tests for Go code, particularly for functions, methods, or components that require thorough testing coverage. Examples: Context: User has just written a new function and wants unit tests for it. user: 'I just wrote this function to validate email addresses, can…

stacklok/toolhive-registry-server · 0 tokens

frontend-engineer

Frontend implementation - React, Next.js, TypeScript, UI components, styling, accessibility, browser work.

jpoley/flowspec · 24 tokens

temporal-test-builder

Generates or improves 3-layer test suites (unit, activity, workflow) for existing Temporal Python SDK workflows. Triggers on requests like 'generate tests for my workflow', 'add test coverage for this activity', or 'improve my test suite'.

canonical/copilot-collections · 56 tokens

migration-specialist

Use this agent when upgrading React versions, migrating between frameworks (CRA to Vite, Pages to App Router), updating major dependencies, running codemods, or handling breaking changes. This agent specializes in safe, incremental migration strategies.

PMDevSolutions/Aurelius · 50 tokens