rtk: Agent for Claude Code

.claude/agents/rtk-testing-specialist.md

rtk-testing-specialist is an agent for Claude Code from rtk-ai/rtk. It costs 20 tokens per session (3,328 once invoked), scanned A, original, Apache-2.0.

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

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions Claude Code.

This is rtk-ai/rtk's own configuration. It tells Claude Code how to work on rtk itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything rtk configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is let input = include_str!("../tests/fixtures/git_log_raw.txt");.

About the project

rtk is a command-line proxy that filters and compresses output from development commands before it reaches an LLM's context. It is used with coding agents to reduce the tokens consumed by commands such as Git operations. The catalogue includes skills, commands, agents, and instructions for using rtk in agent workflows.

rtk-ai/rtk · 84,655 stars · on GitHub · rtk-ai.app

Reuse

Borrowing it

Nothing to install: this file belongs to rtk-ai/rtk. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/rtk-ai/rtk/develop/.claude/agents/rtk-testing-specialist.md
Clone the repo
git clone --depth 1 https://github.com/rtk-ai/rtk

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 rtk-testing-specialist

README.md
[![agentmods](https://agentmods.dev/badge/agents/rtk-ai/rtk/rtk-testing-specialist/github.svg)](https://agentmods.dev/agents/rtk-ai/rtk/rtk-testing-specialist)
Your own site
<a href="https://agentmods.dev/agents/rtk-ai/rtk/rtk-testing-specialist"><img src="https://agentmods.dev/badge/agents/rtk-ai/rtk/rtk-testing-specialist/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 rtk-testing-specialist

Your own site · 80×15
<a href="https://agentmods.dev/agents/rtk-ai/rtk/rtk-testing-specialist"><img src="https://agentmods.dev/badge/agents/rtk-ai/rtk/rtk-testing-specialist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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,328 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.00020 $0.03328
Opus 5.5 $0.00008 $0.01331
Sonnet 5.5 $0.00004 $0.00666
Haiku 4.5 $0.00002 $0.00333

Measured 13d ago against content hash 6481751ae6af, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 13d 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 the ≥20% savings floor 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. 13d ago Changed 6481751ae6af
  2. 1mo ago Changed 96ab3c87a468
  3. 1mo 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 (84,655 stars, last pushed yesterday), licensed Apache-2.0. It adds 20 tokens to every session and 3,328 once invoked, about $0.0001 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-30.

Related

Other agents, from other repositories

tester

Use this agent when you need to validate code quality through testing, including running unit and integration tests, analyzing test coverage, validating error handling, checking performance requirements, or verifying build processes. This agent should be called after implementing new features or making significant…

opencue/cuecards · 349 tokens

test-runner

Test writing and execution agent. Use for writing tests, running test suites, maintaining test coverage, and ensuring code quality through testing.

randomittin/heimdall · 30 tokens

verifier

Post-execution verification agent. Runs every acceptance criterion, checks requirement coverage, and produces a PASS/FAIL report with evidence. Never skips a criterion.

randomittin/heimdall · 33 tokens

coder

Feature implementation specialist. Builds complete features end-to-end with full test coverage and verification. Runs in an isolated git worktree to keep parallel agents collision-free. Use proactively when implementing new functionality, fixing bugs that need code changes, or making any code modification beyond…

randomittin/heimdall · 57 tokens

tdd-guide

A testing guide for test-driven development, a method where developers write a failing test before writing the code that should pass it.

xiaobei930/cc-best · 90 tokens

integration-checker

Cross-phase integration and E2E flow verification. Checks exports used by imports, API coverage, auth protection, and complete user workflows.

SienkLogic/plan-build-run · 31 tokens