.claude/skills/bench-compare/SKILL.md
Use when measuring optimization impact against a baseline, when validating that a code change didn't regress performance, or when comparing two implementation approaches. Criterion benchmark baseline comparison workflow.
npx skillsauth add ahrav/gossip-rs bench-compareInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Compare benchmark results against a baseline to measure optimization impact.
Invoke with optional benchmark filter:
/bench-compare - Run all benchmarks/bench-compare scan - Run only scan-related benchmarks/bench-compare throughput - Run throughput benchmarksBefore making changes, save current benchmark results:
cargo bench --bench <name> -- --save-baseline before
Or for all benchmarks:
cargo bench -- --save-baseline before
Make the optimization changes to the codebase.
Run benchmarks against the saved baseline:
cargo bench --bench <name> -- --baseline before
Look for these patterns in Criterion output:
Performance has improved - Optimization successfulPerformance has regressed - Changes hurt performanceNo change in performance - Within noise thresholdProvide a summary table:
| Benchmark | Before | After | Change | |-----------|--------|-------|--------| | name | X ns | Y ns | -Z% |
Benchmarks are distributed across crates in crates/*/benches/:
gossip-contracts: identity.rs — Identity type construction and derivationgossip-coordination: coordination.rs — Shard coordination operationsgossip-coordination: sim.rs — Simulation harness benchmarksgossip-stdx: byte_slab.rs — Byte slab pool allocationgossip-stdx: inline_vec.rs — InlineVec operationsgossip-stdx: ring_buffer.rs — RingBuffer throughput-p <crate> --bench <name> to run specific benchmarks: cargo bench -p gossip-stdx --bench inline_veccargo bench --workspacedevelopment
Deep first-principles code explanation that builds real understanding through phased walkthroughs with diagrams. Covers algorithms, data structures, memory layout, concurrency patterns, and performance tricks — especially for systems code in Rust. Use whenever the user asks to explain, walk through, break down, deep dive into, or understand code. Trigger on "how does this work", "what's happening here", "teach me about this", "why is it done this way", or when the user references a file with @ and wants to understand it. Proactively use when examining code involving lock-free algorithms, atomics/CAS, memory ordering,
development
Use when creating implementation-ready beads tasks that need testing strategy, optimal implementation approach, and documentation requirements baked in — composes /create-task with parallel enrichment agents that analyze the codebase and produce concrete test specifications, algorithm/data-structure guidance, and doc quality standards so implementing agents don't need to re-research
development
--- name: autoresearch description: Autonomous Goal-directed Iteration. Apply Karpathy's autoresearch principles to ANY task. Loops autonomously — modify, verify, keep/discard, repeat. Supports bounded iteration via Iterations: N inline config. version: 1.9.11 --- # Claude Autoresearch — Autonomous Goal-directed Iteration Inspired by [Karpathy's autoresearch](https://github.com/karpathy/autoresearch). Applies constraint-driven autonomous iteration to ANY work — not just ML research. **Core id
development
Use when implementing a new feature and assessing coverage gaps, during periodic test hygiene, when test suites feel bloated, or before merging code that changes coordination or hot paths. Two-phase assess-then-improve testing pipeline.