skillfed

codspeed-optimize

This skill acts as an autonomous performance engineer, using CodSpeed benchmarks and flamegraph analysis to iteratively optimize code. It measures baseline performance, identifies bottlenecks through flame graphs, applies targeted changes, and validates improvements across simulation and walltime modes. The skill handles the full optimization loop—from establishing baselines to comparing runs and reporting gains—stopping only when significant improvements plateau or the user decides to halt.

codspeed-optimize autonomously improves code performance by iterating through CodSpeed benchmarks and flamegraph analysis.

AI-generated summary based on this skill's SKILL.md

235 26 Apache-2.0 updated by CodSpeedHQ

Install

CodSpeedHQ/codspeed/codspeed-optimize · repository language: Rust

CLI (skillfed)coming soon
git clone https://github.com/CodSpeedHQ/codspeed
cp -r codspeed/skills/codspeed-optimize ~/.claude/skills/codspeed-optimize

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How does codspeed-optimize make my code faster using benchmarks?

codspeed-optimize acts as an autonomous performance engineer, using CodSpeed benchmarks and flamegraph analysis to iteratively optimize your code. It measures baseline performance, identifies bottlenecks through flame graphs, applies targeted changes, and validates improvements across simulation and walltime modes. The skill handles the full optimization loop—from establishing baselines to comparing runs and reporting gains—stopping only when significant improvements plateau or the user decides to halt.

Can codspeed-optimize find performance bottlenecks in my code?

Yes. codspeed-optimize identifies and eliminates performance bottlenecks through iterative measurement and targeted changes. It analyzes where time is spent in your code using flamegraph analysis, pinpoints hot spots causing slowdowns, and then applies focused optimizations to remove those constraints. Each change is validated with benchmarks to confirm the improvement.

What does codspeed-optimize do to reduce CPU usage and latency?

codspeed-optimize reduces CPU usage, memory allocations, and latency in existing code by autonomously optimizing for faster execution. It uses CodSpeed benchmarks to measure the impact of each optimization, applies iterative changes targeting the identified bottlenecks, and validates that CPU cycles, memory pressure, and response times all improve before moving to the next optimization pass.

How does codspeed-optimize analyze where time is spent in code?

codspeed-optimize analyzes where time is spent in code through flamegraph analysis, which visualizes the call stack and shows which functions consume the most CPU time. It then validates improvements with walltime benchmarks to confirm that the optimizations actually reduce execution time in real-world conditions, not just in simulation.

Can codspeed-optimize compare performance before and after changes?

Yes. codspeed-optimize compares performance before and after optimization changes by establishing a baseline measurement, applying targeted optimizations, and then re-measuring to quantify the gains. This iterative comparison cycle continues until significant improvements plateau or you decide to stop the optimization process.

What is autonomous code optimization in codspeed-optimize?

codspeed-optimize's autonomous optimization means it runs the full performance engineering workflow without manual intervention: measure baseline, analyze flamegraphs, identify bottlenecks, apply fixes, validate with benchmarks, and repeat. You set the goal, and codspeed-optimize iteratively improves throughput and memory usage until improvements diminish or you halt the process.

SKILL.md

rendered from the published skill — quoted content, verbatim

Optimize

You are an autonomous performance engineer. Your job is to iteratively optimize code using CodSpeed benchmarks and flamegraph analysis. You work in a loop: measure, analyze, change, re-measure, compare — and you keep going until there's nothing left to gain or the user tells you to stop.

All measurements must go through CodSpeed. Always use the CodSpeed CLI (codspeed run, codspeed exec) to run benchmarks — never run benchmarks directly (e.g., cargo bench, pytest-benchmark, go test -bench) outside of CodSpeed. The CodSpeed CLI and MCP tools are your single source of truth for

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 1 file
skills/codspeed-optimize/SKILL.md

Related skills

Tags

performance-tuning bottleneck-detection benchmarking-framework cpu-optimization memory-profiling code-acceleration latency-reduction throughput-improvement flamegraph-analysis iterative-refinement