Skip to content AI News: Nano Banana 2.1 is out: better edits and text, half the API price per image →
PH-0861 · Code prompt

Performance Profiler

A Claude Code prompt that measures before it optimises: a baseline, a profile, one fix, and the before and after numbers side by side.

What you get

Measures before it optimises: a baseline, a profile, one fix, and the before and after numbers side by side.

What you need
  • 2 blanks to fill in: what is slow target
Best inClaude CodeAlso works in any coding agent
237 words
Prompt · September 19, 2026
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]."
Coding Claude Code

How to use it

  1. Fill the blanks under «Make it yours» — the prompt updates as you type.
  2. Copy the prompt and paste it into Claude Code.
  3. Not quite right? Reply with what to change — the model keeps the rest.

More Claude Code prompts

PH-0894Coding

Repo Feature Planner

Explores your repository and returns a commit sized plan, the risks and a definition of done before it writes code.

You fill in describe the feature you want…

Claude Code
PH-0708Coding

Bug Reproduction Test

Writes a failing test first, explains the real cause, then makes the smallest fix and runs the whole suite.

You fill in describe the bug, how to…

Claude Code
PH-0908Coding

Safe Refactor Pass

Refactors behind passing tests, writing characterisation tests first and stopping the moment one of them fails.

You fill in file or modulethe reason

Claude Code
PH-0882Coding

Pull Request Reviewer

Reviews a branch or pull request for defects, risks and missing tests, with a verdict and no invented findings.

You fill in branch name, pull request…

Claude Code
PH-0719Coding

CI Failure Fixer

Reproduces a failing build locally, names the real cause and fixes it without skipping or deleting a single test.

You fill in paste the failing log herebranch name

Claude Code
PH-0725Coding

CLAUDE.md Writer

Reads your repository and writes its CLAUDE.md: verified commands, the layout and the conventions the code follows.

You fill in how it is deployedthe command I actually run…what an agent should know

Claude Code
Weekly

New prompts in your inbox

One email a week: the best new prompts and one short guide. Unsubscribe any time. Privacy policy