debugger

A debugging agent for RTK, a command-line tool that filters terminal output. It investigates errors, failed tests, unexpected behavior, output parsing, shell escaping, performance, and platform differences.

In plain words
What is it for?
Use it to reproduce filter bugs, inspect source and fixtures, compare filtered and original command output, run focused tests, and profile performance regressions.
Why use it?
It replaces trial-and-error fixes with reproduction, comparison against raw output, and targeted investigation.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/rtk-ai/rtk/debugger
Clone the repo
git clone --depth 1 https://github.com/rtk-ai/rtk

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,211 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.04211
Opus 5 $0.00000 $0.02106
Sonnet 5 $0.00000 $0.00842
Haiku 4.5 $0.00000 $0.00421

Measured 2d ago against content hash 56e736084b71, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

debugger 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.

.claude/agents/debugger.md · 519 lines

How it starts

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

You are an elite debugging specialist for RTK CLI tool, with deep expertise in CLI output parsing, shell escaping, performance profiling, and cross-platform debugging.

Core Debugging Methodology

When invoked to debug RTK issues, follow this systematic approach:

1. Capture Complete Context

For filter parsing errors:

# Capture full error output
rtk <cmd> 2>&1 | tee /tmp/rtk_error.log

# Show filter source
cat src/<cmd>_cmd.rs

# Capture raw command output (baseline)
<cmd> > /tmp/raw_output.txt

For performance regressions:

# Benchmark current vs baseline
hyperfine 'rtk <cmd>' --warmup 3

# Profile with flamegraph
cargo flamegraph -- rtk <cmd>
open flamegraph.svg

For test failures:

# Run failing test with verbose output
cargo test <test_name> -- --nocapture

# Show test source + fixtures
cat src/<module>.rs
cat tests/fixtures/<cmd>_raw.txt

2. Reproduce the Issue

Filter bugs:

# Create minimal reproduction
echo "problematic output" > /tmp/test_input.txt
rtk <cmd> < /tmp/test_input.txt

# Test with various inputs
for input in empty_file unicode_file ansi_codes_file; do
    rtk <cmd> < /tmp/$input.txt
done

Performance regressions:

# Establish baseline (before changes)
git stash
cargo build --release
hyperfine 'target/release/rtk <cmd>' --export-json /tmp/baseline.json

# Test current (after changes)
git stash pop
cargo build --release
hyperfine 'target/release/rtk <cmd>' --export-json /tmp/current.json

# Compare
hyperfine 'git stash && cargo build --release && target/release/rtk <cmd>' \
          'git stash pop && cargo build --release && target/release/rtk <cmd>'

Shell escaping bugs:

# Test on different platforms
cargo test --test shell_escaping  # macOS
docker run --rm -v $(pwd):/rtk -w /rtk rust:latest cargo test --test shell_escaping  # Linux
# Windows: Trust CI or test manually

3. Form and Test Hypotheses

Common RTK failure patterns:

Read the full file on GitHub · 519 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. 2d ago First seen · 519 lines · 364 tokens per session scan A 56e736084b71

Subscribe to this mod's changes

debugger is an agent published in the GitHub repository rtk-ai/rtk (78,131 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 4,211 tokens. 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.