Agent skill

Shader Extract

by cth9191 in cth9191/site-clone

Extract, reproduce, and locally replay a single WebGL / WebGPU / Canvas / shader / animated-3D visual effect from a web page — the GPU-rendered surface that DOM/CSS cloning is blind to.

MITAuto-check passedGame Development

Install Shader Extract

skills CLI
$ npx skills add cth9191/site-clone --skill shader-extract -a claude-code

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

GitHub CLI
$ gh skill install cth9191/site-clone shader-extract --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/cth9191/site-clone.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/shader-extract .claude/skills/shader-extract && 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
shader-extract
GitHub stars
138
Token cost
~1.4k tokens
SKILL.md length
559 words
Files
27 (incl. references)
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Extract, reproduce, and locally replay a single WebGL / WebGPU / Canvas / shader / animated-3D visual effect from a web page — the GPU-rendered surface that DOM/CSS cloning is blind to.

  • Works in 2 steps: Intake — accept a pre-locked surface… → Capture backends — make the concrete,…
  • A page has a WebGL/WebGPU/canvas shader background
  • SKILL.md covers This skill = intake adapter +…, Router: how you were invoked, Non-negotiables (carried from… and Output contract (so clone-site…, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Shader Extract is an agent skill from cth9191/site-clone. Extract, reproduce, and locally replay a single WebGL / WebGPU / Canvas / shader / animated-3D visual effect from a web page — the GPU-rendered surface that DOM/CSS cloning is blind to. Use whenever a page has a WebGL/WebGPU/canvas shader background, animated 3D hero, generative gradient, particle field, or Unicorn Studio / Spline / Three.js effect that must be captured and rebuilt as a runnable local module. This is the GPU track of a site clone (driven by clone-site) but also stands alone. Trigger on "extract…

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 30 other files, including reference files (for example `ATTRIBUTION.md`, `references/capture-backends.md` and `vendor/web-shader-extractor/SKILL.md`).

It sits in Game Development, covering 3D graphics and WebGL and Shaders. It works with Three.js. The repository describes itself as: Point Claude Code at a URL, get a teardown + a verified near pixel-identical rebuild. Runtime probes, evidence-tagged TEARDOWN.md, Playwright pixel-diff QA. The licence is MIT.

When your agent uses it

  • A page has a WebGL/WebGPU/canvas shader background
  • Animated 3D hero
  • Generative gradient
  • Unicorn Studio / Spline / Three.js effect that must be captured and rebuilt as a runnable local module

Example prompts

  • “extract this shader”
  • “clone the WebGL background”
  • “port this canvas effect”
  • “/shader-extract”

Workflow steps

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

  1. Intake — accept a pre-locked surface from the clone-site coordinator so
  2. Capture backends — make the concrete, research-verified capture tools

What it can do on your machine

Read from SKILL.md and the folder at commit f01d396. 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 javascript).

    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

Shader Extract loads about 1.4k tokens when it runs, and up to ~2.5k if it reads all its reference files. Until then it costs about 181 tokens; SKILL.md has 559 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~181
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.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 cth9191/site-clone at commit f01d396, republished under its MIT licence (© cth9191). 559 words, ~1,375 tokens.

Download SKILL.mdSave it as .claude/skills/shader-extract/SKILL.md (or your agent's skills folder). This skill also uses 26 other files; get the full folder from GitHub.
name
shader-extract
description
Extract, reproduce, and locally replay a single WebGL / WebGPU / Canvas / shader / animated-3D visual effect from a web page — the GPU-rendered surface that DOM/CSS cloning is blind to. Use whenever a page has a WebGL/WebGPU/canvas shader background, animated 3D hero, generative gradient, particle field, or Unicorn Studio / Spline / Three.js effect that must be captured and rebuilt as a runnable local module. This is the GPU track of a site clone (driven by clone-site) but also stands alone. Trigger on "extract this shader", "clone the WebGL background", "port this canvas effect", "rebuild this animated hero", "reproduce this Three.js scene locally". NOT for ordinary DOM/CSS cloning (use dom-clone).
argument-hint
<url> | <locked surface: selector + rect + driver + output-dir>
user-invocable
false

Shader Extract

Capture one GPU-rendered surface and rebuild it as a verified, runnable local effect module. The governing principle — inherited from the vendored engine this skill wraps — is evidence before implementation: capture what the page's GPU pipeline actually does (shaders, uniforms, pass order, textures, timing) and match it, rather than eyeballing the visual and hand-tuning a lookalike. A lookalike drifts; a capture-matched baseline is faithful and honest about its gaps.

This skill = intake adapter + a vendored evidence-gated engine

The heavy machinery lives in vendor/web-shader-extractor/ — an evidence-gated state machine (surface lock → source/runtime trace → capture → verified baseline → projectize) by lixiaolin94 (MIT; see ATTRIBUTION.md). Do not reimplement it. This wrapper does two things the vendored engine assumes were done elsewhere:

  1. Intake — accept a pre-locked surface from the clone-site coordinator so you skip straight to capture instead of re-scouting the whole page.
  2. Capture backends — make the concrete, research-verified capture tools explicit (references/capture-backends.md): Spector.js for WebGL1/2 and WebGPU Inspector for WebGPU. These are what actually recover a frame; the vendored policy files describe the discipline, these describe the tools.

Router: how you were invoked

Driven by clone-site (common): you receive a locked surface — selector, bounding box, guessed driver (three.js / unicorn-studio / spline / regl / raw WebGL), and an output dir like output/<host>/effects/<surface-id>/. The surface is already attributed, so skip scouting. Go straight to:

  1. Read vendor/web-shader-extractor/SKILL.md and its references/replay-policy.md — that is the operating manual for capture → baseline → projectize.
  2. Pick the capture backend by surface type (references/capture-backends.md): WEBGL1/2 → Spector.js; WEBGPU → WebGPU Inspector.
  3. Run the vendored state flow from CAPTURE_MINIMUM_TRUTH onward, writing evidence and the baseline into the given output dir.
  4. Return a mount-contract module (see below) plus the honesty label.

Standalone (user hands you a URL): you must lock the surface first. Run the full vendored flow from INTAKE (read vendor/web-shader-extractor/SKILL.md). The clone-site script scripts/surface-map.js is a fast way to enumerate and classify canvases if you want a head start, but the vendored TARGET_LOCK gate is authoritative.

Show full SKILL.md (235 more words)Show less

Non-negotiables (carried from the vendored engine)

  • Honest labels. Every implementation-critical fact is SOURCE, PARTIAL, or GUESS; unlabeled = GUESS. The final module carries a fidelity verdict. Never quietly upgrade a BEHAVIOR_REBUILD (lookalike) to sound like a source replay.
  • No compensation tuning. Don't nudge brightness, speed, offsets, noise scale, or color to mask missing pipeline evidence. A visible gap gets recorded in known-gaps.md, not fudged away.
  • Baseline before projectize. Get a faithful, verified capture-baseline running first; only then refactor it into an editable module. Don't overwrite a verified baseline for cleanup.
  • Cross-origin honesty. If the canvas is cross-origin/tainted and pixel or shader readback is blocked, say so and fall back to a captured poster frame — don't invent a shader you couldn't read.

Output contract (so clone-site can mount it)

Beyond the vendored output/ layout (capture-baseline, editable-project, qa-report, known-gaps), expose the effect through the mount lifecycle the coordinator composites against:

js
export function mount(canvasEl, opts) { /* start renderer + rAF loop */ return handle }
export function unmount(handle)        { /* cancel rAF, loseContext, free GPU */ }
export function resize(handle, w, h, dpr) { /* resize drawing buffer + viewport */ }

Also emit a poster frame (a captured still) as a fallback for reduced-motion and for the case where reconstruction only reached poster fidelity. Report the fidelity label so the coordinator carries it into the final clone report unchanged.

  • references/capture-backends.md — Spector.js (WebGL) and WebGPU Inspector (WebGPU): what each captures, how to drive it, what's reliable vs guesswork.
  • vendor/web-shader-extractor/SKILL.md — the full state machine + reference router (surface discovery, target lock, evidence policy, replay policy, QA, Three.js/TSL reconstruction, Unicorn Studio / shaders.com adapters).
  • ATTRIBUTION.md — upstream authorship and MIT license.

© cth9191, 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 26 other files (references) in skills/shader-extract of cth9191/site-clone.

  • SKILL.md
  • ATTRIBUTION.md
  • references/capture-backends.md
  • vendor/web-shader-extractor/SKILL.md
  • vendor/web-shader-extractor/references/capture-backends.md
  • vendor/web-shader-extractor/references/evidence-policy.md
  • vendor/web-shader-extractor/references/operating-contract.md
  • vendor/web-shader-extractor/references/qa-failure-policy.md
  • vendor/web-shader-extractor/references/recon-kernel.md
  • vendor/web-shader-extractor/references/replay-policy.md
  • vendor/web-shader-extractor/references/shaders-com.md
  • vendor/web-shader-extractor/references/source-analysis.md
  • vendor/web-shader-extractor/references/surface-discovery.md
  • vendor/web-shader-extractor/references/target-lock.md
  • vendor/web-shader-extractor/references/three-shader-reconstruction.md
  • vendor/web-shader-extractor/references/tool-capability-matrix.md
  • vendor/web-shader-extractor/references/unicorn-studio.md
  • … and 10 more

Open the folder on GitHubat commit f01d396

Compare with similar skills

Shader Extract 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.

Shader Extract compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Shader Extract this skillcth9191/site-clone138—~1.4kAutomated safety check: PassMIT
New ExperimentTresjs/tres3.8k—~782Automated safety check: PassMIT
Typegpusoftware-mansion-labs/skills2912 repos~5.6kAutomated safety check: PassNone
Tslpmndrs/glyph395—~1.5kAutomated safety check: PassMIT
Stage RenderingSiege-Perilous/tableslayer123—~4.1kAutomated safety check: PassCustom licence
Threejs MaterialsOWWZO/ai-agent1895 repos~3.4kAutomated safety check: PassNone

Similar skills

  • New Experiment

    Tresjs/tres

    Create a new experiment in TresJS Lab with all necessary files

    3.8k GitHub stars~782 tokensUpdated today
    Game DevelopmentAuto-check passed
  • 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
  • Tsl

    pmndrs/glyph

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

    395 GitHub stars~1.5k tokensUpdated today
    Game DevelopmentAuto-check passed
  • Stage Rendering

    Siege-Perilous/tableslayer

    Architecture and gotchas for packages/stage — the Threlte/Three.js map renderer (layers, two-pass rendering, shaders, coordinate flips, performance tiers, disposal).

    123 GitHub stars~4.1k tokensUpdated 3 days ago
    Game DevelopmentAuto-check passed
  • Threejs Materials

    OWWZO/ai-agent

    Three.js materials - PBR, basic, phong, shader materials, material properties.

    189 GitHub starsUsed in 5 repos~3.4k tokens
    Game DevelopmentAuto-check passed
  • Three.js post-processing - EffectComposer, bloom, DOF, screen effects.

    189 GitHub starsUsed in 5 repos~3.6k tokens
    Game DevelopmentAuto-check passed

More from cth9191/site-clone

  • Remix Site

    cth9191/site-clone

    Turn a cloned (or any measured) website into YOUR site: re-skin it with your brand, copy, and assets; generate three deliberately different design directions as token/motion/shader overrides and…

    138 GitHub stars~2.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Dom Clone

    cth9191/site-clone

    Extract and rebuild the DOM/CSS layer of a web page — layout, typography, colors, spacing, real content, assets, and normal interactions — into clean components, section by section, from exact…

    138 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Shader Extract

What does Shader Extract do?

Extract, reproduce, and locally replay a single WebGL / WebGPU / Canvas / shader / animated-3D visual effect from a web page — the GPU-rendered surface that DOM/CSS cloning is blind to. Shader Extract is an agent skill from cth9191/site-clone. Extract, reproduce, and locally replay a single WebGL / WebGPU / Canvas / shader / animated-3D visual effect from a web page — the GPU-rendered surface that DOM/CSS cloning is blind to.

When should I use Shader Extract?

Shader Extract fits situations like: A page has a WebGL/WebGPU/canvas shader background; animated 3D hero; generative gradient; unicorn Studio / Spline / Three.js effect that must be captured and rebuilt as a runnable local module.

How do I install Shader Extract in Claude Code?

Run `npx skills add cth9191/site-clone --skill shader-extract -a claude-code`. Or copy the skill folder (skills/shader-extract in cth9191/site-clone) into .claude/skills/shader-extract in your project. Claude Code loads it when a task matches its description.

How do I install Shader Extract in Codex?

Run `npx skills add cth9191/site-clone --skill shader-extract -a codex`. Or copy the skill folder (skills/shader-extract in cth9191/site-clone) into .agents/skills/shader-extract in your project. Codex loads it when a task matches its description.

Can I use Shader Extract 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 cth9191/site-clone --skill shader-extract -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/shader-extract, .gemini/skills/shader-extract, .github/skills/shader-extract and .opencode/skills/shader-extract in your project.

What does Shader Extract need to run?

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

Does Shader Extract 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 Shader Extract 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 Shader Extract use?

Shader Extract is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Shader Extract use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.1k tokens, read only when the agent opens those files.

What are the alternatives to Shader Extract?

Skills that share tags, products or a category with Shader Extract: New Experiment (Tresjs/tres, 3.8k stars), Typegpu (software-mansion-labs/skills, 291 stars), Tsl (pmndrs/glyph, 395 stars) and Stage Rendering (Siege-Perilous/tableslayer, 123 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Shader Extract?

cth9191 (a GitHub user) maintains it in cth9191/site-clone, which has 138 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on August 21, 2026.

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