Install any skill in seconds. Free to start, no credit card required.
Get Started Free →rohitg00/rust-systems
Rust systems programming patterns including ownership, traits, async runtime, error handling, and unsafe guidelines
Passed 18 of 22 test cases with the skill, and 17 of 22 without it.
2 fixed16 passed either way3 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
I have an async Rust task that updates shared statistics in a state struct wrapped in `Arc<tokio::sync::Mutex<Stats>>`. Inside the task, I lock the mutex, send a network request via `.await`, and then update the stats. Is there any issue with this pattern and how should it be fixed?
| Checked | Without skill | With skill |
|---|---|---|
| The response identifies holding a MutexGuard across an await point as a deadlock risk. | Missed | Passed |
| The lock guard scope is bounded to end before the await call. | Passed | Passed |
The instructions your model reads when the skill loads.
fn process_data(data: &[u8]) -> Vec<u8> {
data.iter().map(|b| b.wrapping_add(1)).collect()
}
fn modify_in_place(data: &mut Vec<u8>) {
data.retain(|b| *b != 0);
data.sort_unstable();
}
fn take_ownership(data: Vec<u8>) -> Vec<u8> {
let mut result = data;
result.push(0xFF);
result
}
fn main() {
let data = vec![1, 2, 3, 0, 4];
let processed = process_data(&data); // borrow: data still usable
let mut owned = take_ownership(data); // move: data no longer usable
modify_in_place(&mut owned); // mutable borrow
}
Prefer borrowing (&T, &mut T) over ownership transfer. Use Clone only when necessary.
use thiserror::Error;
#[derive(Error, Debug)]
pub enum AppError {
#[error("database error: {0}")]
Database(#[from] sqlx::Error),
test cases passed, vs 17 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.