rr-debug-test

rr-debug-test is a skill for Claude Code from karellen/karellen-rr-mcp. It costs 30 tokens per session (746 once invoked), scanned A, original, Apache-2.0.

A procedure for finding the cause of a failing test with rr, a debugger that records and replays program executions. It can identify the failing child process when a test runner starts other programs.

In plain words
What is it for?
Use it to record commands such as pytest, CTest, or make test, locate the failing process, replay it, inspect the failure, and trace it back to its root cause.
Why use it?
A test may fail inside a subprocess rather than in the test runner itself, and the failure may be difficult to reproduce. Recorded replay makes the same failure available for backward inspection.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the karellen-rr-mcp plugin — 4 skills, 1 agent, 3 hooks, 1 MCP server shipped together

Good fit Use it to record commands such as pytest, CTest, or make test, locate the failing process, replay it, inspect the failure, and trace it back to its root cause.

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

Made for: Claude Code.

Or install karellen-rr-mcp, the plugin that ships this one along with the rest of its 4 skills, 1 agent, 3 hooks, 1 MCP server.

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 rr-debug-test

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/karellen/karellen-rr-mcp/rr-debug-test"><img src="https://agentmods.dev/badge/skills/karellen/karellen-rr-mcp/rr-debug-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 746 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.00030 $0.00746
Opus 5 $0.00015 $0.00373
Sonnet 5 $0.00006 $0.00149
Haiku 4.5 $0.00003 $0.00075

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

Security

Grade A, and why

rr-debug-test 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 10d 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/rr-debug-test/SKILL.md · 91 lines

How it starts

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

Debug Failing Test with rr

Use this skill when a test fails (crash, assertion, wrong result) and you need to find the root cause. This is especially useful for test harnesses that spawn subprocesses, where the failing test runs in a child process.

Workflow

1. Record the Test Suite

Record the entire test command. rr captures all subprocesses automatically:

rr_record(command=$ARGUMENTS, trace_dir="<project>/rr-trace-<random>")

For build-system test runners:

rr_record(command=["make", "test"], trace_dir=...)
rr_record(command=["ctest", "--test-dir", "build"], trace_dir=...)
rr_record(command=["pytest", "tests/"], trace_dir=...)

2. Find the Failing Process

Test harnesses (CTest, pytest, make, shell scripts) spawn child processes. The root process is the harness, NOT the test. You must identify the correct subprocess:

rr_ps(trace_dir="<trace>")

How to identify the right process:

  • Look at the command column for the actual test binary or script
  • Check exit codes: negative = signal (-11 = SIGSEGV, -6 = SIGABRT), non-zero = failure
  • The harness process (shell, python, ctest) is usually PID 1 in the trace — skip it
  • If multiple tests failed, start with the first non-zero exit code

3. Replay the Failing Process

rr_replay_start(trace_dir="<trace>", pid=<failing-pid>)

Always pass pid for test recordings. Without it, rr replays the harness process which lacks test debug symbols and is not where the bug occurred.

4. Navigate to the Failure

  • Crash/signal: rr_continue() — stops at signal automatically
  • Assertion failure: rr_breakpoint_set("__assert_fail") or rr_breakpoint_set("abort"), then rr_continue()
  • Test framework assertion (gtest, catch2, etc.): rr_breakpoint_set("testing::internal::AssertHelper") for gtest, or set a breakpoint on the test function itself
  • Wrong result: rr_breakpoint_set("test_function_name"), then rr_continue() and step through the test logic

Read the full file on GitHub · 91 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. 10d ago First seen · 91 lines · 30 tokens per session scan A c6c9815c55e9

Subscribe to this mod's changes

rr-debug-test is a skill published in the GitHub repository karellen/karellen-rr-mcp (3 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 30 tokens to every session and 746 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

systematic-debugging

4-phase root cause debugging: understand bugs before fixing.

NousResearch/hermes-agent · 16 tokens

langsmith-observability

LLM observability platform for tracing, evaluation, and monitoring. Use when debugging LLM applications, evaluating model outputs against datasets, monitoring production systems, or building systematic testing pipelines for AI applications.

davila7/claude-code-templates · 45 tokens

experimental-code-coverage-local-debugger

Runs code coverage locally via Universal Test Runner (UTR) or helper scripts, mimicking LUCI trybots. Activate when CQ tryjobs fail or underreport coverage, to test local GN/recipe repairs before uploading, or to debug hermetic crashes.

chromium/chromium · 59 tokens

adversarial-reviewer

Adversarial code review that assumes bugs exist and hunts for them. Use when asked to review code, find bugs, audit for correctness, stress-test a PR, or when someone says "tear this apart" or "what's wrong with this". Give no benefit of the doubt — every line is guilty until proven innocent.

emdash-cms/emdash · 71 tokens

cli-e2e

Write, modify, or debug Docker-based Composio CLI end-to-end tests under ts/e2e-tests/cli, including binary invocation, fixture isolation, output assertions, and package manifests. Use for CLI E2E test suites only; use cli-command for CLI source implementation.

ComposioHQ/composio · 62 tokens

ios-simulator

Verify and debug native, React Native, Expo, or Flutter apps on an iOS Simulator with agent-device. Use when an agent needs to launch an app, inspect its live UI, tap, type, scroll, validate a code change, collect failure evidence, or reproduce a workflow on an iPhone or iPad Simulator.

callstack/agent-device · 69 tokens