webgpu-threejs-tsl

webgpu-threejs-tsl is a skill for Claude Code from ao92265/claude-code-playbook. It costs 78 tokens per session (804 once invoked), scanned A, a copy of webgpu-threejs-tsl, MIT.

A guide for building Three.js graphics that run through WebGPU, a modern browser interface for using the computer's graphics processor. It explains TSL, a JavaScript-based way to describe visual effects, materials, and GPU calculations.

In plain words
What is it for?
Use it when creating WebGPU renderers, node-based materials, compute effects such as particles, post-processing, custom WGSL code, or graphics-device recovery.
Why use it?
It gives developers a reference for the setup and concepts needed when ordinary Three.js examples do not cover WebGPU or TSL work.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the playbook plugin — 48 skills, 4 hooks shipped together

Good fit Use it when creating WebGPU renderers, node-based materials, compute effects such as particles, post-processing, custom WGSL code, or graphics-device recovery.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ao92265/claude-code-playbook/webgpu-threejs-tsl
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ao92265/claude-code-playbook --skill webgpu-threejs-tsl
Clone the repo
git clone --depth 1 https://github.com/ao92265/claude-code-playbook

Made for: Claude Code.

Or install playbook, the plugin that ships this one along with the rest of its 48 skills, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for webgpu-threejs-tsl

README.md
[![agentmods](https://agentmods.dev/badge/skills/ao92265/claude-code-playbook/webgpu-threejs-tsl.svg)](https://agentmods.dev/skills/ao92265/claude-code-playbook/webgpu-threejs-tsl)
Your own site
<a href="https://agentmods.dev/skills/ao92265/claude-code-playbook/webgpu-threejs-tsl"><img src="https://agentmods.dev/badge/skills/ao92265/claude-code-playbook/webgpu-threejs-tsl.svg" alt="Measured on agentmods" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 804 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.00804
Opus 5 $0.00039 $0.00402
Sonnet 5 $0.00016 $0.00161
Haiku 4.5 $0.00008 $0.00080

Measured 7d ago against content hash 734ac9724c9d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

webgpu-threejs-tsl scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 7 executable files (examples/basic-setup.js, examples/custom-material.js, examples/earth-shader.js, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to webgpu-threejs-tsl — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/webgpu-threejs-tsl/SKILL.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WebGPU Three.js with TSL

TSL (Three.js Shading Language) is a node-based shader abstraction that lets you write GPU shaders in JavaScript instead of GLSL/WGSL strings.

Quick Start

import * as THREE from 'three/webgpu';
import { color, time, oscSine } from 'three/tsl';

const renderer = new THREE.WebGPURenderer();
await renderer.init();

const material = new THREE.MeshStandardNodeMaterial();
material.colorNode = color(0xff0000).mul(oscSine(time));

Skill Contents

Documentation

  • docs/core-concepts.md - Types, operators, uniforms, control flow
  • docs/materials.md - Node materials and all properties
  • docs/compute-shaders.md - GPU compute with instanced arrays
  • docs/post-processing.md - Built-in and custom effects
  • docs/wgsl-integration.md - Custom WGSL functions
  • docs/device-loss.md - Handling GPU device loss and recovery
  • docs/limits-and-features.md - WebGPU device limits and optional features

Examples

  • examples/basic-setup.js - Minimal WebGPU project
  • examples/custom-material.js - Custom shader material
  • examples/particle-system.js - GPU compute particles
  • examples/post-processing.js - Effect pipeline
  • examples/earth-shader.js - Complete Earth with atmosphere

Templates

  • templates/webgpu-project.js - Starter project template
  • templates/compute-shader.js - Compute shader template

Reference

  • REFERENCE.md - Quick reference cheatsheet

Key Concepts

Import Pattern

// Always use the WebGPU entry point
import * as THREE from 'three/webgpu';
import { /* TSL functions */ } from 'three/tsl';

Node Materials

Replace standard material properties with TSL nodes:

material.colorNode = texture(map);        // instead of material.map
material.roughnessNode = float(0.5);      // instead of material.roughness
material.positionNode = displaced;         // vertex displacement

Method Chaining

TSL uses method chaining for operations:

// Instead of: sin(time * 2.0 + offset) * 0.5 + 0.5
time.mul(2.0).add(offset).sin().mul(0.5).add(0.5)

Read the full file on GitHub · 94 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 94 lines · 78 tokens per session scan A 734ac9724c9d

Subscribe to this mod's changes

webgpu-threejs-tsl is a skill published in the GitHub repository ao92265/claude-code-playbook (10 stars, last pushed 20d ago), licensed MIT. It adds 78 tokens to every session and 804 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to webgpu-threejs-tsl, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

worker-visualizer

A real-time data/particle/simulation visualizer whose heavy compute runs in a Web Worker (off the main thread), optionally sharing memory with the UI via SharedArrayBuffer, and renders to a canvas at 60fps. Produced as a single self-contained index.html. Use when the brief asks for a "web worker", "simulation"…

nexu-io/open-design · 123 tokens

react-three-fiber

React Three Fiber 3D renderer for json-render. Use when working with @json-render/react-three-fiber, building 3D scenes from JSON specs, rendering meshes/lights/models/environments, or integrating Three.js with json-render catalogs.

vercel-labs/json-render · 54 tokens

matterjs

Use when implementing 2D physics interactions with Matter.js, including Engine/World setup, Render/Runner configuration, adding bodies and constraints, and scroll/interaction-friendly canvas scenes.

MengTo/Skills · 39 tokens

vgpu

Build, debug, test, and optimize WebGPU projects using vgpu, its CLI, or @vgpu packages. Use for vgpu API questions, WGSL workflows, browser or Node rendering, integrations, testing, and performance work.

vercel-labs/vgpu · 51 tokens

threejs-game-director

Entrypoint for building, upgrading, and finishing Three.js browser games. Routes work across the sibling threejs- skills for gameplay, graphics, UI, 3D/image/audio asset generation, debugging, and release. Use for build-a-game, upgrade, polish, premium, AAA, high-fidelity, showcase, from-scratch, endless runner…

majidmanzarpour/threejs-game-skills · 86 tokens

build-game-map-editor

Build, extend, or audit production-linked browser map editors for Three.js and isometric games. Use when Codex needs to create a private director view, derive a versioned editor document from authored placements, add outliner, layer, selection, drag, snap, inspector, or camera controls, expose enemy aggro, leash, or…

MengTo/Skills · 111 tokens