gaia: Command for Claude Code

.claude/commands/gaia-codify.md

gaia-codify is a command for Claude Code from gaia-react/gaia. It costs 54 tokens per session (378 once invoked), scanned A, original, MIT.

A code-audit workflow turns recurring review findings into proposed checks, skills, or path-specific rules, with approval before drafting them.

In plain words
What is it for?
It is for reviewing recurring audit findings, listing existing guards, and explaining or drafting a guard for a finding type.
Why use it?
It helps prevent the same kind of code problem from being reported repeatedly by converting a pattern of findings into a lasting guard.

Command for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: 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/commands/gaia-codify.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 gaia-codify

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/gaia-react/gaia/gaia-codify"><img src="https://agentmods.dev/badge/commands/gaia-react/gaia/gaia-codify.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 378 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.00054 $0.00378
Opus 5.5 $0.00022 $0.00151
Sonnet 5.5 $0.00011 $0.00076
Haiku 4.5 $0.00005 $0.00038

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

Security

Grade A, and why

gaia-codify 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 11d 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/gaia-codify.md · 30 lines

What it actually says

Run the GAIA codify workflow.

Pre-flight: Worktree check

This command drafts repo-wide rules, checks, and skills from a repo-wide finding tally and publishes them through a pull request of its own. It starts from the main checkout and isolates its own work right before its first write, through .claude/skills/gaia/references/isolation.md, so it never writes onto the branch the checkout holds. A linked worktree holds someone else's work, so it refuses to run in one (gaia_refuse_if_worktree, .gaia/scripts/main-only-lib.sh).

Detection (run this first, before anything else):

. .gaia/scripts/main-only-lib.sh
gaia_refuse_if_worktree "/gaia-codify" || exit 1

Anchor for the next pre-flight step: a check that must pass before this command starts goes here, after the worktree check and before the workflow dispatch line.

. .gaia/scripts/main-only-lib.sh
gaia_pull_gate "/gaia-codify"

On a non-zero exit, read .claude/skills/update-gaia/references/pull-gate.md and follow it with /gaia-codify, this run's original arguments and the exit code, before anything below creates a branch, worktree, claim or SPEC id.

Read .claude/skills/gaia/references/codify.md from the project root and follow it exactly.

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. 11d ago Changed · +7 lines 5d68728c8094
  2. 14d ago Changed · -1 lines 09861952fd47
  3. 16d ago First seen · 24 lines · 54 tokens per session scan A d8b73015359e

Subscribe to this mod's changes

gaia-codify is a command published in the GitHub repository gaia-react/gaia (26 stars, last pushed 4d ago), licensed MIT. It adds 54 tokens to every session and 378 once invoked, about $0.0002 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-14.