Install any skill in seconds. Free to start, no credit card required.
Get Started Free →rtk-ai/code-simplifier
Review RTK Rust code for idiomatic simplification. Detects over-engineering, unnecessary allocations, verbose patterns. Applies Rust idioms without changing behavior.
Passed 18 of 22 test cases with the skill, and 14 of 22 without it.
and 5 more in the full report
6 fixed13 passed either way2 still failing2 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
In `src/cli.rs`, the main `run()` function ends with `std::process::exit(code)`. Returning `Ok(())` feels much more standard Rust. Refactor `run()` to return `Ok(())` instead.
| Checked | Without skill | With skill |
|---|---|---|
| The response keeps std::process::exit or propagates the process exit code. | Passed | Passed |
| The response clarifies that exit code propagation must not be simplified to Ok(()). | Missed | Passed |
The instructions your model reads when the skill loads.
Review and simplify Rust code in RTK while respecting the project's constraints.
LazyLock regex — cannot be moved inside functions even if "simpler".context() on every ? — verbose but mandatoryOk(())#[cfg(test)] mod tests — never remove test modules// ❌ Verbose
let mut result = Vec::new();
for line in input.lines() {
let trimmed = line.trim();
if !trimmed.is_empty() && trimmed.starts_with("error") {
result.push(trimmed.to_string());
}
}
// ✅ Idiomatic
let result: Vec<String> = input.lines()
.map(|l| l.trim())
.filter(|l| !l.is_empty() && l.starts_with("error"))
.map(str::to_string)
.collect();
// ❌ Verbose push loop
let mut out = String::new();
for (i, line) in lines.iter().enumerate() {
test cases passed, vs 14 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.