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/madebyaris/rakitui-ai/rust-developmentgit clone --depth 1 https://github.com/madebyaris/rakitui-aiWhat 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.03716 |
| Opus 5 | $0.00000 | $0.01858 |
| Sonnet 5 | $0.00000 | $0.00743 |
| Haiku 4.5 | $0.00000 | $0.00372 |
Grade A, and why
rust-development 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.
How it starts
The opening of the file, as written. The whole thing — 688 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust Development Patterns
Idiomatic Rust patterns focusing on ownership, safety, and performance.
CRITICAL: Agentic-First Rust Development
Pre-Development Verification (MANDATORY)
Before writing ANY Rust code:
1. CHECK RUST INSTALLATION
→ run_terminal_cmd("rustc --version")
→ run_terminal_cmd("cargo --version")
2. VERIFY CURRENT VERSIONS (use web_search)
→ web_search("Rust stable version December 2024")
→ web_search("Rust edition 2024 features")
3. CHECK EXISTING PROJECT
→ Does Cargo.toml exist? Read it first!
→ What Rust edition is specified?
→ What dependencies are already present?
4. FOR NEW PROJECTS - USE cargo new
→ NEVER manually create Cargo.toml from scratch
→ run_terminal_cmd("cargo new my_project")
→ run_terminal_cmd("cargo new --lib my_library")
CLI-First Rust Development
ALWAYS use Cargo CLI:
# Project creation (NEVER manually create Cargo.toml)
cargo new my_project
cargo new --lib my_library
cargo init # In existing directory
# Add dependencies (NEVER manually edit Cargo.toml for deps)
cargo add tokio --features full
cargo add serde --features derive
cargo add thiserror
cargo add anyhow
# Development dependencies
cargo add --dev tokio-test
cargo add --dev mockall
# Build and verify
cargo build
cargo check # Faster than build, just checks
cargo clippy # Linting
cargo fmt # Format code
# Test
cargo test
cargo test -- --nocapture # See println output
Post-Edit Verification
After ANY Rust code changes, ALWAYS run:
# Check compilation
cargo check
# Lint for issues
cargo clippy -- -D warnings
# Run tests
cargo test
# Format code
cargo fmt --check
Common Rust Syntax Traps (Avoid These!)
// WRONG: Using unwrap in production code
let value = some_option.unwrap(); // Panics on None!
let data = result.unwrap(); // Panics on Err!
// CORRECT: Handle errors properly
let value = some_option.ok_or(MyError::NotFound)?;
let data = result.map_err(|e| MyError::from(e))?;
// WRONG: Borrowing across await points
async fn bad_example(data: &mut Data) {
let reference = &data.field;
async_operation().await; // reference held across await!
use_reference(reference);
}
// CORRECT: Clone or restructure
async fn good_example(data: &mut Data) {
let value = data.field.clone();
async_operation().await;
use_value(value);
}
// WRONG: Missing Send bound for async traits
trait MyAsyncTrait {
async fn do_work(&self); // Won't compile in multi-threaded!
}
// CORRECT: Add Send bound when needed
trait MyAsyncTrait: Send + Sync {
fn do_work(&self) -> impl Future<Output = ()> + Send;
}
// WRONG: String vs &str confusion
fn greet(name: String) { } // Takes ownership unnecessarily
greet("hello".to_string()); // Wasteful allocation
// CORRECT: Accept borrowed when possible
fn greet(name: &str) { } // Borrows, no allocation needed
greet("hello"); // Works directly with string literal
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.
- 2d ago First seen · 688 lines · 0 tokens per session scan A ec06f1b5df5a
rust-development is a cursor rule published in the GitHub repository madebyaris/rakitui-ai (5 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,716 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
AIRules
NexusLink MCP four-step workflow and prohibitions (copy to project .cursor/rules/ and fill the project-specific section).
002-verify-before-act
Requires Claude to read before writing, verify before installing, and confirm before destructive operations.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.