Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add majidmanzarpour/threejs-game-skills --skill threejs-debug-profiler -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/threejs-debug-profiler/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/threejs-debug-profiler/

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

Similar skills

Everything for Game dev and 3D: Unity, Unreal, Godot, Blender →

From the same set9

threejs-3d-generator Generates 3D assets for Three.js games through the Tripo API: text or image to model, with texturing, rigging and animation, saved as GLB or FBX. CX Codex +1 3,500installs threejs-game-ui-designer Skill for designing game UIs in Three.js: HUDs, menus, pause and win screens, responsive layout for mobile and desktop. Prevents overlaps, ensures readability, and keeps UI cohesive with game style. CX Codex +1 3,300installs threejs-gameplay-systems Scaffolds and tunes playable Three.js browser games with Vite and TypeScript. Helps design core loops, handle input, camera motion, and Rapier physics. CX Codex +1 3,300installs threejs-aaa-graphics-builder A skill for upgrading Three.js games from rough prototypes to production visuals: builds materials, lighting, VFX, shaders, and evaluates scenes against a scorecard. CX Codex +1 3,200installs threejs-qa-release Checks Three.js browser games before release, covering gameplay, responsive views, builds and visual evidence. Use it after gameplay changes or before publishing. CX Codex +1 3,000installs threejs-game-director A director skill for Three.js browser games: it runs the work from a playable loop to graphics, UI and browser checks by handing phases to sibling skills. CX Codex +1 3,100installs threejs-audio-generator A skill that turns ElevenLabs into game audio for Three.js: effects, loops, music and voice lines, written straight into the project. CX Codex +1 2,900installs threejs-image-generator Generates and edits 2D game assets for Three.js using Google's Gemini image API. Prepares textures, UI art, and reference images for image-to-3D pipelines. CX Codex +1 2,900installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor