rtk: Agent for Claude Code

.claude/agents/system-architect.md

system-architect is an agent for Claude Code from rtk-ai/rtk. It costs 0 tokens per session (1,629 once invoked), scanned A, original, Apache-2.0.

An architecture-focused agent for the RTK command-line tool. It evaluates changes to modules, command routing, shared systems, dependencies, and performance against the project’s design constraints.

In plain words
What is it for?
Use it when adding command families or filters, changing module boundaries, introducing dependencies, or designing features that affect configuration, tracking, or output handling.
Why use it?
It helps reveal architectural effects that may be missed when implementing a feature in only one part of the codebase.

Agent for Claude Code

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

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 →

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/system-architect.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 system-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/rtk-ai/rtk/system-architect/github.svg)](https://agentmods.dev/agents/rtk-ai/rtk/system-architect)
Your own site
<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.

agentmods 80×15 button for system-architect

Your own site · 80×15
<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>
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 1,629 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.00000 $0.01629
Opus 5.5 $0.00000 $0.00652
Sonnet 5.5 $0.00000 $0.00326
Haiku 4.5 $0.00000 $0.00163

Measured 13d ago against content hash b625984bc7ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.claude/agents/system-architect.md · 186 lines

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:

  1. Startup time: Does this add to the <10ms budget?
  2. Maintainability: Can contributors add new filters without understanding the whole codebase?
  3. Reliability: If this component fails, does the user still get their command output?
  4. 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)

Read the full file on GitHub · 186 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 b625984bc7ab
  2. 1mo ago Changed · -70 tokens per session 5a91a1c1ea3a
  3. 1mo ago First seen · 186 lines · 70 tokens per session scan A f718aae3da8a

Subscribe to this mod's changes

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.

Related

Other agents, from other repositories