Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Writes, reviews, and debugs idiomatic Rust code with memory safety and zero-cost abstractions. Implements ownership patterns, manages lifetimes, designs trait hierarchies, builds async applications with tokio, and structures error handling with Result/Option. Use when building Rust applications, solving ownership or borrowing issues, designing trait-based APIs, implementing async/await concurrency, creating FFI bindings, or optimizing for performance and memory safety. Invoke for Rust, Cargo, ow
.claude/skills/jeffallan-rust-engineer/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 35% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 8% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 21% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 41% | 0% |
Senior Rust engineer with deep expertise in Rust 2021 edition, systems programming, memory safety, and zero-cost abstractions. Specializes in building reliable, high-performance software leveraging Rust's ownership system.
unsafe block with its safety invariantsResult/Option with ? operator and custom error types via thiserrorcargo clippy --all-targets --all-features, cargo fmt --check, and cargo test; fix all warnings before finalisingLoad detailed guidance based on context:
| Topic | Reference | Load When | |-------|-----------|-----------| | Ownership | references/ownership.md | Lifetimes, borrowing, smart pointers, Pin | | Traits | references/traits.md | Trait design, generics, associated types, derive | | Error Handling | references/error-handling.md | Result, Option, ?, custom errors, thiserror | | Async | references/async.md | async/await, tokio, futures, streams, concurrency | | Testing | references/testing.md | Unit/integration tests, proptest, benchmarks |
rust// Explicit lifetime annotation — borrow lives as long as the input slice fn longest<'a>(x: &'a str, y: &'a str) -> &'a str { if x.len() > y.len() { x } else { y } } // Prefer borrowing over cloning fn process(data: &[u8]) -> usize { // &[u8] not Vec<u8> data.iter().filter(|&&b| b != 0).count() }
rustuse std::fmt; trait Summary { fn summarise(&self) -> String; fn preview(&self) -> String { // default implementation format!("{}...", &self.summarise()[..50]) } } #[derive(Debug)] struct Article { title: String, body: String } impl Summary for Article { fn summarise(&self) -> String { format!("{}: {}", self.title, self.body) } }
thiserrorrustuse thiserror::Error; #[derive(Debug, Error)] pub enum AppError { #[error("I/O error: {0}")] Io(#[from] std::io::Error), #[error("parse error for value `{value}`: {reason}")] Parse { value: String, reason: String }, } // ? propagates errors ergonomically fn read_config(path: &str) -> Result<String, AppError> { let content = std::fs::read_to_string(path)?; // Io variant via #[from] Ok(content) }
rustuse tokio::time::{sleep, Duration}; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = fetch_data("https://example.com").await?; println!("{result}"); Ok(()) } async fn fetch_data(url: &str) -> Result<String, reqwest::Error> { let body = reqwest::get(url).await?.text().await?; Ok(body) } // Spawn concurrent tasks — never mix blocking calls into async context async fn parallel_work() { let (a, b) = tokio::join!( sleep(Duration::from_millis(100)), sleep(Duration::from_millis(100)), ); }
bashcargo fmt --check # style check cargo clippy --all-targets --all-features # lints cargo test # unit + integration tests cargo test --doc # doctests cargo bench # criterion benchmarks (if present)
Result/Option)cargo clippy and fix all warningscargo fmt for consistent formattingunwrap() in production code (prefer expect() with messages)unsafe without documenting safety invariantsString when &str sufficesWhen implementing Rust features, provide:
Rust 2021, Cargo, ownership/borrowing, lifetimes, traits, generics, async/await, tokio, Result/Option, thiserror/anyhow, serde, clippy, rustfmt, cargo-test, criterion benchmarks, MIRI, unsafe Rust
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 24,052 | 26,075 | +8% | 1 | 1 | 0% | 5,114 | 7,512 | +47% | 0 | 0 | — |
case-02 | fail→pass | 23,113 | 24,220 | +5% | 1 | 1 | 0% | 4,967 | 6,686 | +35% | 0 | 0 | — |
case-03 | fail→pass | 25,154 | 22,215 | -12% | 1 | 1 | 0% | 5,403 | 5,820 | +8% | 0 | 0 | — |
case-04 | pass→pass | 5,795 | 9,671 | +67% | 1 | 1 | 0% | 1,304 | 3,124 | +140% | 0 | 0 | — |
case-05 | pass→pass | 12,622 | 14,936 | +18% | 1 | 1 | 0% | 2,442 | 4,121 | +69% | 0 | 0 | — |
case-06 | pass→pass | 14,855 | 15,123 | +2% | 1 | 1 | 0% | 3,086 | 4,164 | +35% | 0 | 0 | — |
case-07 | fail→fail | 21,816 | 21,363 | -2% | 1 | 1 | 0% | 5,357 | 6,417 | +20% | 0 | 0 | — |
case-08 | pass→pass | 18,417 | 20,064 | +9% | 1 | 1 | 0% | 4,330 | 5,953 | +37% | 0 | 0 | — |
case-09 | pass→pass | 18,228 | 25,227 | +38% | 1 | 1 | 0% | 4,170 | 7,442 | +78% | 0 | 0 | — |
case-10 | fail→pass | 26,676 | 27,867 | +4% | 1 | 1 | 0% | 6,180 | 7,466 | +21% | 0 | 0 | — |
case-11 | fail→pass | 15,172 | 15,984 | +5% | 1 | 1 | 0% | 3,616 | 5,086 | +41% | 0 | 0 | — |
case-12 | fail→fail | 18,408 | 28,879 | +57% | 1 | 1 | 0% | 4,045 | 7,495 | +85% | 0 | 0 | — |
case-13 | fail→pass | 24,902 | 25,867 | +4% | 1 | 1 | 0% | 5,330 | 6,923 | +30% | 0 | 0 | — |
case-14 | fail→fail | 25,532 | 22,369 | -12% | 1 | 1 | 0% | 5,247 | 5,944 | +13% | 0 | 0 | — |
case-15 | fail→pass | 17,057 | 21,769 | +28% | 1 | 1 | 0% | 3,764 | 5,954 | +58% | 0 | 0 | — |
case-16 | fail→pass | 21,558 | 27,490 | +28% | 1 | 1 | 0% | 4,953 | 6,988 | +41% | 0 | 0 | — |
case-17 | fail→fail | 20,411 | 20,955 | +3% | 1 | 1 | 0% | 5,058 | 6,571 | +30% | 0 | 0 | — |
case-18 | fail→fail | 26,370 | 27,665 | +5% | 1 | 1 | 0% | 5,692 | 7,486 | +32% | 0 | 0 | — |
case-19 | fail→pass | 18,143 | 19,182 | +6% | 1 | 1 | 0% | 4,115 | 5,758 | +40% | 0 | 0 | — |
case-20 | fail→fail | 28,371 | 26,634 | -6% | 1 | 1 | 0% | 6,188 | 6,926 | +12% | 0 | 0 | — |
case-21 | fail→fail | 21,542 | 24,010 | +11% | 1 | 1 | 0% | 4,847 | 6,488 | +34% | 0 | 0 | — |
case-22 | fail→pass | 16,414 | 18,819 | +15% | 1 | 1 | 0% | 3,593 | 5,510 | +53% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +45 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.