threejs-debug-profiler — Claude Code skill: setup and usage
Tracks down blank canvases and runtime render bugs in Three.js browser games. Measures draw calls, shaders, and memory bottlenecks without breaking playability.
npx skills add majidmanzarpour/threejs-game-skills --skill threejs-debug-profiler -a claude-codeWhat threejs-debug-profiler does
This skill enforces a disciplined workflow for 3D browser games. Instead of guessing, the agent reproduces the issue under the exact URL and command, then inspects console and network logs. It checks specific modules: renderer, camera, loop, physics, assets, and input. For non-obvious issues, it relies on the triage order in references/debug-playbook.md and the __THREE_GAME_DIAGNOSTICS__ shape.
Performance profiling runs strictly against a production preview. Development builds carry overhead that skews draw calls and shader costs, so unminified test numbers are misleading. The process isolates a single baseline scenario, classifies the bottleneck, applies one fix at a time, and confirms that visual fidelity holds.
The final report summarizes the root cause, modified files, before-and-after measurements, and any remaining risks.
What it helps with
- identify the cause of blank canvas errors
- fix canvas display size and drawing buffer mismatches
- isolate draw call spikes and heavy textures
- resolve mobile input and touch handling failures
Example prompts for the agent
- Trace why the Three.js canvas remains blank using console errors and
__THREE_GAME_DIAGNOSTICS__ - Profile draw calls and triangles on the production preview of this scene
- Fix the canvas resize logic when display size drifts from drawing buffer
How to install threejs-debug-profiler
1Skills CLI (Vercel)
npx skills add majidmanzarpour/threejs-game-skills --skill threejs-debug-profiler -a claude-code2Manually: put the files in place
~/.claude/skills/threejs-debug-profiler/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/threejs-debug-profiler/
1Skills CLI (Vercel)
npx skills add majidmanzarpour/threejs-game-skills --skill threejs-debug-profiler -a codex2Manually: put the files in place
.agents/skills/threejs-debug-profiler/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add majidmanzarpour/threejs-game-skills --skill threejs-debug-profiler -a cursor2Manually: put the files in place
.cursor/skills/threejs-debug-profiler/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install majidmanzarpour/threejs-game-skills threejs-debug-profiler2Manually: put the files in place
.github/skills/threejs-debug-profiler/SKILL.md1Skills CLI (Vercel)
npx skills add majidmanzarpour/threejs-game-skills --skill threejs-debug-profiler -a gemini-cli2Platform CLI
gemini skills install https://github.com/majidmanzarpour/threejs-game-skills --path skills/threejs-debug-profilerManually: put the files in place
.devin/skills/threejs-debug-profiler/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add majidmanzarpour/threejs-game-skills --skill threejs-debug-profiler -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about threejs-debug-profiler
How to install threejs-debug-profiler in Claude Code?
Run npx skills add majidmanzarpour/threejs-game-skills --skill threejs-debug-profiler -a claude-code. Claude Code saves the skill instructions under ~/.claude/skills/threejs-debug-profiler/SKILL.md.
What does threejs-debug-profiler do?
It guides your agent through fixing blank canvases, audio glitches, and loop errors in Three.js games. It also establishes a baseline for draw calls, memory, shaders, and bundle size.
Why does the skill require profiling on a production preview?
Development servers run unminified code with debugging hooks that distort frame times and draw calls. Testing the production preview gives accurate numbers before applying optimizations.
Source text
SKILL.md · MIT
--- name: threejs-debug-profiler description: "Debug and profile Three.js browser games: blank canvases, render and runtime bugs, asset and audio loading, animation, resize, mobile input, plus performance profiling of draw calls, triangles, textures, memory, shader and post-processing cost, and bundle size." --- # Three.js Debug Profiler Find root causes and optimize measured bottlenecks without breaking playability. Follow the changed behavior's scope. Reuse the lead's existing reproduction and evidence; verify the affected path after a fix. A passing focused check only needs broader testing when shared behavior changed or an unresolved risk warrants it. Return measurements and defects to the lead for the consolidated verification pass. ## Reference `references/debug-playbook.md` — ordered triage for blank canvas, asset and audio loading, loop/animation/physics, input and mobile, the profiling sequence, and the `__THREE_GAME_DIAGNOSTICS__` shape. Read it when debugging or profiling anything non-obvious. ## Debug Reproduce first, with the same command and URL the user had, and read the console, page, and network errors. Find the module that owns the failure (renderer, loop, camera, scene, assets, audio, input, physics, UI, or base path), fix the root cause there, and retest the exact broken path. The playbook's triage order covers the common causes, such as more than one active loop, a canvas whose display size doesn't match its drawing buffer, and wrong delta units. ## Profile Profile the production preview when user-facing performance matters. Baseline one fixed scenario, classify the bottleneck (CPU, GPU draw, fragment, vertex, memory, or network), change one thing, and re-measure the same scenario, confirming visuals and playability held. The playbook lists the metrics to baseline and the optimizations in order of payoff. ## Report Lead with the root cause or the measured bottleneck. Then files changed, baseline and post metrics, commands, screenshots, the broken path retested, and residual risks.
© majidmanzarpour · MIT · majidmanzarpour/threejs-game-skills