Webgpu Metal Debug Kit — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Webgpu Metal Debug Kit (Plugin) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
Aggregate score unchanged between these scans.
The primary manifest — the file an agent reads to learn what this artifact does.
A toolkit for debugging Chrome WebGPU applications on macOS with AI coding assistants. Combines Chrome DevTools MCP for browser-level debugging with Xcode `xctrace` for Metal driver-level profiling.
WebGPU debugging is hard:
printf in shadersThis kit gives your AI assistant direct access to browser state (evaluate_script) and GPU driver traces (xctrace).
/plugin marketplace add penspanic/webgpu-metal-debug-kit
/plugin install webgpu-metal-debug-kit@webgpu-metal-debug-kit
/reload-pluginsgit clone https://github.com/penspanic/webgpu-metal-debug-kit.git \
~/.claude/skills/webgpu-metal-debug-kitWorks with any agent that supports Agent Skills (Claude Code, Codex CLI, Cursor, VS Code Copilot, etc.).
The AI uses Chrome DevTools MCP to directly control the browser:
// AI runs these via evaluate_script
window.__gpu.stats() // { fps, avgMs, maxMs, frameGapMs }
window.__gpu.setDebugMode(2) // step heatmap
window.__gpu.textures() // texture infoWhen browser-level analysis isn't enough, the AI captures Metal traces:
# AI finds GPU process and runs xctrace directly
GPU_PID=$(pgrep -f "Google Chrome.*--type=gpu-process" | head -1)
/usr/bin/xcrun xctrace record --template 'Metal System Trace' \
--attach "$GPU_PID" --time-limit 5s --output /tmp/webgpu-metal-trace.trace# Start your app
python3 -m http.server 8080
# Launch Chrome with Metal debug flags
bash scripts/setup-metal-debug.sh http://localhost:8080
# Capture Metal trace
bash scripts/capture-metal-trace.sh 5
# Open in Instruments
open /tmp/webgpu-metal-trace.traceIn the Chrome console: __gpu.stats(), __gpu.setDebugMode(2), etc.
Add assets/webgpu-debug-helpers.js to your WebGPU app:
import { initDebugHelpers, frameStart, frameEnd, getDebugMode } from './webgpu-debug-helpers.js';
initDebugHelpers(device);
function render() {
frameStart();
// pass getDebugMode() to your shader uniforms
frameEnd();
requestAnimationFrame(render);
}Add assets/debug-shader-snippet.wgsl to your shader for debug visualization modes.
| Mode | Visualization | Use Case |
|---|---|---|
| 0 | Normal | Default rendering |
| 1 | Render path | Which shader path rendered each pixel |
| 2 | Step heatmap | Raymarching performance hotspots |
| 3 | Depth | Depth buffer visualization |
| 4 | Normals | Surface normal visualization |
See references/debug-modes.md for details.
bash demo/start.sh
# Opens http://localhost:8080/demo/ in ChromeNote: file:// URLs won't work due to CORS. Use an HTTP server.xcodebuild -downloadComponent MetalToolchain if template missing)MIT
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.