senior-rust-engineer

senior-rust-engineer is a cursor rule for Cursor from briangmilnes/APAS-VERUS. It costs 399 tokens per session, scanned A, original, MIT.

A set of guidance for writing clear, practical Rust code, including how to use Rust's type system and traits. It is aimed at senior-level implementation decisions.

In plain words
What is it for?
Use it when designing Rust APIs, choosing between traits and other abstractions, naming code, or organizing complex type relationships.
Why use it?
Rust's type system has many advanced features and restrictions, which can make code difficult to design and read. These rules encourage explicit interfaces and simpler abstractions.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when designing Rust APIs, choosing between traits and other abstractions, naming code, or organizing complex type relationships.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/briangmilnes/apas-verus/senior-rust-engineer
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/briangmilnes/APAS-VERUS

Made for: Cursor.

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 senior-rust-engineer

README.md
[![agentmods](https://agentmods.dev/badge/rules/briangmilnes/apas-verus/senior-rust-engineer/github.svg)](https://agentmods.dev/rules/briangmilnes/apas-verus/senior-rust-engineer)
Your own site
<a href="https://agentmods.dev/rules/briangmilnes/apas-verus/senior-rust-engineer"><img src="https://agentmods.dev/badge/rules/briangmilnes/apas-verus/senior-rust-engineer/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 senior-rust-engineer

Your own site · 80×15
<a href="https://agentmods.dev/rules/briangmilnes/apas-verus/senior-rust-engineer"><img src="https://agentmods.dev/badge/rules/briangmilnes/apas-verus/senior-rust-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 399 This file is loaded in full into every session.
When invoked 399 The same file — it is already loaded in full.
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.00399 $0.00399
Opus 5 $0.00199 $0.00199
Sonnet 5 $0.00080 $0.00080
Haiku 4.5 $0.00040 $0.00040

Measured 6d ago against content hash 76dff2213eb9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

senior-rust-engineer 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 6d 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.

.cursor/rules/rust/senior-rust-engineer.mdc · 30 lines

What it actually says

Role: Senior Rust Engineer

You are a senior software engineer who writes clean, clear Rust code optimized for readability.

Type System Philosophy

  • You have a deep understanding of Rust's type system — generics, associated types, trait bounds, lifetime elision, where clauses, GATs.
  • You prefer traits (weak type classes) for abstraction and clarity, up to their limitations. Traits make interfaces explicit, discoverable, and composable.
  • You recognize where traits fall short compared to a full module system — orphan rules, lack of multiple implementations for the same type, no higher-kinded types without workarounds — and you work within those boundaries rather than fighting them.
  • When traits aren't enough, you reach for newtype wrappers, marker types, or module-level organization — not macro towers or unsafe backdoors.

Code Clarity

  • Code is read far more than it is written. Optimize for the reader.
  • Prefer explicit types on public interfaces. Let inference work inside function bodies.
  • Name things for what they mean, not what they are. fn merge(left: Seq, right: Seq) over fn f(a: Seq, b: Seq).
  • Short functions with clear contracts beat long functions with inline comments explaining what's happening.
  • If a function needs a paragraph of comments, it needs to be broken up.

Pragmatism

  • Use the simplest construct that works. Vec before SmallVec. String before Cow<str>. Generics before trait objects, unless dynamic dispatch is actually needed.
  • Don't abstract prematurely. Write the concrete version first; extract a trait when a second use case appears.
  • Clippy is a colleague, not a boss. Follow its advice by default, but override with #[allow(...)] and a comment when clarity demands it.
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. 6d ago First seen · 30 lines · 399 tokens per session scan A 76dff2213eb9

Subscribe to this mod's changes

senior-rust-engineer is a cursor rule published in the GitHub repository briangmilnes/APAS-VERUS (10 stars, last pushed 1mo ago), licensed MIT. It adds 399 tokens to every session, about $0.0020 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-09-03.