diagnosing-perf-regressions is a skill from the Summer skill library: a guide your AI agent reads when the task matches, so it builds the good version on the first try. Find why frame rate, frame time or load time got worse since a known-good state.
When your agent uses it
- Frame rate, frame time, or load time has gotten worse since a known-good state — ‘it used to run at 60, now it’s at 30’
- Bisecting recent scene, script, or asset changes to find which one slowed frame time or loading
Install
summer setup installs every skill for your agent. To add only this one:
claude-code for your agent, such as codex or cursor. See Skills for every option.
The skill
Overview
There is a difference between “this game is slow” and “this game got slow.” This skill is for the second one. Core principle: A regression has a cause. The cause is a specific change. Bisect to find the change, then root-cause from there. This skill is not general performance tuning. If the game has always run at 30fps and you want to push it to 60, that istune-performance (the domain skill for budget-driven optimization). This skill is the diagnostic — what broke, where, when.
When To Use
- “It used to run at 60fps, now it’s at 30.”
- “Load time was 3s yesterday, now it’s 15s.”
- “Frame stutters started after I added X.”
- “Build went from buttery to choppy and I don’t know why.”
When NOT To Use
- “The game has always been slow, help me speed it up.” →
tune-performance. - “I want to know if my game is fast enough to ship.” →
tune-performance. - “The game crashes.” →
debug.
The Iron Law
The Loop
1. Measure now
Measure in aRunVerification probe, not by eye. It spawns a hidden, disposable game instance with a real renderer, so Performance.get_monitor(...) returns the game’s actual numbers and the user’s editor session is untouched.
summer_get_diagnostics does not report performance. It returns counts of console errors, debugger errors, debugger warnings and script errors. Use it to confirm the slow run isn’t also throwing, never as a source of FPS or draw-call numbers.
Discard every sample from the first second — TIME_FPS is a per-second average and reads exactly 1.0 until it has a second of history. A leading run of 1.0 in the array is warm-up, not a stall.
Write the bad-state number down. “Scene Level3 runs at 31fps avg, drops to 12fps when 5+ enemies are on screen.”
2. Find the last known-good state
Ask the user: when did it last run well? Then go to the VCS:- Known good: commit X, scene
Level3, 60fps avg. - Known bad: HEAD, scene
Level3, 31fps avg.
3. Bisect the changes
If a single commit is the obvious suspect (e.g. “Added 200 enemies to spawner”), test it first. Otherwise actually
git bisect — check out the midpoint, measure FPS, repeat. Don’t theorize through it; the bisect is fast and definitive.
4. Match to one of the four Summer Engine performance cliffs
Regressions cluster into four categories. Matching the symptom to one shortens diagnosis.
If the bad-state symptom matches one row, you have your hypothesis. Verify by reverting just the change you suspect and re-measuring.
5. A/B with one variable
This is the most violated step. Discipline:- Revert one suspect commit (or stub the suspect feature behind a flag).
- Rebuild / reload the scene.
- Measure FPS the same way you did in step 1.
- Compare to known-bad. Did it recover?
6. Re-measure after the fix
The fix is not done until the same measurement that found the regression returns the good number. Same scene, same play duration, same warm-up. Re-run the identical probe from step 1 — same scene, same sample count, same drive sequence. A number taken a different way is not a comparison. State the result with the number: “Reverted the per-frameget_tree().get_nodes_in_group() call in enemy_manager.gd. Level3 back to 58fps avg.” Not “should be faster now.”
When To Escalate
Red Flags — STOP
Rationalization Prevention
When The Engine Isn’t Running
If the MCP tools report the engine isn’t running:- Get it running.
summer runstarts it and restores the probe route. That is one command, and it is almost always the right answer — do not degrade to interviewing the user because a tool returned “not running” once. - If you have shell access, you can run a probe without the editor at all. The same verify instance is a plain flag on the Summer binary:
<out-dir>/results.json (reports, frames, errors_seen, duration_ms). Locate the binary rather than guessing a path — on macOS it is the executable inside the installed Summer.app bundle. The probe file must extend the probe base; when you invoke the binary directly, write the base alongside it and extends it by path.
3. Only if neither is possible: ask the user for an in-game perf overlay reading (FPS, frame time, draw call count) and walk the bisect with them — “run on commit X, tell me the FPS; run on commit Y, tell me the FPS.”
4. Do not claim a fix is verified from code reading alone.
Related skills
tune-performance— for general optimization once the regression is fixed or when no regression exists.investigating-bugs— when the slow path turns out to be a logic bug (errors in a tight loop).debug— when the perf issue is actually a crash or freeze.verification-before-completion— to claim the fix worked, with numbers.
From a shell
No Summer MCP tools in this session? Run each one as a command; whensummer --version is missing or below 4.0, use npx -y summer-engine@latest in place of summer. Fields are flags in kebab-case (--scene-path res://main.tscn) or one --input '<json>', and summer ops describe <op> prints the exact input. The summer-cli skill has the rest.
Source:
library/skills/diagnosing-perf-regressions/SKILL.md, rendered from summer-engine@4.3.0 on npm.
