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/commands/gaia-residue.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/commands/gaia-react/gaia/gaia-residue)<a href="https://agentmods.dev/commands/gaia-react/gaia/gaia-residue"><img src="https://agentmods.dev/badge/commands/gaia-react/gaia/gaia-residue/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/commands/gaia-react/gaia/gaia-residue"><img src="https://agentmods.dev/badge/commands/gaia-react/gaia/gaia-residue.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.00053 | $0.00393 |
| Opus 5.5 | $0.00021 | $0.00157 |
| Sonnet 5.5 | $0.00011 | $0.00079 |
| Haiku 4.5 | $0.00005 | $0.00039 |
Grade A, and why
gaia-residue 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 10d 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.
What it actually says
Run the GAIA residue workflow.
Pre-flight: Worktree check
This command publishes a branch and a pull request from a repo-wide read of every merged pull request. 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 if invoked from one, reject hard: gaia_refuse_if_worktree (.gaia/scripts/main-only-lib.sh) asks the shared resolver which tree this is and refuses out loud, naming the main checkout, when the answer is a worktree.
Detection (run this first, before anything else):
. .gaia/scripts/main-only-lib.sh
gaia_refuse_if_worktree "/gaia-residue" || 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-residue"
On a non-zero exit, read .claude/skills/update-gaia/references/pull-gate.md and follow it with /gaia-residue, 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/residue.md from the project root and follow it exactly.
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.
- 10d ago Changed · -2 lines 221ce1f7643b
- 11d ago Changed · +9 lines d49463c9c52f
- 14d ago Changed · -1 lines e95d54a477dc
- 21d ago Changed · +1 lines · -22 tokens per session 09996f6f543a
- 1mo ago First seen · 23 lines · 75 tokens per session scan A 6e865be9d358
gaia-residue is a command published in the GitHub repository gaia-react/gaia (26 stars, last pushed 4d ago), licensed MIT. It adds 53 tokens to every session and 393 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-09-14.
Other commands, from other repositories
push-changes
If no topic provided, just document the recent changes. If a topic is provided, focus on documenting that topic.
elegant-code-review
Review the current working diff against the elegant-code decision ladder and propose deletions, honoring the negligence floor.
prp-commit
Quick commit with natural language file targeting: describe what to commit in plain English.
gsd:pr-branch
Create a clean PR branch by filtering out .planning/ commits — ready for code review.
validate-pr-description
Use when validating a PR title and description for conventional commit format, issue linking keywords, and template compliance before submission.
karpathy-check
Revisa as alterações em stage (ou o último commit) com base nos 4 princípios de codificação do Karpathy. Verifica complexidade, ruído no diff, suposições ocultas e verificação de objetivos. Uso: /karpathy-check [--last-commit].