rebar-debug

rebar-debug is a skill for Claude Code, Codex from navapbc/rebar. It costs 183 tokens per session (16,950 once invoked), scanned C, original, Apache-2.0.

A two-phase debugging process based on testing explanations against evidence. It first investigates a bug to prove its root cause, then applies a fix using red-to-green test-driven development, where a failing test is made to pass.

In plain words
What is it for?
Use it to investigate one or more bugs, collect context, form and test falsifiable hypotheses, document a confirmed root cause, implement a repair, and check that the original problem is resolved.
Why use it?
It prevents fixes that only hide symptoms or happen to work. Keeping investigation separate from repair makes the cause and the resulting change easier to verify.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions AGENTS.md.

Good fit Use it to investigate one or more bugs, collect context, form and test falsifiable hypotheses, document a confirmed root cause, implement a repair, and check that the original problem is resolved.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/navapbc/rebar/rebar-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 navapbc/rebar --skill rebar-debug
Clone the repo
git clone --depth 1 https://github.com/navapbc/rebar

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/navapbc/rebar/rebar-debug.svg)](https://agentmods.dev/skills/navapbc/rebar/rebar-debug)
Your own site
<a href="https://agentmods.dev/skills/navapbc/rebar/rebar-debug"><img src="https://agentmods.dev/badge/skills/navapbc/rebar/rebar-debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 183 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 16,950 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00183 $0.16950
Opus 5 $0.00092 $0.08475
Sonnet 5 $0.00037 $0.03390
Haiku 4.5 $0.00018 $0.01695

Measured today against content hash e4d7aff06cbd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade C, and why

rebar-debug scanned grade C with 1 finding 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 today.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

shell script that performs real deletion, ran the tests, and the glob expanded to `rm -rf /*` —
examples/agent-skills/rebar-debug/SKILL.md · 1,054 lines

How it starts

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

Hypothesis-Driven Root-Cause Protocol

You are a senior debugging engineer applying the scientific method under a two-phase discipline. You work in two clearly separated phases, and you move to the second only after the first is complete:

  • Phase 1 — Understand. An analysis-only phase whose single work product is a proven, cited root cause. Here you are an investigator building a case: you gather evidence, generate falsifiable hypotheses, and test them. This phase produces understanding — a confirmed explanation of the mechanism — and nothing else.
  • Phase 2 — Repair. A proven root cause unlocks this phase. Here you turn the proof into a fix under strict RED→GREEN discipline and confirm the original problem is resolved.

The right to write a fix is earned by a confirmed root cause. Keeping the phases separate is what makes each fix trustworthy: a fix that rests on a proven mechanism corrects the problem, whereas a fix written to make a symptom disappear is a coincidence waiting to regress. Give each phase — and each stage inside Phase 1 — its full attention and let it finish before you begin the next.

The input is a problem or a list of problems (a bug report, a failing test, a stack trace, an incident, a Jira ticket, a vague "X is broken"). Run the full protocol below for each problem independently. Problems are cheap to parallelize during Phase 1 and are kept isolated so evidence for one stays clean of another.

Before you begin, switch to a fresh worktree based on origin/main, and cd into it. Do this as the very first step of skill execution — git fetch origin && make worktree name=<branch>, which creates the worktree from current origin/main and provisions its virtualenv — so all reproduction, experiments, and the eventual Phase 2 fix happen in isolation on current main, never in the primary checkout. Then run every command with the worktree venv first on PATH (env PATH="$PWD/.venv/bin:$PATH" <cmd>, or activate it in each command — shell state does not persist between them). A fresh worktree's venv is not on the ambient PATH, so without this the git commit hook fails with a missing ruff/mypy even though the code is clean — see docs/local-dev-env.md. cd into the worktree and run every subsequent command — reproduction, experiments, edits, gates, rebar, ticket closes, and git — from inside it, so they all act on this worktree's branch and not the primary checkout. When the skill concludes — whether the fix lands, the run fails, or you abandon it — retire the worktree with git worktree remove <path> (then git worktree prune), so it does not leak; keep it only when an unlanded fix must survive for follow-up.

Read the full file on GitHub · 1,054 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. today Changed e4d7aff06cbd
  2. 8d ago First seen · 1,054 lines · 183 tokens per session scan C 01560409bffa

Subscribe to this mod's changes

rebar-debug is a skill published in the GitHub repository navapbc/rebar (4 stars, last pushed today), licensed Apache-2.0. It adds 183 tokens to every session and 16,950 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.