threejs-materials · cesartevisual — Claude Code skill for Three.js materials
The threejs-materials Claude Code skill configures Three.js PBR materials, textures, transparency, and color handling. It activates when a scene needs a surface setup or a material-related color fix.
MIT 668 installs ★ 26 updated 2026-09-10
npx skills add cesartevisual/threejs-skills --skill threejs-materials -a claude-codeWhat threejs-materials does
The skill helps choose a material for the requested surface and set up its texture maps, lighting, and color behavior. It follows the project's installed Three.js version and structure. Color maps use the appropriate color space, while normal and roughness maps stay in data space.
For transparent surfaces, it examines sorting, depth writes, face orientation, and shadows. Blended transparency can produce artifacts where surfaces intersect, and renderOrder does not resolve every case. The guidance also covers when a material feature change requires material.needsUpdate, how to clone only the material being edited, and how to dispose of owned materials and textures separately.
What it helps with
- choose a material for a target surface and lighting setup
- set the correct color space for texture maps
- diagnose artifacts on intersecting transparent surfaces
- decide when a material change requires
material.needsUpdate
Example prompts for the agent
- Set up a PBR material for a metal surface in Three.js.
- Fix the roughness texture mapping and check its color-space handling.
- Diagnose transparency artifacts where two objects intersect.
How to install threejs-materials
1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-materials -a claude-code2Manually: put the files in place
~/.claude/skills/threejs-materials/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/threejs-materials/
1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-materials -a codex2Manually: put the files in place
.agents/skills/threejs-materials/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-materials -a cursor2Manually: put the files in place
.cursor/skills/threejs-materials/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install cesartevisual/threejs-skills skills/threejs-materials2Manually: put the files in place
.github/skills/threejs-materials/SKILL.md1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-materials -a gemini-cli2Platform CLI
gemini skills install https://github.com/cesartevisual/threejs-skills --path skills/threejs-materialsManually: put the files in place
.devin/skills/threejs-materials/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-materials -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-materials
How do I install threejs-materials in Claude Code?
Run npx skills add cesartevisual/threejs-skills --skill threejs-materials -a claude-code. The skill file is located at ~/.claude/skills/threejs-materials/SKILL.md.
What does threejs-materials do?
It guides Three.js material setup, including PBR lighting, texture maps, transparency, and color management, while taking the project's installed version and structure into account.
Why can renderOrder fail to fix transparent surfaces?
Blended transparency has sorting limits, so intersecting surfaces can still show artifacts. The skill also considers depth writing, face orientation, and shadow behavior.
Source text
SKILL.md · MIT
--- name: threejs-materials description: "Implement Three.js PBR materials, texture mapping, transparency, and color-management fixes." --- # Materials and Textures Use the project's installed versions and existing architecture. These instructions supplement the user's task; they do not authorize unrelated changes or external actions. Identify whether the material needs unlit color, PBR lighting, or a specialized physical effect. Start with the least costly material that achieves the requested surface. Physical transmission, clearcoat, and other layers can increase rendering cost. Classify textures by meaning. Color textures such as base color and emissive use the appropriate color space; normal, roughness, metallic, AO, and other data maps remain non-color data. Preserve loader-assigned glTF settings unless evidence shows they are wrong. Match UV channels, wrapping, orientation, and sampler requirements to the installed revision. Reason in linear light and apply display conversion once. Trace renderer output, tone mapping, and postprocessing together before changing exposure to hide incorrect color configuration. Check a neutral material and reference lighting when matching product color. Choose opacity treatment deliberately: opaque, cutout/alpha test, hashed coverage where supported, or blended transparency. Blended transparency has sorting limitations; renderOrder cannot solve every intersecting-surface artifact. Evaluate depthWrite, face orientation, and shadow behavior on representative overlaps. Changing a uniform-like value usually differs from changing a shader-defining feature; set material.needsUpdate when required by that feature. Clone only the material that needs independent edits and keep shared textures shared. Dispose owned materials and textures separately. Verify under neutral and final lighting, at oblique viewing angles, with overlapping transparent surfaces, and at the intended mobile texture resolution. ## API reference Consult the [official documentation](https://threejs.org/docs/pages/Material.html) for exact signatures and revision-specific behavior. If documentation access is unavailable, inspect installed types/source and state any remaining uncertainty.
© cesartevisual · MIT · cesartevisual/threejs-skills
Similar skills
All skills for Game dev and 3D: Unity, Unreal, Godot, Blender →threejs-materials by other authors comes first.