Skip to main content
skill CX Codex

gaia-debugging — Claude Code skill: what it does, how to install

gaia-debugging examines a failed GAIA task, classifies the failure, and suggests a targeted fix before you submit the task again.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ruvnet/ruflo --skill gaia-debugging -a claude-code
Open on GitHub

What gaia-debugging does

gaia-debugging loads a GAIA task trace by task_id, identifies the failure mode, and maps it to a repair step. It covers missing tools, reasoning mistakes, answer extraction bugs, loops, dataset shifts, and API timeouts. The skill can also check the registered tool catalogue and search memory for related failures.

Its workflow reads the result, reruns gaia-bench run with extended logging, verifies the suspected cause, and stores the resulting pattern. The commands memory store and memory search handle pattern storage and lookup. Check the results path first: the workflow uses ~/.cache/ruflo/gaia/results-latest.json by default, while another path is passed through --results.

What it helps with

  • locate the trace for a failed GAIA task
  • classify why an answer was marked wrong
  • separate a tool failure from a reasoning miss
  • test FINAL_ANSWER: extraction against the trace
  • store a verified repair pattern

Example prompts for the agent

  • Diagnose the failed GAIA task task_id from ~/.cache/ruflo/gaia/results-latest.json and suggest a fix.
  • Find out why task task_id returned a wrong answer using --results=<path>.
  • Search memory for a related failure with memory search, then store the verified repair pattern.

How to install gaia-debugging

1Skills CLI (Vercel)

npx skills add ruvnet/ruflo --skill gaia-debugging -a claude-code

2Manually: put the files in place

~/.claude/skills/gaia-debugging/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gaia-debugging/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about gaia-debugging

How do I install gaia-debugging in Claude Code?

Run npx skills add ruvnet/ruflo --skill gaia-debugging -a claude-code, run the same command again, then open ~/.claude/skills/gaia-debugging/SKILL.md.

What does gaia-debugging do?

It examines a failed GAIA task trace, classifies the failure mode, and proposes a targeted repair before the task is rerun.

Which failure modes does it cover?

It covers tool gaps, reasoning misses, extraction bugs, loops, dataset shifts, and API timeouts.

Source text

SKILL.md · MIT
---
name: gaia-debugging
description: Diagnose why a GAIA question failed — extract trace, classify failure mode, and propose a fix. Use when a GAIA benchmark run reports a failed/incorrect task_id and you need to root-cause it before resubmitting.
argument-hint: "<task_id> [--results=<path>]"
allowed-tools: Bash Read mcp__plugin_ruflo-core_ruflo__memory_search mcp__plugin_ruflo-core_ruflo__memory_store mcp__plugin_ruflo-core_ruflo__agentdb_pattern-search mcp__plugin_ruflo-core_ruflo__agentdb_pattern-store
---

# GAIA Debugging Skill

When a GAIA question fails, systematically diagnose the root cause and propose
a targeted fix.

## When to use

- A specific `task_id` returns the wrong answer or times out
- Pass-rate dropped between two runs and you need to find the regression
- You want to understand why a particular question class is consistently failing

## Failure mode taxonomy

| Code | Mode | Symptom | Fix direction |
|------|------|---------|--------------|
| TG | Tool Gap | Agent lacks a required tool (no image OCR, no PDF reader) | Add tool to catalogue |
| RM | Reasoning Miss | Agent has the right data but draws wrong conclusion | Improve system prompt, add CoT instruction |
| EB | Extraction Bug | Answer is in the trace but `FINAL_ANSWER:` regex fails | Fix answer extraction pattern |
| LI | Loop Issue | Agent loops (re-asks same tool call) and hits turn limit | Increase max-turns or add loop-detection |
| DS | Dataset Shift | Ground truth differs from what web currently shows | Flag for HAL dataset audit |
| AT | API Timeout | Tool call times out; agent never gets the result | Increase per-turn timeout |

## Diagnostic workflow

### Step 1 — Load the question trace

```bash
# Find the result for the task_id in the latest run
RESULTS=~/.cache/ruflo/gaia/results-latest.json
node -e "
  const r = JSON.parse(require('fs').readFileSync('$RESULTS'));
  const q = r.results.find(x => x.task_id === '$TASK_ID');
  console.log(JSON.stringify(q, null, 2));
"
```

### Step 2 — Classify the failure

Look at the trace output:

