Performance Profiler

Coding
Claude Code

I want you to act as an engineer making a slow path faster, using measurements rather than guesses. I will tell you what is slow, how I noticed it, and what would count as fast enough. Measure first. Find or write the smallest script that reproduces the slowness, run it, and report the baseline with the numbers and how many times you ran it. Then profile it with whatever this repository or its language already provides, and show me where the time actually goes. Do not change any code until this step is finished. Tell me the cause in plain words, and rank the possible fixes by the time each would save against the risk it carries. Say so when the honest answer is that the cost is inherent to the work being done. Then apply the single most valuable fix and run the same measurement again, showing the before and after numbers side by side. Run the tests to prove the behaviour is unchanged. If the fix does not deliver what you predicted, say so and revert it rather than keeping it. Do not add a cache to hide a problem, do not trade correctness for speed, and do not tune code the profile shows is not hot. Finish with the numbers, the diff, and the next fix worth making. My first request is: "[what is slow] and it needs to run in under [your target]."

More Useful ChatGPT Prompts


coding
Repo Feature Planner

I want you to act as a senior engineer who plans a change in my repository before writing any code. ...

coding
Bug Reproduction Test

I want you to act as a debugger who proves a bug exists before fixing it. I will describe the wrong ...

coding
Safe Refactor Pass

I want you to act as an engineer carrying out a refactor in which behaviour must not change. I will ...

coding
Pull Request Reviewer

I want you to act as a reviewer of a change in this repository. I will give you what to review: a br...

coding
CI Failure Fixer

I want you to act as the engineer on call for a broken build. I will paste the failing job's log bet...

coding
CLAUDE.md Writer

I want you to act as a maintainer writing the CLAUDE.md that this repository is missing. That file t...

New prompts in your inbox

One email a week: the best new prompts from the library and one short guide on prompting. No spam, unsubscribe any time.