Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add NeverSight/learn-skills.dev --skill rust-performance -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/rust-performance/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/rust-performance/

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.

Similar skills

All skills for Programming languages →

From the same set6

Project sponsors

Companies that keep this analytics open