rust-performance — Rust profiling skill for Claude Code
Teaches an agent a measured workflow for Rust performance work. Use it when code runs slow, memory grows, or the binary ships too large.
no license 1 installs ★ 224 updated 2026-10-29
npx skills add NeverSight/learn-skills.dev --skill rust-performance -a claude-codeWhat rust-performance does
The skill pushes the agent to work from evidence. It writes down the contract first: workload, inputs, hardware, toolchain, build profile, success metrics. Then it builds a reproducible baseline, profiles the hot spot, and changes one thing at a time.
Tooling spans Criterion and Divan for microbenchmarks, samply and cargo-flamegraph for CPU profiles, DHAT for allocation analysis. Separate reference files cover regression gates, CPU and latency profiling, memory, binary size, and compile time.
Optimizing debug builds or synthetic inputs is off-limits unless they match the real problem. The skill also refuses unsafe, custom allocators, SIMD, and lock-free structures until plain fixes run out. Profiles and heap dumps may contain sensitive data, so storage and upload policy needs a check before sharing.
What it helps with
- find where Rust code burns CPU time
- spot retained allocations with DHAT
- shrink a binary using cargo-bloat
- set a regression gate on a benchmark
- separate p50 from p95/p99 latency
Example prompts for the agent
- Profile the slow endpoint in
src/api/handlers.rs, build a baseline, and find the dominant cost - Run the Criterion benchmark before and after replacing clone with borrow, report variance and p95
- Break down the binary with cargo-bloat and tell me which features drive most of the size
How to install rust-performance
1Skills CLI (Vercel)
npx skills add NeverSight/learn-skills.dev --skill rust-performance -a claude-code2Manually: put the files in place
~/.claude/skills/rust-performance/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/rust-performance/
1Skills CLI (Vercel)
npx skills add NeverSight/learn-skills.dev --skill rust-performance -a codex2Manually: put the files in place
.agents/skills/rust-performance/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add NeverSight/learn-skills.dev --skill rust-performance -a cursor2Manually: put the files in place
.cursor/skills/rust-performance/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install NeverSight/learn-skills.dev data/skills-md/full-stack-skills/rust-skills/rust-performance2Manually: put the files in place
.github/skills/rust-performance/SKILL.md1Skills CLI (Vercel)
npx skills add NeverSight/learn-skills.dev --skill rust-performance -a gemini-cli2Platform CLI
gemini skills install https://github.com/NeverSight/learn-skills.dev --path data/skills-md/full-stack-skills/rust-skills/rust-performanceManually: put the files in place
.devin/skills/rust-performance/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add NeverSight/learn-skills.dev --skill rust-performance -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about rust-performance
How do I install rust-performance in Claude Code?
Run npx skills add NeverSight/learn-skills.dev --skill rust-performance -a claude-code. The skill lands at ~/.claude/skills/rust-performance/SKILL.md.
What does rust-performance do?
It gives an agent a step-by-step process for Rust optimization: define the metric, reproduce the workload, profile, change one cause, and prove the improvement. References cover Criterion, samply, cargo-flamegraph, DHAT, cargo-bloat, and cargo-llvm-lines.
When should I use this over ad-hoc profiling commands?
The skill decides which tool fits the question. A microbenchmark won't prove end-to-end latency, so it routes to load tests, and it keeps baselines stable before enforcing small regressions.