gaia: Command for Claude Code

.claude/commands/gaia-debt.md

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

A workflow for fixing technical-debt items, meaning accumulated code and maintenance problems, from an ordered backlog.

In plain words
What is it for?
Use `list` to view the backlog, `why` to understand a recommendation, or `fix` to address the highest-priority or specified issue.
Why use it?
It gives each selected issue a controlled branch and review path, so the work can be audited and the issue closed after merging.

Command for Claude Code

Written for Claude Code: argument-hint 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-debt.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-debt

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/gaia-react/gaia/gaia-debt"><img src="https://agentmods.dev/badge/commands/gaia-react/gaia/gaia-debt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 580 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.00132 $0.00580
Opus 5.5 $0.00053 $0.00232
Sonnet 5.5 $0.00026 $0.00116
Haiku 4.5 $0.00013 $0.00058

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

Security

Grade A, and why

gaia-debt 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.

.claude/commands/gaia-debt.md · 34 lines

What it actually says

Run the GAIA debt workflow with these arguments: $ARGUMENTS

Pre-flight: Worktree check

This command claims a backlog issue, cuts its own isolated branch, and drives that branch's pull request to merge. If invoked from a linked worktree, 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-debt" || exit 1
. .gaia/scripts/main-only-lib.sh
gaia_pull_gate "/gaia-debt"

On a non-zero exit, read .claude/skills/update-gaia/references/pull-gate.md and follow it with /gaia-debt, 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/debt.md from the project root and follow it exactly, treating the arguments above as its input: zero or more issue numbers (one fixes that issue, several name your own batch) and an optional trailing isolation mode. The reference's argument parser owns the grammar, and an unrecognized argument stops the run with the accepted form; no argument runs the top-of-backlog flow.

debt.md routes each run to at most a few of these sub-references, all under .claude/skills/gaia/references/debt/. Read one only when a "Read ... now" line sends you there, and then read the whole file:

  • recommend.md: the no-argument offer.
  • named.md: validating named issue numbers and fixing one issue or a named set.
  • spec-handoff.md: handing a spec-class issue off to /gaia-spec.
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. 10d ago Changed · -2 lines 5ee2f06a453f
  2. 11d ago Changed · +7 lines 6d78f84858c3
  3. 14d ago Changed · +132 tokens per session 1a2669ce3cb4
  4. 16d ago Changed · -1 lines d98f56ce42ce
  5. 21d ago Changed · +7 lines c4a7abd8e5b1
  6. 23d ago Changed · -103 tokens per session 605e5a850b8a
  7. 24d ago Changed · +24 tokens per session f2257ae43020
  8. 2mo ago First seen · 23 lines · 79 tokens per session scan A cadf4e082b97

Subscribe to this mod's changes

gaia-debt is a command published in the GitHub repository gaia-react/gaia (26 stars, last pushed 4d ago), licensed MIT. It adds 132 tokens to every session and 580 once invoked, about $0.0005 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-08-30.