Agent skill

Tsl

by pmndrs in pmndrs/glyph

Implement, migrate, review, debug, or verify Three.js Shading Language (TSL) materials, node graphs, WebGPU compute work, and post-processing.

MITAuto-check passedGame Development

Install Tsl

skills CLI
$ npx skills add pmndrs/glyph --skill tsl -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pmndrs/glyph tsl --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pmndrs/glyph.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/tsl .claude/skills/tsl && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tsl
GitHub stars
393
Token cost
~1.5k tokens
SKILL.md length
641 words
Files
9
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Implement, migrate, review, debug, or verify Three.js Shading Language (TSL) materials, node graphs, WebGPU compute work, and post-processing.

  • Works in 4 steps: Read the nearest package.json, renderer… → Record the installed three and… → Preserve the existing renderer and… → …
  • Storage buffers
  • SKILL.md covers Ground the task, Keep the two execution times…, Core patterns and Implementation workflow, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Tsl is an agent skill from pmndrs/glyph. Implement, migrate, review, debug, or verify Three.js Shading Language (TSL) materials, node graphs, WebGPU compute work, and post-processing. Use for three/tsl, three/webgpu, NodeMaterial, WebGPURenderer, storage buffers, shader-node typing, or GLSL-to-TSL work; verify every API against the repository's installed Three.js version.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files (for example `agents/openai.yaml`, `compute.md` and `migration.md`).

It sits in Game Development, covering 3D graphics and WebGL and Shaders. It works with Three.js and TypeScript. The repository describes itself as: ♠️ A typography engine for web graphics. The licence is MIT.

When your agent uses it

  • Storage buffers
  • Shader-node typing
  • GLSL-to-TSL work
  • Verify every API against the repositorys installed Three.js version

Example prompts

  • “/tsl”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Read the nearest package.json, renderer setup, material or pass being changed, TypeScript configuration, and relevant tests.
  2. Record the installed three and @types/three versions. Inspect their exports, declarations, and shipped examples before inventing an…
  3. Preserve the existing renderer and public boundaries unless the request explicitly includes a migration. TSL is the right tool for a…
  4. Identify the execution surface before coding

What it can do on your machine

Read from SKILL.md and the folder at commit 51a1f34. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Tsl loads about 1.5k tokens when it runs. Until then it costs about 85 tokens; SKILL.md has 641 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~85
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pmndrs/glyph at commit 51a1f34, republished under its MIT licence (© pmndrs). 641 words, ~1,490 tokens.

Download SKILL.mdSave it as .claude/skills/tsl/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
tsl
description
Implement, migrate, review, debug, or verify Three.js Shading Language (TSL) materials, node graphs, WebGPU compute work, and post-processing. Use for `three/tsl`, `three/webgpu`, NodeMaterial, WebGPURenderer, storage buffers, shader-node typing, or GLSL-to-TSL work; verify every API against the repository's installed Three.js version.
license
MIT

Three.js Shading Language

Build version-matched TSL code and prove it through the repository's real renderer. Treat remembered APIs and this skill's examples as hypotheses until the installed Three.js package confirms them.

Ground the task

  1. Read the nearest package.json, renderer setup, material or pass being changed, TypeScript configuration, and relevant tests.
  2. Record the installed three and @types/three versions. Inspect their exports, declarations, and shipped examples before inventing an import, cast, or workaround.
  3. Preserve the existing renderer and public boundaries unless the request explicitly includes a migration. TSL is the right tool for a TSL/WebGPU task; it is not a reason to rewrite unrelated working GLSL or WebGL code.
  4. Identify the execution surface before coding:
SurfaceStart with
Material property or vertex deformationnodes.md
Storage buffer or compute dispatchcompute.md
Fullscreen pass, MRT, depth, or neighboring samplespostprocessing.md
Existing GLSL or ShaderMaterial migrationmigration.md
Type errors or source-path importstypescript.md
Browser/GPU evidenceverification.md

Read only the references needed for the selected surface.

Keep the two execution times explicit

TSL JavaScript builds a node graph; the generated shader runs later on the GPU.

ts
if (material.transparent) return transparentGraph; // graph-build decision

If(value.greaterThan(0.5), () => {
  result.assign(1);
}); // GPU decision

