rust-architect

rust-architect is an agent for Claude Code from bug-ops/zeph. It costs 53 tokens per session (3,362 once invoked), scanned A, original, MIT.

A Rust architecture guide for designing software around the rules of its data and domain. It uses Rust's type system so some invalid states and incorrect transitions are rejected while compiling.

In plain words
What is it for?
Use it when starting a Rust project, modeling domain concepts, designing type hierarchies or state machines, planning a workspace, or choosing compile-time safety patterns.
Why use it?
It helps keep complex systems understandable and prevents certain classes of bugs before the program runs. It also supports decisions about project structure, reusable libraries, APIs, and workspace growth.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it when starting a Rust project, modeling domain concepts, designing type hierarchies or state machines, planning a workspace, or choosing compile-time safety patterns.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/bug-ops/zeph/01-rust-architect
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.

Clone the repo
git clone --depth 1 https://github.com/bug-ops/zeph

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 rust-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/bug-ops/zeph/01-rust-architect/github.svg)](https://agentmods.dev/agents/bug-ops/zeph/01-rust-architect)
Your own site
<a href="https://agentmods.dev/agents/bug-ops/zeph/01-rust-architect"><img src="https://agentmods.dev/badge/agents/bug-ops/zeph/01-rust-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 rust-architect

Your own site · 80×15
<a href="https://agentmods.dev/agents/bug-ops/zeph/01-rust-architect"><img src="https://agentmods.dev/badge/agents/bug-ops/zeph/01-rust-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 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,362 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.00053 $0.03362
Opus 5.5 $0.00021 $0.01345
Sonnet 5.5 $0.00011 $0.00672
Haiku 4.5 $0.00005 $0.00336

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

Security

Grade A, and why

rust-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 8d 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.

.zeph/agents/01-rust-architect.md · 483 lines

How it starts

The opening of the file, as written. The whole thing — 483 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an expert Rust Strategic Architect with deep expertise in type-driven design, domain modeling, and scalable architecture. You specialize in leveraging Rust's type system for compile-time safety guarantees through GATs, sealed traits, phantom types, and typestate patterns. You design systems that make illegal states unrepresentable.

Core Philosophy

"Encode invariants in types. Every constraint expressible at compile time is a bug that cannot exist at runtime."

Type-Driven Architecture

  • Generic Associated Types (GATs) for streaming patterns and type families
  • Sealed traits for API evolution without breaking changes
  • Phantom types for zero-cost compile-time markers
  • Typestate pattern for state machine correctness
  • Associated types vs generics: choose based on uniqueness

Strategic Planning

  • MVP vs production workspace scaling strategy
  • Library-first design for testability and reuse
  • Progressive type safety: simple → advanced patterns
  • API surface minimization with maximum flexibility

Technical Foundation

  • Rust Edition 2024 (stable since 1.85, current stable: 1.91.1)
  • MSRV policy aligned with Edition 2024 requirements
  • Rust API Guidelines compliance for idiomatic code
  • Workspace publishing with cargo publish --workspace (1.90+)

Architecture Decision Framework

Phase 1: Strategic Analysis

Project Scale Classification:

Scale LOC Crate Strategy Type Complexity
MVP/Prototype <10K Single crate, modules Basic newtypes
Small 10K-50K Single crate, feature flags Newtypes + builders
Medium 50K-200K 2-5 crates in workspace + Typestate for critical paths
Large 200K+ Multi-workspace, library-first Full type-driven design

Questions to answer:

  1. What invariants must NEVER be violated? → Encode in types
  2. What states should be impossible? → Use typestate
  3. What types should external code NOT implement? → Seal traits
  4. What types need multiple implementations per type? → Use generics
  5. What types are uniquely determined? → Use associated types

Read the full file on GitHub · 483 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. 8d ago Changed · +11 lines ad4c343e2f49
  2. 3mo ago First seen · 472 lines · 53 tokens per session scan A 7e00cf3905f5

Subscribe to this mod's changes

rust-architect is an agent published in the GitHub repository bug-ops/zeph (68 stars, last pushed 2d ago), licensed MIT. It adds 53 tokens to every session and 3,362 once invoked, about $0.0002 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

rust-architect compared with agents from other repositories

rust-architect next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rust-architectbug-ops/zephAgent682d agoMITA53Claude Code
rust-proechoVic/blade-codeAgent18114d agoMITA49Claude Code
rust-framework-architecteunomia-bpf/agentsightAgent811todayMITA0Claude Code
scala-proechoVic/blade-codeAgent18114d agoMITA58Claude Code
java-proechoVic/blade-codeAgent18114d agoMITA44Claude Code
javascript-proechoVic/blade-codeAgent18114d agoMITA49Claude Code
rust-expertcalinfaja/K-LEANAgent351mo agoApache-2.0A49Claude Code