webgpu-compute-shaders
Use this skill when the user says 'WebGPU', 'compute shader', 'WGSL', 'workgroup', 'GPGPU in browser', 'storage buffer'. Explains WebGPU compute pipelines…
от j4flmao★ 47 звёзд на GitHub
Установить webgpu-compute-shaders в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
WebGPU & Compute Shaders
Purpose
Explain general-purpose GPU compute in the browser via WebGPU: authoring WGSL compute shaders, dispatching workgroups, and using shared/workgroup memory and storage buffers efficiently.
Agent Protocol
Trigger
User phrases: "WebGPU compute", "WGSL compute shader", "workgroup size", "storage buffer binding", "GPGPU in browser".
Input Context
- Problem to parallelize and data sizes.
- Target workgroup dimensions.
Output Artifact
Compute pipeline + WGSL shader design.
Response Format
Kernel: {operation}
Workgroup: {@workgroup_size(x,y,z)}
Buffers: {storage / uniform bindings}
Core Mechanics
WebGPU is the modern successor to WebGL. It unlocks the massive parallel processing power of the GPU directly in the browser, not just for drawing triangles, but for general-purpose compute (GPGPU) like Physics simulations or Machine Learning.
1. Compute Shaders (WGSL)
Unlike Vertex or Fragment shaders which are tied to the rendering pipeline, a Compute Shader is just a program executed thousands of times simultaneously by the GPU. Written in WebGPU Shading Language (WGSL).
2. Workgroups & Shared Memory
GPU threads are organized into Workgroups. Threads within the same Workgroup can share a special, ultra-fast memory space (var<workgroup>) and synchronize with each other using barriers (workgroupBarrier()). This is critical for complex algorithms like Matrix Multiplication.
Compute Shader Architecture Map
%%{init: {"theme": "default", "flowchart": {"useMaxWidth": true}}}%%
flowchart TD
subgraph JS ["JavaScript (CPU)"]
A["Allocate Float32Array"]
B["Write to GPU Buffer"]
C["Dispatch Compute Pipeline"]
end
subgraph GPU_Hardware ["GPU Parallel Execution"]
subgraph Workgroup ["Workgroup (e.g., 64 Threads)"]
D["Invocation 1"]
E["Invocation 2"]
F["Invocation 64"]
G["Shared Memory (Ultra-fast)"]
end
end
subgraph Result ["Readback"]
H["Copy Buffer to CPU"]
end
A --> B
B --> C
C -->|"Spawn Threads"| D
C -->|"Spawn Threads"| E
C -->|"Spawn Threads"| F
D <--> G
E <--> G
F <--> G
Workgroup -->|"Barrier Sync"| H
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл webgpu-compute-shaders?
Use this skill when the user says 'WebGPU', 'compute shader', 'WGSL', 'workgroup', 'GPGPU in browser', 'storage buffer'. Explains WebGPU compute pipelines, WGSL compute shaders, and workgroup/shared-memory design. Do NOT use for: WebGL rendering, or raytracing geometry math (use niche/graphics-math/raytracing-mathematics).
Как установить скилл webgpu-compute-shaders?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл webgpu-compute-shaders запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…