Optimize Rust libraries with criterion benchmarks, feature-flag matrices, cargo bench workflows, dependency gating, regression baselines, and evidence-driven API performance tradeoffs.
SkillScore100Maintained
Automatic
◆Coding pack
Last verified 8/16/2026
What it changes
Passed 22 of 22 test cases with the skill, and 21 of 22 without it.
Without skill95%
With skill100%
Checks it passed that the model alone missed
Recommends comparing candidate and main branch benchmarks using the same benchmark harness
1 fixed21 passed either way0 still failing0 broke
Pass-rate lift
+5 pp
Tokens
-22%
Agent turns
0%
Response time
-33%
Model gemini-3.6-flashMeasured 8/16/2026v122 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
A test case the skill fixed. Same model, same prompt, with and without the skill.
Prompt
A contributor submits a PR replacing a hash map with a B-tree in our Rust library, claiming it is faster. What steps should maintainers require before merging?
What was checked, without and with the skill
Checked
Without skill
With skill
Recommends comparing candidate and main branch benchmarks using the same benchmark harness
Missed
Passed
case-17 · gemini-3.6-flash · 8/16/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md28 lines2 files
Rust Library Performance Features
Use this skill when a Rust library needs performance work that can be measured
and shipped behind clear Cargo feature boundaries.
Core Workflow
Define the library operation and input sizes that matter to downstream users.
Add or repair benchmarks before optimizing.
Compare baseline and candidate implementations with the same harness.
Use Cargo features for optional capabilities and dependencies.
Test the feature matrix, including default features disabled.
Document performance claims with scope and measurement commands.
Guidance is transformed and paraphrased from Herbert Wolverson,
Advanced Hands-On Rust, especially Chapters 2 and 3 on creating, testing,
optimizing, benchmarking, and feature-gating a library. Examples are original
skeletons.