Use ordinary JavaScript only for graph structure known while building. Use TSL nodes for per-vertex, per-fragment, or per-invocation behavior.

Core patterns

ts
import * as THREE from 'three/webgpu';
import type { Node } from 'three/webgpu';
import { vec3 } from 'three/tsl';

const material = new THREE.MeshStandardNodeMaterial();
const colorNode: Node<'vec3'> = vec3(0.2, 0.5, 1);

material.colorNode = colorNode;

await renderer.init();

Keep these invariants visible in local code:

  • Build typed node graphs with three/tsl; use three/webgpu for WebGPU renderer and classes.
  • Invoke an Fn when a node value is required: Fn(() => expression)().
  • Use TSL operations rather than JavaScript operators. Typed free functions such as add(left, right) and mul(left, right) often make overload selection and review clearer; the repository's patched NodeExtras lookup also keeps equivalent method-chain typing tractable.
  • Call .toVar() before mutation, then use .assign() or compound assignment methods.
  • Update runtime uniforms through .value; changing graph structure requires rebuilding the graph.
  • Use If, Loop, and other TSL control nodes for runtime GPU control flow.
  • Await renderer.init() before the first WebGPU render or compute dispatch.
Show full SKILL.md (324 more words)Show less

Implementation workflow

  1. Start compiler-sensitive TSL work with the focused type regression, then expand to the relevant package or application project using the repository-pinned TypeScript compiler.
  2. An import-only fixture, a typed constant attachment, and one representative node operation can help localize a future declaration regression before a complete graph obscures it.
  3. Express the smallest graph that preserves the existing behavior.
  4. Prefer shipped TSL helpers and add-on nodes over custom render passes.
  5. Keep node types intact. Do not cast to a broad Node or unknown merely to silence the compiler.
  6. If declarations disagree with runtime source, isolate the narrowest compatibility adapter and link it to the exact installed-version evidence.
  7. Dispose render targets, textures, buffers, passes, and materials according to their owner. Restore renderer state around custom passes.
  8. When behavior or cost depends on compiler lowering, emit the final WGSL and fallback GLSL as strings and review their structure. Use verification.md to distinguish the graph you authored from the program the GPU received.
  9. Validate correctness before collecting timings. Use fixed inputs and semantic or visual output evidence, not frame delays.

Completion gate

Do not call TSL work complete until:

  • project typechecking and linting pass without unexplained suppressions;
  • a real browser initializes the actual renderer and executes the changed graph;
  • the test asserts the selected backend instead of treating a fallback as WebGPU or WebGL2 evidence;
  • shader compilation, browser console, and WebGPU validation errors fail the test;
  • claims about branches, loops, duplicated work, or specialization are checked against the emitted shader program rather than inferred only from TSL source;
  • deterministic values or captured pixels prove the intended result;
  • compute and render ordering is causal rather than coordinated by sleeps or arbitrary frame counts;
  • a hardware-GPU claim comes from the repository's explicit local GPU lane, not merely a headless browser.

Maintenance provenance

Adapted from thejustinwalsh/three-flatland skills/tsl at commit 2935a89fcd9999e8a8b3d3b733f7f7302285cd60. The repository's pinned Three.js source and declarations remain the operational authority.

© pmndrs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files in .agents/skills/tsl of pmndrs/glyph.

  • SKILL.md
  • LICENSE
  • agents/openai.yaml
  • compute.md
  • migration.md
  • nodes.md
  • postprocessing.md
  • typescript.md
  • verification.md

Open the folder on GitHubat commit 51a1f34

Compare with similar skills

Tsl next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tsl compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tsl this skillpmndrs/glyph393—~1.5kAutomated safety check: PassMIT
Typegpusoftware-mansion-labs/skills2912 repos~5.6kAutomated safety check: PassNone
Shader for Interfacesv2space-labs/shader-for-interfaces115—~3.1kAutomated safety check: PassMIT
Image to Three.js Modelimg2threejs/img2threejs18k1 repos~8.2kAutomated safety check: PassApache-2.0
Threejs Gameplay Systemsvalkor-ai/loom1.2k1 repos~1.4kAutomated safety check: PassApache-2.0
New ExperimentTresjs/tres3.8k—~782Automated safety check: PassMIT

