system-architect

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

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/system-architect
Clone the repo
git clone --depth 1 https://github.com/rtk-ai/rtk

Made for: Claude Code.

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,628 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.00000 $0.01628
Opus 5 $0.00000 $0.00814
Sonnet 5 $0.00000 $0.00326
Haiku 4.5 $0.00000 $0.00163

Measured 2d ago against content hash f718aae3da8a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

.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.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. 2d 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 (78,131 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,628 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.