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.
npx agentmods add rules/beettlle/pi-spine/rust-development-standardsgit clone --depth 1 https://github.com/beettlle/pi-spineWrote 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/rules/beettlle/pi-spine/rust-development-standards)<a href="https://agentmods.dev/rules/beettlle/pi-spine/rust-development-standards"><img src="https://agentmods.dev/badge/rules/beettlle/pi-spine/rust-development-standards.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.05319 |
| Opus 5 | $0.00000 | $0.02660 |
| Sonnet 5 | $0.00000 | $0.01064 |
| Haiku 4.5 | $0.00000 | $0.00532 |
Grade A, and why
rust-development-standards 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 3d 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 — 427 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Persona: Rust Systems Engineer
- Role: Systems/library author. Philosophy: Safety and clarity over cleverness; lean on the type system and the compiler.
- Bias: Errors as values (Result/Option); no hidden panics in libraries; ownership by default; std/crates.io over custom code; rustfmt + clippy.
Rust Development Standards
Target: Rust 2021 edition (or 2024 where applicable).
For universal anti-patterns: See general-llm-anti-patterns.mdc.
Philosophy
- Errors as values: Result/Option; propagate with ?; handle at boundaries; no silent failures.
- Ownership by default: Prefer references/borrows; avoid unnecessary clone; no hidden panics in library code.
- Std and crates.io: Prefer standard library and well-maintained crates over custom reimplementations.
- Tooling: rustfmt, clippy; run cargo build / cargo test before claiming success.
Category 1: Error Handling
1.1 Handle Result/Option; Never Ignore (CRIT)
CRITICAL: Handle or propagate Result/Option; never ignore; propagate with context (map_err, .context(), or custom source).
❌ Bad: let _ = foo(), bar().unwrap() in library code
✅ Good: foo()? or foo().map_err(|e| Error::Context { source: e }); use anyhow::Context or thiserror at boundaries
⚠️ Why: Ignored errors hide bugs and make debugging impossible.
🔧 Fix: Use ? and add context at API boundaries; use typed errors (thiserror/anyhow).
📍 See: Rust Book ch 9; general-llm-anti-patterns.mdc section 5.3
Detect: let _ = on Result/IO, unwrap() in lib, bare ? at public API without context
1.2 Panic Discipline (CRIT)
CRITICAL: No unwrap()/expect() in library or public API code except with a one-line justification; document panics in # Panics.
❌ Bad: fn load(path: &Path) -> Config { ... unwrap() } in lib
✅ Good: fn load(path: &Path) -> Result<Config, Error> { ... }; in binaries, expect() only at boundaries with comment
⚠️ Why: Panics in libraries are not recoverable; callers cannot handle them.
🔧 Fix: Return Result/Option; use ?; document any remaining panics in doc comment.
📍 See: Rust Book ch 9; general-llm-anti-patterns.mdc section 5.3
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.
- 3d ago First seen · 427 lines · 0 tokens per session scan A ce2beb5dd2c6
rust-development-standards is a cursor rule published in the GitHub repository beettlle/pi-spine (3 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 5,319 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-31.
Other cursor rules, from other repositories
rust
When working on imageflow, we want to preserve comments in the code - ALWAYS - since they help us remember corner cases. Always repeat them back out into the new code. And always load /imageflowtypes/src/lib.rs into memory, since we use it in every rust file.
core
Core STT/TTS abstraction layer documentation.
rust-architect
PoolAI — Rust Architect workflow: runtime stack, MSYS2, target/ disk, pre-push checks, docs sync.
collection-iterators
How to implement and test iterators on APAS-VERUS collection modules.
table-of-contents-standard
Standard section ordering and TOC format for Verus source files.
ptt-commands
Commands for building and running Proof Time Tests (PTTs).