webgpu
Audited by Runlayer on Feb 21, 2026
Malicious tool definition detected
Tool: README.md Description: # WebGPU Skill This repository contains a WebGPU skill.
Malicious tool definition detected
Tool: REFERENCE.md Description: # WebGPU Quick Reference ## Device + context ```ts const adapter = await navigator.gpu?.requestAdapter(); if (!adapter) throw new Error("WebGPU not supported"); const device = await adapter.requestDevice(); const context = canvas.getContext("webgpu"); const format = navigator.gpu.getPreferredCanvasFormat(); context.configure({ device, format, alphaMode: "premultiplied" }); ``` ## Buffer creation ```ts const buffer = device.createBuffer({ size: byteLength, usage: G
Malicious tool definition detected
Tool: SKILL.md Description: --- name: webgpu description: WebGPU/WGSL guidance for initialization, render/compute pipelines, shader authoring, debugging, and performance; use when building or troubleshooting WebGPU apps, GPU compute workloads, or WGSL shaders. --- # WebGPU Skill Use this skill to design, implement, and debug WebGPU applications and GPU compute pipelines.
Malicious tool definition detected
Tool: examples/basic-setup.ts Description: // @ts-nocheck const canvas = document.querySelector("canvas"); if (!canvas) throw new Error("Missing canvas"); const adapter = await navigator.gpu?.requestAdapter(); if (!adapter) throw new Error("WebGPU not supported"); const device = await adapter.requestDevice(); const context = canvas.getContext("webgpu"); if (!context) throw new Error("Missing WebGPU context"); const format = navigator.gpu.getPreferredCanvasFormat(); context.configure({ device, fo
Malicious tool definition detected
Tool: examples/compute-particles.ts Description: // @ts-nocheck const particleCount = 1024; const stride = 4 * 4; const bufferSize = particleCount * stride; const adapter = await navigator.gpu?.requestAdapter(); if (!adapter) throw new Error("WebGPU not supported"); const device = await adapter.requestDevice(); const particleBuffer = device.createBuffer({ size: bufferSize, usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST, }); const shader = /* wgsl */ ` struct Particle { position: vec2<f3
Malicious tool definition detected
Tool: examples/ping-pong-trails.ts Description: // @ts-nocheck const adapter = await navigator.gpu?.requestAdapter(); if (!adapter) throw new Error("WebGPU not supported"); const device = await adapter.requestDevice(); const width = 512; const height = 512; const format = "rgba16float"; const textureA = device.createTexture({ size: [width, height], format, usage: GPUTextureUsage.STORAGE_BINDING | GPUTextureUsage.TEXTURE_BINDING, }); const textureB = device.createTexture({ size: [width, height],
Malicious tool definition detected
Tool: references/compute-shaders.md Description: ## Compute Shaders ### Workgroup sizing Pick a workgroup size that balances occupancy and memory access.
Malicious tool definition detected
Tool: references/core-concepts.md Description: ## Core Concepts ### WebGPU execution model WebGPU work happens on the GPU via command buffers.
Malicious tool definition detected
Tool: references/debugging-performance.md Description: ## Debugging and Performance ### Avoid heavy readbacks GPU readbacks stall the pipeline.
Malicious tool definition detected
Tool: references/rendering.md Description: ## Rendering Pipelines ### Render passes Render passes write to the swapchain or intermediate textures.
Malicious tool definition detected
Tool: references/runtime-fallback.md Description: ## Runtime Fallback Strategy ### Why it matters WebGPU is not guaranteed on every device.
Malicious tool definition detected
Tool: references/simulation-patterns.md Description: ## Simulation and Orchestration Patterns These patterns apply to a wide range of WebGPU workloads, from particle systems to neural nets and grid simulations.
Malicious tool definition detected
Tool: references/use-cases.md Description: ## WebGPU Use Cases WebGPU is useful for a broad range of workloads that benefit from parallel execution: - **Neural networks**: inference and training, including backprop and gradient descent.
Malicious tool definition detected
Tool: templates/compute.wgsl Description: struct Particle { position: vec2<f32>, velocity: vec2<f32>, };
Malicious tool definition detected
Tool: templates/webgpu-project.md Description: # WebGPU Project Template ## Files - `index.html`: canvas and script entry - `main.ts`: WebGPU init, compute update, and render loop - `shaders.wgsl`: compute + render WGSL ## `index.html` ```html <!-- Minimal canvas + module entrypoint --> <canvas id="c"></canvas> <script type="module" src="/src/main.ts"></script> ``` ## `main.ts` ```ts // Grab the canvas element.