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/briangmilnes/apas-verus/lib-rs-structuregit clone --depth 1 https://github.com/briangmilnes/APAS-VERUSWrote 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/briangmilnes/apas-verus/lib-rs-structure)<a href="https://agentmods.dev/rules/briangmilnes/apas-verus/lib-rs-structure"><img src="https://agentmods.dev/badge/rules/briangmilnes/apas-verus/lib-rs-structure.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.00811 | $0.00811 |
| Opus 5 | $0.00405 | $0.00405 |
| Sonnet 5 | $0.00162 | $0.00162 |
| Haiku 4.5 | $0.00081 | $0.00081 |
Grade A, and why
lib-rs-structure 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 5d 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 — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.
lib.rs Structure
Rust Toolchain
The project pins Rust 1.93.0 via rust-toolchain.toml. No nightly features are used
by project code.
The one exception: #![cfg_attr(verus_keep_ghost, feature(allocator_api))] is required
because Verus's nightly Rust exposes Arc<T, A> and our assume_specification for
Arc::clone in vstdplus/smart_ptrs.rs must match that exact signature. If vstd adds
an Arc::clone spec upstream, remove this line and delete our local spec.
Do not add any other #![feature(...)] or #![cfg_attr(..., feature(...))] to lib.rs.
No verus_keep_ghost
There must be no use of verus_keep_ghost in lib.rs for module gating, split pub mod
blocks, or #[cfg(not(verus_keep_ghost))] duplicate code. The sole permitted use is the
allocator_api feature gate documented in the Rust Toolchain section above.
See no-cfg-not-verus-keep-ghost.mdc for the full antipattern list.
Every chapter gets one unconditional pub mod ChapNN block containing all its files.
If a chapter doesn't verify under Verus, that is the project state (PBOGH), not something
to hide behind conditional compilation.
Commenting out files that don't compile under Verus
Files that use external crates Verus can't link (rand, bitvec, ordered_float, etc.)
or have other Verus-incompatible constructs should be commented out in lib.rs with
a reason, not hidden behind verus_keep_ghost gates:
pub mod Chap39 {
// pub mod BSTTreapStEph; // uses rand (Verus can't link)
// pub mod BSTTreapMtEph; // uses rand (Verus can't link)
}
This keeps the files visible and grep-able. When #[verifier::expect_failure] becomes
available in Verus, these can be uncommented and marked as expected failures, making it
easy to check whether a Verus update fixes them.
Allowed cfg gates
Only these cfg attributes are permitted in lib.rs:
| Gate | Purpose |
|---|---|
#[cfg(not(feature = "experiments_only"))] |
Skip chapters when verifying only experiments |
#[cfg(not(any(feature = "experiments_only", feature = "dev_only")))] |
Skip chapters in dev-only mode |
#[cfg(feature = "all_chapters")] |
Optional slow/WIP files within a chapter |
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.
- 5d ago First seen · 91 lines · 811 tokens per session scan A ba4bc076043a
lib-rs-structure is a cursor rule published in the GitHub repository briangmilnes/APAS-VERUS (10 stars, last pushed 1mo ago), licensed MIT. It adds 811 tokens to every session, about $0.0041 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-08-31.
Other cursor rules, from other repositories
core
Core STT/TTS abstraction layer documentation.
rust-module-refactor
Use when splitting Rust modules, moving tests, tightening visibility, or preserving facades during refactors.
rust-architect
PoolAI — Rust Architect workflow: runtime stack, MSYS2, target/ disk, pre-push checks, docs sync.
rust-development-standards
Rust development standards: idioms, style, anti-patterns (Rust 2021 edition, 2024 where applicable).
cube-engine
Use when changing Rust puzzle state, moves, notation, scrambles, or validation.
ivolgaql-project
Общие принципы ИволгаQL (MVP, Rust, русский UX, TCP).