perf-doctor
Skill4 starsChanged 8 months agoMITView on GitHub
Use when a Three.js page, scene, or component has FPS drops, frame spikes, compile stutter, thermal issues, or other runtime performance problems that need diagnosis and measurement.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- redai-infra/Relaxtheir own version, first seen Oct 8, 2026
- whaojie797-design/Novera-AI-skillstheir own version, first seen Jul 25, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- redai-infra/Relax★ 675same name
- whaojie797-design/Novera-AI-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- repo-reviewSkill
- material-labSkill
- replicatorSkill
- shader-portSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. About 0 are common, 17 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 50
Do not require the user to know the rendering stack up front.
- Distinctive: line 54
Start the diagnosis if the user can provide only these fields:
- Distinctive: line 65
If the user already has them, these signals improve accuracy:
- Distinctive: line 72
Treat these as accelerators, not requirements.
- Distinctive: line 76
When runtime information is missing, use this order:
- Distinctive: line 80
ask the user only for the smallest missing measurement that would change the diagnosis
- Very specific: line 84
search for WebGLRenderer, WebGPURenderer, @react-three/fiber, Canvas, EffectComposer, postprocessing, @react-three/postprocessing, …
- Distinctive: line 91
Only ask for extra data when the missing evidence would materially change the recommendation.
- Distinctive: line 93
Prefer small requests such as:
- Distinctive: line 100
Do not ask the user to classify the route if the repository or runtime can answer it more reliably.
- Distinctive: line 104
Default to a progressive intake style:
- Distinctive: line 109
ask for one targeted missing capture only if needed
- Distinctive: line 111
Do not block the diagnosis just because the user did not provide runtime details.
- Very specific: line 115
Use the section order from assets/report-template.md for every final diagnosis.
- Distinctive: line 117
When the evidence is incomplete:
- Distinctive: line 119
do not delete sections
- Very specific: line 121
keep Final Call short and honest
- Very specific: line 126
Use the references under references/ as the compact diagnosis framework:
- Very specific: line 142
Use the report-centric fixtures under fixtures/ as canonical examples for maintainers and contributors:
- Distinctive: line 151
Keep evaluations explicit and evidence-backed.
- Very specific: line 153
Do not prescribe EffectComposer, ShaderMaterial, RawShaderMaterial, or onBeforeCompile() fixes for WebGPURenderer paths.
- Distinctive: line 155
Prefer simple, incremental adjustments over full rewrites and prefer engine-native levers over custom shader rewrites.
- Very specific: line 156
Prefer a measured before and after row in the final report when any change was tested.
- Distinctive: line 157
Document any remaining unknowns that would block a confident recommendation.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Three.js Performance Doctor
Use this skill when the user needs a focused performance diagnosis rather than a full reference remake. The intent is to analyze draw calls, shader cost, memory use, GPU/CPU balance, and compatibility targets; document the dominant bottlenecks; and propose observable optimizations or graceful degradation tiers.
This is not a generic web-performance skill. It is route-aware for the current Three.js ecosystem, so the diagnosis must first identify the actual runtime surface:
- renderer path:
WebGLRendererorWebGPURenderer - actual backend when known: native
WebGPUorWebGL2fallback - framework layer: vanilla Three.js or
@react-three/fiber - post stack:
EffectComposer,postprocessing/@react-three/postprocessing, orRenderPipeline - scene traits that often dominate Three.js cost: shadows, transparent materials, offscreen passes, instancing or batching, raycasting, streaming uploads, and React churn
Workflow
- Intake – gather the runtime context (renderer path, framework layer, post stack, device class, canvas size or DPR, fidelity targets) and the symptom summary (low FPS, spikes, compile stutter, interaction hitching, thermal issues).
- Route The Stack – name which advice surface is valid before suggesting fixes. Separate WebGL-only guidance from WebGPU-only guidance, and separate renderer cost from React cost if
@react-three/fiberis involved. - Instrumentation – identify the measurable outputs (
renderer.info, frame-time split, pass-local timings, upload or allocation events, raycast or event cost, coarse memory pressure) and the key scenes or passes that trigger cost. - Diagnosis – classify the dominant bottleneck using Three.js-native categories such as draw-call or scene-graph saturation, shadow cost, transparency or overdraw, post chain cost, raycasting, upload thrash, material or program churn, or main-thread or React churn.
- Plan – propose explicit engine-native levers first: instancing or batching, LOD, shadow update policy, post downsampling, transparency strategy, texture or shader prewarm, raycast pruning, render-target reuse, or framework-aware fallbacks.
- Report – summarize findings with prioritized action items, instruments used, unknowns that still block confidence, and a degradation ladder that describes when to drop quality or switch runtime behavior.
Required Outputs
- Final report using the fixed template at
assets/report-template.md - Runtime route table listing renderer path, framework layer, post stack, target device class, and which classes of advice are valid
- Bottleneck table with observations, evidence, and severity (GPU, CPU, memory, etc.)
- Performance contract listing device class, target frame budget, and acceptable quality tiers
- Degradation ladder describing at least two fallback levels with precise tradeoffs
- Suggested instrumentation checklist (timers, stats, profilers) used to gather the evidence
- Explicit unknowns plus the next capture to run when evidence is still weak
- Optional optimization notes retaining look invariants if the user requested fidelity guidance
User Input Contract / Discovery Policy
Do not require the user to know the rendering stack up front. Treat runtime-route discovery as part of the skill, not as a user prerequisite.
Minimum User Input
Start the diagnosis if the user can provide only these fields:
- page, route, scene, or component that shows the issue
- symptom description
- repro steps
- approximate target device class
This minimum is enough to begin a useful investigation.
Preferred Input
If the user already has them, these signals improve accuracy:
- renderer path or framework hints such as
WebGLRenderer,WebGPURenderer, or@react-three/fiber - post stack hints such as
EffectComposer,postprocessing,@react-three/postprocessing, orRenderPipeline - known measurements such as
renderer.info, frame times, flame charts, or pass timings - visual constraints such as "do not blur", "keep shadows", or "must stay mobile-safe"
Treat these as accelerators, not requirements.
Discovery Policy
When runtime information is missing, use this order:
- infer from the repository or code
- infer from the running page or browser tooling
- ask the user only for the smallest missing measurement that would change the diagnosis
Typical local discovery actions:
- search for
WebGLRenderer,WebGPURenderer,@react-three/fiber,Canvas,EffectComposer,postprocessing,@react-three/postprocessing,RenderPipeline, andthree/webgpu - inspect
package.jsonand the scene entry point - inspect renderer initialization, post-processing setup, and quality toggles
- log
renderer.constructor.name,renderer.info, DPR, and relevant pass settings if the app can be run locally
Asking For More Data
Only ask for extra data when the missing evidence would materially change the recommendation.
Prefer small requests such as:
- one
renderer.infosnapshot - one browser performance capture
- one pass timing capture
- one repro video or exact toggle sequence
Do not ask the user to classify the route if the repository or runtime can answer it more reliably.
Interaction Rule
Default to a progressive intake style:
- accept the smallest useful problem statement
- discover the runtime route yourself
- measure before recommending fixes
- ask for one targeted missing capture only if needed
Do not block the diagnosis just because the user did not provide runtime details.
Reporting Contract
Use the section order from assets/report-template.md for every final diagnosis. Keep the headings stable even when some cells are marked unknown, not measured, or not applicable.
When the evidence is incomplete:
- do not delete sections
- mark the uncertain cells explicitly
- keep
Final Callshort and honest - state the next capture that would raise confidence
Reference Pack
Use the references under references/ as the compact diagnosis framework:
references/README.mdfor the default investigation orderreferences/ecosystem-routes.mdto map the issue onto the current Three.js runtime surfacereferences/instrumentation.mdto choose measurements before tuningreferences/route-discovery-snippet.mdfor the smallest repo-first route discovery workflowreferences/renderer-info-capture.mdfor a low-frictionrenderer.infocapture recipereferences/pass-timing-capture.mdfor coarse stage and per-pass timing capturesreferences/r3f-triage-notes.mdwhen@react-three/fiberinteraction or commit churn is suspectedreferences/bottlenecks.mdto classify the dominant hotspotreferences/diagnosis-sequence.mdto keep the investigation evidence-firstreferences/device-targets.mdto set an explicit performance contractreferences/degradation-ladders.mdto design fallback tiers without losing the core look
Fixture Pack
Use the report-centric fixtures under fixtures/ as canonical examples for maintainers and contributors:
fixtures/README.mdfor the current diagnosis-case indexfixtures/draw-call-saturation/README.mdfor a canonical scene-graph and draw-call saturation diagnosisfixtures/post-chain-cost/README.mdfor a canonical fullscreen-pass-chain diagnosisfixtures/react-churn-r3f/README.mdfor a canonical@react-three/fiberinteraction diagnosis with a validpartially-diagnosedoutcome
Constraints
- Keep evaluations explicit and evidence-backed; avoid speculative tuning without measurable data.
- Name whether each recommendation is
WebGL,WebGPU,R3F, or wrapper-specific when that distinction matters. - Do not prescribe
EffectComposer,ShaderMaterial,RawShaderMaterial, oronBeforeCompile()fixes forWebGPURendererpaths. - Distinguish scene-render cost from React scheduling, mount churn, or event churn when
@react-three/fiberis in the stack. - Prefer simple, incremental adjustments over full rewrites and prefer engine-native levers over custom shader rewrites.
- Prefer a measured
beforeandafterrow in the final report when any change was tested. - Document any remaining unknowns that would block a confident recommendation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

