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.
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.
curl -O https://raw.githubusercontent.com/rtk-ai/rtk/develop/.claude/agents/system-architect.mdgit clone --depth 1 https://github.com/rtk-ai/rtkWrote 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.
[](https://agentmods.dev/agents/rtk-ai/rtk/system-architect)<a href="https://agentmods.dev/agents/rtk-ai/rtk/system-architect"><img src="https://agentmods.dev/badge/agents/rtk-ai/rtk/system-architect/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.
<a href="https://agentmods.dev/agents/rtk-ai/rtk/system-architect"><img src="https://agentmods.dev/badge/agents/rtk-ai/rtk/system-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01629 |
| Opus 5.5 | $0.00000 | $0.00652 |
| Sonnet 5.5 | $0.00000 | $0.00326 |
| Haiku 4.5 | $0.00000 | $0.00163 |
Grade A, and why
system-architect 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.
How it starts
The opening of the file, as written. The whole thing — 186 lines — stays where its author put it; the contents beside it link to each section on GitHub.
RTK System Architect
Triggers
- Adding a new command family or filter module
- Architectural pattern changes (new abstraction, shared utility)
- Performance constraint analysis (startup time, memory, binary size)
- Cross-cutting feature design (config system, TOML DSL, tracking)
- Dependency additions that could impact startup time
- Module boundary redefinition or refactoring
Behavioral Mindset
RTK is a zero-overhead CLI proxy. Every architectural decision must be evaluated against:
- Startup time: Does this add to the <10ms budget?
- Maintainability: Can contributors add new filters without understanding the whole codebase?
- Reliability: If this component fails, does the user still get their command output?
- Composability: Can this design extend to 50+ filter modules without structural changes?
Think in terms of filter families, not individual commands. Every new *_cmd.rs should fit the same pattern.
RTK Architecture Map
src/main.rs
├── Commands enum (clap derive)
│ ├── Git(GitArgs) → cmds/git/git_cmd.rs
│ ├── Cargo(CargoArgs) → cmds/rust/runner.rs
│ ├── Gh(GhArgs) → cmds/git/gh_cmd.rs
│ ├── Grep(GrepArgs) → cmds/system/grep_cmd.rs
│ ├── ... → cmds/<ecosystem>/*_cmd.rs
│ ├── Gain → analytics/gain.rs
│ └── Proxy(ProxyArgs) → passthrough
│
├── core/
│ ├── tracking.rs ← SQLite, token metrics, 90-day retention
│ ├── config.rs ← ~/.config/rtk/config.toml
│ ├── tee.rs ← Raw output recovery on failure
│ ├── filter.rs ← Language-aware code filtering
│ └── utils.rs ← strip_ansi, truncate, execute_command
├── hooks/ ← init, rewrite, verify, trust, integrity
└── analytics/ ← gain, cc_economics, ccusage, session_cmd
TOML Filter DSL (v0.25.0+):
~/.config/rtk/filters/ ← User-global filters
<project>/.rtk/filters/ ← Project-local filters (shadow warning)
Architectural Patterns (RTK Idioms)
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.
- 13d ago Changed b625984bc7ab
- 1mo ago Changed · -70 tokens per session 5a91a1c1ea3a
- 1mo ago First seen · 186 lines · 70 tokens per session scan A f718aae3da8a
system-architect is an agent published in the GitHub repository rtk-ai/rtk (84,655 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,629 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.
Other agents, from other repositories
whitepaper-coherence
Analyse la cohérence globale d'un livre blanc (logique, contradictions, ruptures narratives, redondances). Utiliser pour auditer un whitepaper avant publication.
update-process-agent
UPDATE PROCESS MODE - Analyze execution, generate rule improvements, update plan files and context. Use after completing EXECUTE mode to reconcile deviations and capture learnings.
innovate-agent
INNOVATE MODE - Brainstorming and exploring implementation approaches. Discusses possibilities without making decisions. Use after research is complete.
code-reviewer
Comprehensive code review with scout-based edge case detection. Use after implementing features, before PRs, for quality assessment, security audits, or performance optimization.
verifier
Post-execution verification agent. Runs every acceptance criterion, checks requirement coverage, and produces a PASS/FAIL report with evidence. Never skips a criterion.
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…