gaia-debt

gaia-debt is a command for Claude Code from gaia-react/gaia. It costs 79 tokens per session (382 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.

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 commands/gaia-react/gaia/gaia-debt
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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 79 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 382 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.1 $0.00079 $0.00382
Opus 5 $0.00039 $0.00191
Sonnet 5 $0.00016 $0.00076
Haiku 4.5 $0.00008 $0.00038

Measured 6d ago against content hash cadf4e082b97, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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 · 23 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

If the detection does not fire, fall through to the workflow dispatch line below.

Read .claude/skills/gaia/references/debt.md from the project root and follow it exactly. That reference is written to consume an argument string, treat the arguments above as that input (the leading token selects the subcommand: fix, list, why <issue-number>, fix <issue-number>, or a bare <issue-number>/#<issue-number>, which fixes that specific issue directly). If no arguments were provided, follow the reference's no-argument path (which defaults to fix).

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. 6d 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 (23 stars, last pushed yesterday), licensed MIT. It adds 79 tokens to every session and 382 once invoked, about $0.0004 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 commands, from other repositories

replan-remaining-work

Command "replan-remaining-work" from udecode/plate, covering command: re-plan remaining work, when to run, hard rule, invocation and refresh afterward.

udecode/plate · 0 tokens

prototype-loop

Enter leveraged-prototype focus mode — focus marker plus normal watch/rebuild loop for visual-parity work and batch upstream framework gap-fixes.

Generous-Corp/pulp · 31 tokens

review-arch

Review the current branch for code quality, TypeScript, and React/Next.js patterns. Supports whole-branch review or scoped review by path, feature, or base branch.

smicolon/ai-kit · 35 tokens

a11y-audit-react

Identify accessibility violations in React components and provide actionable remediation aligned with WCAG 2.2 Level AA. This is the guided audit workflow that applies the standards defined in the a11y-automation and react-components rules.

vanessamarely/ai-playbook-reposito · 0 tokens

react-build

Fix React build failures (Vite, webpack, Next.js, CRA, Parcel, esbuild, Bun) incrementally — JSX/TSX compile errors, hydration mismatches, server/client component boundary failures, missing types. Invokes the react-build-resolver agent for minimal, surgical fixes.

DekaPrayoga/AurixAgent · 59 tokens

next-upgrade

Structured workflow for upgrading Next.js applications across major versions. Use when migrating a Next.js project from one major version to another (e.g., 13 to 14, 14 to 15, 15 to 16). Covers codemod automation, breaking change detection, incremental migration paths, and post-upgrade validation.

oimiragieo/agent-studio · 66 tokens