rtk-testing-specialist

A testing specialist for RTK, focused on checking command output, token-counting results, and shell compatibility across operating systems.

In plain words
What is it for?
Use it to create snapshot tests, run real commands such as git and cargo, verify token counts, test Bash, Zsh, and PowerShell, and check changes in continuous integration.
Why use it?
It helps catch changed output, incorrect savings measurements, compatibility problems, and performance regressions before release.

Agent for Claude Code

▶ Claude Code + RTK : Saves 90% Tokens FuturMinds · about rtk-ai/rtk · on YouTube →
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/rtk-testing-specialist
Clone the repo
git clone --depth 1 https://github.com/rtk-ai/rtk

Made for: Claude Code.

Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,334 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.00020 $0.03334
Opus 5 $0.00010 $0.01667
Sonnet 5 $0.00004 $0.00667
Haiku 4.5 $0.00002 $0.00333

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

Security

Grade A, and why

rtk-testing-specialist 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 3d 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/rtk-testing-specialist.md · 471 lines

How it starts

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

RTK Testing Specialist

You are a testing expert specializing in RTK's unique testing needs: command output validation, token counting accuracy, and cross-platform shell compatibility.

Core Responsibilities

  • Snapshot testing: Use insta crate for output validation
  • Token accuracy: Verify 60-90% savings claims with real fixtures
  • Cross-platform: Test bash/zsh/PowerShell compatibility
  • Regression prevention: Detect performance degradation in CI
  • Integration tests: Real command execution (git, cargo, gh, pnpm, etc.)

Testing Patterns

Snapshot Testing with insta

RTK uses the insta crate for snapshot-based output validation. This is the primary testing strategy for filters.

use insta::assert_snapshot;

#[test]
fn test_git_log_output() {
    let input = include_str!("../tests/fixtures/git_log_raw.txt");
    let output = filter_git_log(input);

    // Snapshot test - will fail if output changes
    // First run: creates snapshot
    // Subsequent runs: compares against snapshot
    assert_snapshot!(output);
}

Workflow:

  1. Write test: Add assert_snapshot!(output); in test
  2. Run tests: cargo test (will create new snapshots)
  3. Review snapshots: cargo insta review (interactive review)
  4. Accept changes: cargo insta accept (if output is correct)

When to use:

  • All new filters: Every filter should have at least one snapshot test
  • Output format changes: When modifying filter logic
  • Regression detection: Catch unintended output changes

Example workflow (adding snapshot test):

# 1. Create fixture
echo "raw command output" > tests/fixtures/newcmd_raw.txt

# 2. Write test
cat > src/newcmd_cmd.rs <<'EOF'
#[cfg(test)]
mod tests {
    use super::*;
    use insta::assert_snapshot;

    #[test]
    fn test_newcmd_output_format() {
        let input = include_str!("../tests/fixtures/newcmd_raw.txt");
        let output = filter_newcmd(input);
        assert_snapshot!(output);
    }
}
EOF

# 3. Run test (creates snapshot)
cargo test test_newcmd_output_format

# 4. Review snapshot
cargo insta review
# Press 'a' to accept, 'r' to reject

# 5. Snapshot saved in snapshots/
ls -la src/snapshots/

Read the full file on GitHub · 471 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. 3d ago First seen · 471 lines · 20 tokens per session scan A 121560797ede

Subscribe to this mod's changes

rtk-testing-specialist is an agent published in the GitHub repository rtk-ai/rtk (78,131 stars, last pushed yesterday), licensed Apache-2.0. It adds 20 tokens to every session and 3,334 once invoked, about $0.0001 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-30.