1. **No tools called at all** → RM or configuration issue
2. **Tool called but returned error** → TG or AT
3. **Tool returned data, wrong answer** → RM or EB
4. **Correct answer in trace but marked wrong** → EB
5. **max-turns hit** → LI or question too hard for current model

### Step 3 — Re-run with extended logging

```bash
node v3/@claude-flow/cli/bin/cli.js gaia-bench run \
  --level 1 --limit N \
  --models claude-sonnet-4-6 \
  --max-turns 20 \
  --output json
```

`gaia-bench run` cannot select one task: there is no `--task-id` flag (unknown flags are ignored silently). Use the smallest `--limit N` that reaches the question's position in the level's dataset order, and read only the trace for `$TASK_ID` from the output; completed questions are skipped on resume via the checkpoint file.

### Step 4 — Apply targeted fix

| Failure | Action |
|---------|--------|
| TG — missing web_browse | Verify `gaia-tools/index.ts` exports `web_browse`; check tool registration |
| TG — missing image OCR | Add `image_describe` tool call; verify `GOOGLE_AI_API_KEY` |
| RM — reasoning | Add a system prompt instruction: "Before answering, list all facts you have gathered" |
| EB — extraction | Test the `FINAL_ANSWER_RE` regex against the trace manually |
| LI — loop | Add a tool-call deduplication guard in `gaia-agent.ts` |
| AT — timeout | Set `DEFAULT_PER_TURN_TIMEOUT_MS` higher or use `--max-turns` flag |

### Step 5 — Verify fix and store pattern

```bash
# Re-run (no --task-id exists; use the smallest --limit that includes the question)
node … gaia-bench run --level $LEVEL --limit N --models $MODEL --output json

# If now passing, store the pattern
npx @claude-flow/cli@latest memory store \
  --namespace gaia-debug-patterns \
  --key "fix-$FAILURE_CODE-$(date +%Y%m%d)" \
  --value "task_id=$TASK_ID, mode=$FAILURE_CODE, fix=$FIX_DESCRIPTION"
```

## Quick reference: tool catalogue check

```bash
node -e "
  const { createDefaultToolCatalogue } = require('./v3/@claude-flow/cli/src/benchmarks/gaia-tools/index.js');
  const cat = createDefaultToolCatalogue({});
  console.log('Tools registered:', cat.definitions.map(t => t.name));
"
```

Expected: `web_search`, `file_read`, `web_browse`, `image_describe`, `python_exec`

## Pattern storage

After resolving a debugging session, store the finding:
```bash
npx @claude-flow/cli@latest memory store \
  --namespace gaia-debug-patterns \
  --key "session-$(date +%Y%m%d-%H%M)" \
  --value '{"task_id":"$TASK_ID","failure_mode":"$CODE","fix":"$FIX","verified":true}'
```

Search for similar past failures:
```bash
npx @claude-flow/cli@latest memory search \
  --namespace gaia-debug-patterns \
  --query "extraction bug final answer regex"
```

© ruvnet · MIT · ruvnet/ruflo

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set146

trader-cloud-backtest Sends heavy neural-trader work — walk-forward, Monte-Carlo, parameter sweeps, model training — to a Managed Agent container instead of your own machine. CX Codex +1 599installs managed-agent Skill for running Anthropic Claude Managed Agents in the cloud. Best for long asynchronous tasks inside a persistent container with network access. CX Codex +1 596installs trader-portfolio-cg Solves mean-variance optimization with conjugate gradients instead of the Neumann series. Useful when you recompute portfolio weights often and latency gets in the way. CX Codex +1 513installs trader-explain Identifies key features behind LSTM and Transformer trading signals with PageRank and writes signed audit artifacts. CX Codex +1 510installs gaia-submission Runs the full GAIA benchmark pipeline from API key checks to building a HAL-compatible submission package. Useful when evaluating agent accuracy. CX Codex +1 435installs gaia-architecture-comparison Compares the ruflo GAIA benchmark harness with Princeton's HAL reference implementation. It identifies architectural gaps and prioritizes engineering steps to improve benchmark pass rates. CX Codex +1 432installs nested-subagents Spawns a tree of sub-agents where each child can spawn its own children. Useful when intermediate state would overflow a single agent's context. CX Codex +1 316installs claude-flow Connect Claude Code to claude-flow tools for agent coordination and shared task context. The MCP setup uses ANTHROPIC_API_KEY. CX Codex +1 ★ 79,357repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor