ogpu: Skill for Claude Code

.claude/skills/naga-setup/SKILL.md

naga-setup is a skill for Claude Code from oframe/ogpu. It costs 0 tokens per session (1,959 once invoked), scanned A, original, Unlicense.

A setup procedure for WGSL, the WebGPU shader language, that adds the naga compiler, a write-time validation hook, and a batch-checking script.

In plain words
What is it for?
Use it to configure automatic validation of every changed .wgsl file and to check all shaders in CI or after a large refactor.
Why use it?
It catches shader errors during editing or a full-tree check instead of waiting for a browser reload to reveal them.

Skill for Claude Code

Written for Claude Code: PostToolUse hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions AGENTS.md.

This is oframe/ogpu's own configuration. It tells Claude Code how to work on ogpu itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ogpu configures →

Reuse

Borrowing it

Nothing to install: this file belongs to oframe/ogpu. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/oframe/ogpu/main/.claude/skills/naga-setup/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/oframe/ogpu

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for naga-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/oframe/ogpu/naga-setup/github.svg)](https://agentmods.dev/skills/oframe/ogpu/naga-setup)
Your own site
<a href="https://agentmods.dev/skills/oframe/ogpu/naga-setup"><img src="https://agentmods.dev/badge/skills/oframe/ogpu/naga-setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for naga-setup

Your own site · 80×15
<a href="https://agentmods.dev/skills/oframe/ogpu/naga-setup"><img src="https://agentmods.dev/badge/skills/oframe/ogpu/naga-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,959 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01959
Opus 5.5 $0.00000 $0.00784
Sonnet 5.5 $0.00000 $0.00392
Haiku 4.5 $0.00000 $0.00196

Measured 12d ago against content hash c6fa5d355c22, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

naga-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (assets/validate-shaders.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/naga-setup/SKILL.md · 169 lines

How it starts

The opening of the file, as written. The whole thing — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.

naga-setup

Wire a repo so every WGSL edit is compiled by naga immediately, and the whole shader tree can be checked in one command. WGSL errors otherwise only surface in the browser console after a reload — this collapses that loop to zero.

The thing to keep straight

A working setup is four artifacts, and they arrive by different routes:

Artifact Travels with a git clone?
Repo config .claude/settings.json hook — runs naga after each Edit/Write of a .wgsl, exits 2 on failure so the compiler error blocks and gets fixed in the same turn yes
scripts/validate-shaders.mjs + npm entry — batch check for CI or a refactor that touched many shaders; the hook only sees files an agent writes, the script sees all of them yes
Local toolchain naga binary no
jq binary no

So a fresh clone of an already-wired repo still has half a setup: a hook that fires and does nothing, because naga isn't on the machine. That's why step 1 is the toolchain and not the config. Check each artifact, install whichever are missing, and when all four are present say so and stop — re-adding the hook just duplicates it.

Steps

1. Check the local toolchain

naga --version
jq --version

Missing naga makes everything else inert, so fix it first — and offer to run the install rather than just quoting it, since on a fresh clone this is usually the only gap:

brew install naga-cli    # macOS / Linux — NOT `brew install naga`, that formula
                         # is a Snake game and collides on the same binary name
cargo install naga-cli   # any platform with Rust

If naga --version succeeds but prints something that isn't a wgpu version string, that's the Snake game — people hit this often enough to be worth checking rather than assuming a zero exit means the compiler.

jq reads the tool payload for the hook. Usually present on macOS; brew install jq otherwise.

2. Install the hook

Read the full file on GitHub · 169 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago Changed · +4 lines c6fa5d355c22
  2. 1mo ago First seen · 165 lines · 0 tokens per session scan A e71f0c468c75

Subscribe to this mod's changes

naga-setup is a skill published in the GitHub repository oframe/ogpu (163 stars, last pushed 3d ago), licensed Unlicense. It costs nothing until one of its globs matches a file; then it loads 1,959 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.