rig-debug

rig-debug is a skill for Claude Code from agent-rig/rig. It costs 82 tokens per session (1,160 once invoked), scanned A, original, MIT.

A structured debugging process for finding the root cause of failing tests, production bugs, flaky behaviour, or unexplained errors. It gathers evidence through four stages before proposing a fix.

In plain words
What is it for?
Use it to reproduce a failure, inspect the relevant code and history, compare similar bugs, form and test a hypothesis, and produce a minimal fix.
Why use it?
It prevents fixes based only on guesses and narrows the work to one evidence-backed, minimal change. It also checks whether the same bug pattern appears elsewhere in the project.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to reproduce a failure, inspect the relevant code and history, compare similar bugs, form and test a hypothesis, and produce a minimal fix.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agent-rig/rig/rig-debug
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.

Any agent
npx skills add agent-rig/rig --skill rig-debug
Clone the repo
git clone --depth 1 https://github.com/agent-rig/rig

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 rig-debug

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/agent-rig/rig/rig-debug"><img src="https://agentmods.dev/badge/skills/agent-rig/rig/rig-debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,160 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.00082 $0.01160
Opus 5.5 $0.00033 $0.00464
Sonnet 5.5 $0.00016 $0.00232
Haiku 4.5 $0.00008 $0.00116

Measured 1mo ago against content hash 29140dcfba9b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rig-debug 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 1mo 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.

skills/rig-debug/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Debug

Drive a bug to root cause and a single minimal fix using the four-phase methodology.

Configuration

Reads .rig/config.json:

  • test.command — how to run the test suite when collecting Phase 1 evidence (default: npm test).
  • agents.debugger — the project's name for the canonical debugger role (default: debugger).
  • agents.architect — the project's name for the canonical architect role, used only when escalating (default: architect).
  • style.guideFile — the writing style for the report you hand back (default: .claude/STYLE.md).

If the file is absent, use the defaults above and note you're running unconfigured.

The four-phase methodology

The debugger agent runs this loop; the skill drives it and refuses to let it skip ahead. Each phase has a deliverable that gates the next:

  • Phase 1 — Root cause. Gather evidence: reproduce the failure, read the failing code path, capture the exact error/stack/trace, git diff the suspect window. Deliverable: a stated root cause backed by observed evidence — not a guess.
  • Phase 2 — Pattern analysis. Ask whether this is an instance of a class. Does the same bug shape exist elsewhere in the tree? Deliverable: the blast radius (this one site, or N sites).
  • Phase 3 — Hypothesis. State the specific change that should fix the root cause and why, plus how you'll confirm it. Deliverable: one falsifiable hypothesis.
  • Phase 4 — Minimal fix. Apply the smallest change that addresses the root cause, add/extend a test that fails before and passes after. Deliverable: root cause + fix + test.

Arguments

$ARGUMENTS is a one-line description of what's broken. Examples:

  • test suite fails with a database connection-closed error
  • the workspace-commit step times out on a fresh worktree
  • PR #519 deprovision workflow leaves orphaned resources behind

If $ARGUMENTS is empty, ask the user for the symptom in one sentence. Don't start the loop on a vague brief.

Read the full file on GitHub · 108 lines

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. 1mo ago First seen · 108 lines · 82 tokens per session scan A 29140dcfba9b

Subscribe to this mod's changes

rig-debug is a skill published in the GitHub repository agent-rig/rig (3 stars, last pushed 1mo ago), licensed MIT. It adds 82 tokens to every session and 1,160 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

browser-trace

Capture a full DevTools-protocol trace of any browser automation — CDP firehose, screenshots, and DOM dumps — then bisect the stream into per-page searchable buckets. Use when the user wants to debug a failed run, audit network/console/DOM activity, attach a trace to an in-progress session, or feed structured per-page…

mxyhi/ok-skills · 88 tokens

ontoly-software-graph

Use Ontoly's deterministic Software Graph and MCP capabilities for repository architecture, request tracing, dependency analysis, configuration lookup, and impact analysis before falling back to source search.

mxyhi/ok-skills · 40 tokens

refactoring-guru

Apply Refactoring.Guru-inspired rules when diagnosing code smells, choosing refactoring techniques, and stopping cleanup before uncontrolled redesign.

ciembor/agent-rules-books · 29 tokens

working-effectively-with-legacy-code

Apply Michael Feathers-inspired legacy-code rules when changing hard-to-test code safely with characterization tests, seams, sprout methods, or wrap methods.

ciembor/agent-rules-books · 37 tokens

refactoring

Apply Martin Fowler-inspired refactoring rules when improving existing code structure while preserving observable behavior.

ciembor/agent-rules-books · 20 tokens

infrastructure-doctor

Skill for the doctor infrastructure module providing repository-level diagnostics and safe, reversible automated repair. Use when the local checkout is acting up, before opening a bug, when onboarding a fresh clone, or as a periodic health probe. Every mutation is backed up under .doctor/backups/ and journalled in…

docxology/template · 79 tokens