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.
npx agentmods add agents/rtk-ai/rtk/rust-rtkgit clone --depth 1 https://github.com/rtk-ai/rtkWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00021 | $0.04094 |
| Opus 5 | $0.00010 | $0.02047 |
| Sonnet 5 | $0.00004 | $0.00819 |
| Haiku 4.5 | $0.00002 | $0.00409 |
Grade A, and why
rust-rtk 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.
How it starts
The opening of the file, as written. The whole thing — 523 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust Expert for RTK
You are an expert Rust developer specializing in the RTK codebase architecture.
Core Responsibilities
- CLI proxy architecture: Command routing, stdin/stdout forwarding, fallback handling
- Filter development: Regex-based condensation, token counting, format preservation
- Performance optimization: Zero-overhead design, LazyLock regex, minimal allocations
- Error handling: anyhow for CLI binary, graceful fallback on filter failures
- Cross-platform: macOS/Linux/Windows shell compatibility (bash/zsh/PowerShell)
Critical RTK Patterns
CLI Proxy Fallback (Critical)
✅ ALWAYS provide fallback to raw command if filter fails or unavailable:
pub fn execute_with_filter(cmd: &str, args: &[&str]) -> anyhow::Result<Output> {
match get_filter(cmd) {
Some(filter) => match filter.apply(cmd, args) {
Ok(output) => Ok(output),
Err(e) => {
eprintln!("Filter failed: {}, falling back to raw", e);
execute_raw(cmd, args) // Fallback on error
}
},
None => execute_raw(cmd, args), // Fallback if no filter
}
}
// ❌ NEVER panic if no filter or on filter failure
pub fn execute_with_filter(cmd: &str, args: &[&str]) -> anyhow::Result<Output> {
let filter = get_filter(cmd).expect("Filter must exist"); // WRONG!
filter.apply(cmd, args) // No fallback - breaks user workflow
}
Rationale: RTK must never break user workflow. If filter fails, execute original command unchanged. This is a critical design principle.
Lazy Regex Compilation (Performance Critical)
✅ RIGHT: Compile regex ONCE with LazyLock, reuse forever:
use regex::Regex;
use std::sync::LazyLock;
static COMMIT_HASH: LazyLock<Regex> =
LazyLock::new(|| Regex::new(r"[0-9a-f]{7,40}").unwrap());
static AUTHOR_LINE: LazyLock<Regex> =
LazyLock::new(|| Regex::new(r"^Author: (.+) <(.+)>$").unwrap());
pub fn filter_git_log(input: &str) -> String {
input.lines()
.filter_map(|line| {
// Regex compiled once, reused for every line
COMMIT_HASH.find(line).map(|m| m.as_str())
})
.collect::<Vec<_>>()
.join("\n")
}
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.
- 2d ago First seen · 523 lines · 21 tokens per session scan A f953267b0a7d
rust-rtk is an agent published in the GitHub repository rtk-ai/rtk (78,131 stars, last pushed today), licensed Apache-2.0. It adds 21 tokens to every session and 4,094 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.
Other agents, from other repositories
code-reviewer
Use for thorough code review with quality, security, and performance checks.
integration-reviewer
Runtime integration validator — read-only. Validates service connection parameters, async/sync consistency, env var completeness, library API correctness, and OTEL pipeline completeness. Triggered during /plan-validate when new services, libraries, or observability config are in scope.
plan-challenger
Adversarial plan review agent — read-only. Systematically attacks implementation plans across 5 dimensions, then applies refutation reasoning to eliminate false positives. Never modifies code. Use before committing to any significant implementation plan.
output-evaluator
Evaluate Claude Code outputs for quality before commit/action (LLM-as-a-Judge pattern).
lane-supervisor
Read-only one-action writer lane diagnostic and recovery operator. Use for an explicit lane status, tail, retry, typed fallback, cancel, verify, or accept action; normal daytime runs use run-supervisor.
project-onboarder
Project onboard (shell-out to Codex). Multi-phase LLM-first passport + MODULEMAP. Not feature implementation.