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.
npx agentmods add commands/gaia-react/gaia/spec-closegit clone --depth 1 https://github.com/gaia-react/gaiaWhat 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 | $0.00054 | $0.02000 |
| Opus 5 | $0.00027 | $0.01000 |
| Sonnet 5 | $0.00011 | $0.00400 |
| Haiku 4.5 | $0.00005 | $0.00200 |
Grade A, and why
speckit-gaia-spec-close 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Spec Close, Lifecycle
Closes a SPEC after its implementing PR has merged. Two responsibilities:
- Drain a deferred wiki-promote, if
/speckit-implementsaw the PR unmerged and cached a defer flag. - Cold-consolidate and reap the local SPEC folder, once the wiki side is settled and the ledger records the merge.
Auto-triggered from wiki-promote Step 8 on the immediate-merge path. Also invokable manually as /speckit-gaia-spec-close [SPEC-NNN] for the deferred path or for retroactive cleanup.
Step 1: Resolve target SPEC
If $ARGUMENTS matches SPEC-NNN, target that SPEC.
Otherwise, build the candidate list:
- Caches (deferred-drain candidates):
ls .gaia/local/cache/wiki-promote/*.json 2>/dev/null→ SPEC IDs awaiting drain. - Specs (in-flight or pending disposition):
ls -d .gaia/local/specs/SPEC-*/ 2>/dev/null→ SPEC IDs from folder names (excludesarchived/).
If exactly one candidate exists, default to it. If multiple, surface via AskUserQuestion:
- Question:
Multiple SPECs eligible for close. Which one? - Header:
SPEC close - Options: one per candidate, labeled
<spec_id>, <intent first line>with description noting(awaiting drain)if the cache exists.
If no candidates: report spec-close: no SPECs to close. and exit.
Step 2: Conditional drain
Test for .gaia/local/cache/wiki-promote/<spec_id>.json.
If the cache exists (deferred path):
- Read the cache. Run
gh pr list --head "$branch" --state merged --json number,mergedAt,url,body --limit 1. - If still unmerged: report
<spec_id>: PR for branch <branch> not yet merged. Re-run after merge.and exit. Do not delete the cache. Do not proceed to disposition, the SPEC is not closed yet. - If merged: re-invoke
/speckit-gaia-wiki-promoteby calling the Skill tool to run that command with the SPEC ID as its argument, and include the exact literal stringdrained: truein the invoking message. Wiki-promote's Step 3 detects the merged PR, runs Steps 4–7, and deletes the cache. Wiki-promote's Step 8 chain is suppressed in this drain context to avoid re-entering spec-close: its Step 8 suppression guard matches that literaldrained: truetoken in the invocation, so emit it verbatim, not a paraphrase, and do not rely on the surrounding conversation to convey it (see wiki-promote Step 8 for the guard).
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.
- 2d ago First seen · 112 lines · 54 tokens per session scan A b4fd43d57e8b
speckit-gaia-spec-close is a command published in the GitHub repository gaia-react/gaia (22 stars, last pushed 2d ago), licensed MIT. It adds 54 tokens to every session and 2,000 once invoked, about $0.0003 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.
Other commands, from other repositories
pr-description
Generate a pull request description based on the changes in the current branch.
push-changes
If no topic provided, just document the recent changes. If a topic is provided, focus on documenting that topic.
create-PR
Command "create-PR" from bartstc/vite-ts-react-template, covering create a pr against this branch: $arguments, follow these steps and remember.
security-sast
Static Application Security Testing (SAST) for code vulnerability analysis across multiple languages and frameworks.
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.