Codepit The toolbox

Let Claude measure and speed up your code

Connects Claude to CodSpeed's hosted server, so it can read your benchmark runs, compare two runs and look inside flamegraphs. Two skills set up benchmarks and run a measure, change, re-measure loop.

Scan checks all of CodSpeedHQ/codspeed on your computer, before anything installs.

Codepit runs on your computer. Open this page there to scan it before installing.

A plug going into a small server

How it works

Measure

Run the benchmarks through the CodSpeed CLI and save the run as a baseline.

Find the hot spot

Read the flamegraph and rank functions by their own time.

Change and compare

Make one change, re-run, compare with the baseline, and confirm the gain in walltime mode. Changes that don't help are reverted.

What Claude gets

  • compare_runsCompare two runs: improvements, regressions, and new or missing benchmarks.
  • query_flamegraphSee where time is spent, and zoom into a function or thread.
  • list_runsFind runs, filtered by branch or event type.
  • get_runLook up a single run.
  • list_repositoriesFind a repository's slug.

Before you start

  • A CodSpeed account, with the CLI signed in: codspeed auth login.
  • The CodSpeed CLI. It officially supports Ubuntu 22.04, 24.04, 26.04 and Debian 12.

Try saying

>Make the parse function faster

If there are no benchmarks yet, Claude sets them up first. Then it measures through CodSpeed, works one change at a time, and stops to report the before and after numbers when a change gains more than 5% with no regressions.

Worth knowing

The MCP server is hosted by CodSpeed at mcp.codspeed.io, and benchmark results are uploaded to your CodSpeed account.

The optimize skill changes your code in a loop and runs your tests after each change. It asks before going on once it finds a clear gain.

Comes with two skills

The plugin adds these on top of the tools.

  • codspeed-setup-harness
  • codspeed-optimize
Read the author's README README.md