gaia: Command for Claude Code

.claude/commands/gaia-spec.md

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

A guided workflow for writing an unchanging project specification, meaning a shared description of what should be built and why. It uses questions to discover the requirements, then stops and prints a prompt for a separate planning step.

In plain words
What is it for?
Use it to create a GAIA specification through interactive questions, or use its automatic mode when no person needs to answer the questions.
Why use it?
It separates agreeing on requirements from deciding how to implement them, reducing accidental planning before the specification is settled.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions subagents.

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-spec.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-spec

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/gaia-react/gaia/gaia-spec"><img src="https://agentmods.dev/badge/commands/gaia-react/gaia/gaia-spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 507 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.00099 $0.00507
Opus 5.5 $0.00040 $0.00203
Sonnet 5.5 $0.00020 $0.00101
Haiku 4.5 $0.00010 $0.00051

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

Security

Grade A, and why

gaia-spec 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-spec.md · 22 lines

What it actually says

Run the GAIA spec workflow with these arguments: $ARGUMENTS

When the first word of the arguments is reopen, skip spec.md: read .claude/skills/gaia/references/spec/uat-divergence.md and follow its ## Reopen for the SPEC id the next word names.

Read .claude/skills/gaia/references/spec.md from the project root and follow it exactly. Treat the arguments above as the reference's $ARGUMENTS.

spec.md routes each run to these sub-references. Read one only when a line in spec.md says to, and then read the whole file:

  • .claude/skills/gaia/references/spec/lifecycle.md: step 2's pre-flight sweep.
  • .claude/skills/gaia/references/spec/resume.md: step 2, only when the allocator reports a draft and the run is interactive.
  • .claude/skills/gaia/references/spec/spec-template.md: step 3's initial draft.
  • .claude/skills/gaia/references/spec/clarify-loop.md, .claude/skills/gaia/references/spec/clarify-prompts.md and .claude/skills/gaia/references/spec/system-prompt.md: step 5's Socratic loop.
  • .claude/skills/gaia/references/spec/self-review-dispatch.md: step 6, and step 10's loop back to 6c.
  • .claude/skills/gaia/references/spec/audit.md and .claude/skills/gaia/references/spec/lens-dispatch.md: step 7's adversarial audit.
  • .claude/skills/gaia/references/spec/self-review.md: read by the self-review sub-agent, never this thread.
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 Changed · +2 lines · +19 tokens per session 6af6a587ee6e
  2. 10d ago Changed 29917bbbf9b6
  3. 12d ago Changed · -2 tokens per session 615bba5b106b
  4. 14d ago Changed · +82 tokens per session 61ae2825193f
  5. 21d ago Changed · +10 lines 98ee5be2d87b
  6. 23d ago Changed 23047c89b06e
  7. 2mo ago First seen · 10 lines · 0 tokens per session scan A eaea3c05994f

Subscribe to this mod's changes

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