src/maverick/skills/maverick_rust_performance/SKILL.md
Rust performance optimization and zero-cost abstractions
npx skillsauth add get2knowio/maverick maverick-rust-performanceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
// BAD
fn process(s: String) -> String {
let s_copy = s.clone(); // Unnecessary!
s_copy.to_uppercase()
}
// GOOD
fn process(s: String) -> String {
s.to_uppercase()
}
// OR borrow if you don't need ownership
fn process(s: &str) -> String {
s.to_uppercase()
}
// BAD - many reallocations
let mut vec = Vec::new();
for i in 0..1000 {
vec.push(i);
}
// GOOD - single allocation
let vec: Vec<_> = (0..1000).collect();
// OR with_capacity
let mut vec = Vec::with_capacity(1000);
Iterators are as fast as loops due to inlining and optimization.
development
Rust unsafe code, FFI, and safety invariants
development
Rust testing patterns (unit, integration, property-based)
development
Rust ownership, borrowing, and lifetimes
development
Rust error handling with Result, Error trait, anyhow, thiserror