Similar skills

  • Typegpu

    software-mansion-labs/skills

    TypeGPU is type-safe WebGPU in TypeScript. An agent skill from software-mansion-labs/skills.

    291 GitHub starsUsed in 2 repos~5.6k tokens
    Game DevelopmentAuto-check passed
  • Shader for Interfaces

    v2space-labs/shader-for-interfaces

    Decides whether an interface effect belongs in CSS, SVG, Canvas 2D, WebGL or WebGPU, then builds, debugs and visually verifies focused GPU effects inside product UIs.

    115 GitHub stars~3.1k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Image to Three.js Model

    img2threejs/img2threejs

    Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.

    18k GitHub starsUsed in 1 repo~8.2k tokens
    Game DevelopmentAuto-check passed
  • Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • New Experiment

    Tresjs/tres

    Create a new experiment in TresJS Lab with all necessary files

    3.8k GitHub stars~782 tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Threejs Gameplay Systems

    corosolto/client

    Build and iterate playable Three.js game systems. An agent skill from corosolto/client.

    257 GitHub stars~1.5k tokensUpdated yesterday
    Game DevelopmentAuto-check passed

More from pmndrs/glyph

All 8 skills in this repo
  • Codemod

    pmndrs/glyph

    Author, archive, apply, and verify TypeScript codemods with ts-morph for APIs that have reached the remote default branch or external users.

    393 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Create, migrate, inspect, query, validate, or maintain Open Knowledge Format v0.2 bundles made from linked Markdown concepts with YAML provenance.

    393 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Diataxis Docs

    pmndrs/glyph

    Design, classify, write, audit, or restructure technical documentation with the Diátaxis framework.

    393 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Audit and improve repository code milestone by milestone for correctness, clarity, local reasoning, DRY design, explicit state modeling, panic resistance, and trustworthy TypeScript boundaries.

    393 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Evidence First

    pmndrs/glyph

    Shape human-facing engineering communication—including chat updates and final answers, reports, reviews, handoffs, debugging or benchmark summaries, PR and issue prose, READMEs, and technical…

    393 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Gh Stack

    pmndrs/glyph

    Manage dependent branches and pull requests with the gh-stack GitHub CLI extension.

    393 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed

Questions about Tsl

What does Tsl do?

Implement, migrate, review, debug, or verify Three.js Shading Language (TSL) materials, node graphs, WebGPU compute work, and post-processing. Tsl is an agent skill from pmndrs/glyph.js Shading Language (TSL) materials, node graphs, WebGPU compute work, and post-processing.

When should I use Tsl?

Tsl fits situations like: storage buffers; shader-node typing; GLSL-to-TSL work; verify every API against the repositorys installed Three.js version.

How do I install Tsl in Claude Code?

Run `npx skills add pmndrs/glyph --skill tsl -a claude-code`. Or copy the skill folder (.agents/skills/tsl in pmndrs/glyph) into .claude/skills/tsl in your project. Claude Code loads it when a task matches its description.

How do I install Tsl in Codex?

Run `npx skills add pmndrs/glyph --skill tsl -a codex`. Or copy the skill folder (.agents/skills/tsl in pmndrs/glyph) into .agents/skills/tsl in your project. Codex loads it when a task matches its description.

Can I use Tsl in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pmndrs/glyph --skill tsl -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tsl, .gemini/skills/tsl, .github/skills/tsl and .opencode/skills/tsl in your project.

What does Tsl need to run?

SKILL.md names no scripts, command-line tools or credentials: Tsl is instructions for the agent only.

Does Tsl access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Tsl safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Tsl use?

Tsl is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tsl use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Tsl?

Skills that share tags, products or a category with Tsl: Typegpu (software-mansion-labs/skills, 291 stars), Shader for Interfaces (v2space-labs/shader-for-interfaces, 115 stars), Image to Three.js Model (img2threejs/img2threejs, 18k stars) and Threejs Gameplay Systems (valkor-ai/loom, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tsl?

pmndrs (a GitHub organization) maintains it in pmndrs/glyph, which has 393 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 8, 2026.

Source: pmndrs/glyph on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.