Agent skill

Naga Setup

by oframe in oframe/ogpu

Get naga WGSL validation working in a repo — installs the naga/jq toolchain, a PostToolUse hook that compiles every .wgsl on write, and a batch validate-shaders script, so shader checking then…

UnlicenseAuto-check passedGame Development

Install Naga Setup

skills CLI
$ npx skills add oframe/ogpu --skill naga-setup -a claude-code

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

GitHub CLI
$ gh skill install oframe/ogpu naga-setup --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/oframe/ogpu.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/naga-setup .claude/skills/naga-setup && 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
naga-setup
GitHub stars
151
Token cost
~1.9k tokens
SKILL.md length
914 words
Files
2 (incl. assets)
Skills in repo
7
Repo updated
First seen
Licence
Unlicense

At a glance

Get naga WGSL validation working in a repo — installs the naga/jq toolchain, a PostToolUse hook that compiles every .wgsl on write, and a batch validate-shaders script, so shader checking then…

  • Works in 5 steps: Check the local toolchain → Install the hook → Install the batch script → …
  • The setup act: set up naga here
  • SKILL.md covers The thing to keep straight, Steps and What this does and doesn't catch
  • Runs JavaScript scripts from its folder; calls jq, brew and node

What it does

Naga Setup is an agent skill from oframe/ogpu. Get naga WGSL validation working in a repo — installs the naga/jq toolchain, a PostToolUse hook that compiles every .wgsl on write, and a batch validate-shaders script, so shader checking then happens automatically with no skill involved. Use for the setup act: "set up naga here", "add the shader validation hook", "wire up WGSL checking in my new repo", "port my naga setup over", scaffolding a fresh WebGPU project — and also on a fresh clone of a repo that already ships the hook, since the config arrives with the…

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including assets.

It sits in Game Development, covering Shaders and Project scaffolding. The repository describes itself as: Minimal WebGPU Library. The licence is Unlicense.

When your agent uses it

  • The setup act: set up naga here
  • Add the shader validation hook
  • Wire up WGSL checking in my new repo
  • Port my naga setup over

Example prompts

  • “set up naga here”
  • “add the shader validation hook”
  • “wire up WGSL checking in my new repo”
  • “/naga-setup”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Check the local toolchain
  2. Install the hook
  3. Install the batch script
  4. Verify it actually fires
  5. Mention it in the repo's agent docs

What it can do on your machine

Read from SKILL.md and the folder at commit 65e0a1a. 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

    Ships script files (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • jq
    • brew
    • node
    • cargo
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    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

Naga Setup loads about 1.9k tokens when it runs. Until then it costs about 179 tokens; SKILL.md has 914 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~179
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

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 oframe/ogpu at commit 65e0a1a, republished under its Unlicense licence (© oframe). 914 words, ~1,896 tokens.

Download SKILL.mdSave it as .claude/skills/naga-setup/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
naga-setup
description
Get naga WGSL validation working in a repo — installs the `naga`/`jq` toolchain, a PostToolUse hook that compiles every .wgsl on write, and a batch validate-shaders script, so shader checking then happens automatically with no skill involved. Use for the setup act: "set up naga here", "add the shader validation hook", "wire up WGSL checking in my new repo", "port my naga setup over", scaffolding a fresh WebGPU project — and also on a fresh clone of a repo that already ships the hook, since the config arrives with the clone but the naga binary does not, leaving a hook that silently does nothing. Do NOT use this to validate a shader; validating is the installed hook's job or a plain `naga <file>`.

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:

ArtifactTravels 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 turnyes
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 themyes
Local toolchainnaga binaryno
jq binaryno

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
bash
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

Already a naga entry under hooks.PostToolUse in the repo's .claude/settings.json? Leave it and move on.

Otherwise add it there — the repo's file, not the user's global one, so it travels with the repo and doesn't fire in unrelated projects:

json
{
    "hooks": {
        "PostToolUse": [
            {
                "matcher": "Edit|Write|MultiEdit",
                "hooks": [
                    {
                        "type": "command",
                        "command": "f=$(jq -r '.tool_input.file_path // empty'); case \"$f\" in *.wgsl) out=$(naga \"$f\" 2>&1) || { echo \"WGSL validation failed: $f\" >&2; echo \"$out\" >&2; exit 2; };; esac",
                        "statusMessage": "Validating WGSL with naga"
                    }
                ]
            }
        ]
    }
}

Merge, don't clobber. If .claude/settings.json exists, read it and append to the existing hooks.PostToolUse array — overwriting someone's settings to add a shader check is a bad trade.

Notes in case the command needs adapting:

  • The payload arrives as JSON on stdin; jq -r '.tool_input.file_path' pulls the path out. It's absolute, so the hook works regardless of cwd.
  • The case guard means non-WGSL edits cost one shell spawn and exit silently — cheap enough to leave unconditional.
  • Exit code 2 is what makes it blocking: stderr goes back to the agent. Any other non-zero code just warns.
3. Install the batch script

Already a scripts/validate-shaders.mjs? Leave it — a repo's copy may have been adapted, and overwriting it with a near-identical file is a bad trade.

Otherwise copy assets/validate-shaders.mjs into the repo's scripts/ (create it if needed). It walks the whole tree from the root, skipping generated and vendored directories — deliberately not just src/, since shaders also live in examples/, demos/, sandbox/, and a batch check that quietly misses most of them is worse than no batch check. Widen its SKIP set if the repo has a big generated directory the default misses. It also takes explicit paths: node scripts/validate-shaders.mjs path/to/one.wgsl.

Exit codes: 0 all valid, 1 a shader failed, 2 naga not installed.

If the repo has a package.json, add:

json
"scripts": { "validate:shaders": "node scripts/validate-shaders.mjs" }

Not a node project? Leave the script without the npm entry — it only needs a node binary. No node at all? Install the hook alone and say the batch command isn't available.

In a monorepo, the script's scope is the parent of wherever it sits: packages/renderer/scripts/ validates that package, the repo root validates all of them. Ask which the user wants — per-package when one package has shaders, root when several do — and put the npm entry in whichever package.json sits beside it. The hook needs no such choice; one at the repo root covers every package.

Show full SKILL.md (277 more words)Show less
4. Verify it actually fires

Don't declare victory on a config write. Prove both halves:

bash
node scripts/validate-shaders.mjs   # expect ok/FAIL lines for the repo's real shaders

Then test the hook by writing a deliberately broken shader — let x: f32 = ; — with the Write tool. Use a temp path outside the repo (/tmp/naga-hook-check.wgsl); the hook matches on the tool, not the location, so it fires just the same and nothing lands in the user's tree. Expect it to block with naga's parse error. Delete the file after.

Hook silent? Usual causes, in order: settings not loaded yet (hooks load at session start — restart the session or run /hooks to reload), jq missing, or naga not on the PATH the hook's shell sees.

5. Mention it in the repo's agent docs

If there's an AGENTS.md / CLAUDE.md with a commands section, add a line so future agents know the check exists and can use it instead of a browser round-trip:

- `npm run validate:shaders` — validate every `**/*.wgsl` with `naga`. Install via
  `brew install naga-cli` (not `brew install naga`). Single file:
  `node scripts/validate-shaders.mjs <file>`.

What this does and doesn't catch

naga compiles one WGSL file standalone. That covers syntax, types, and bad builtins — the bulk of shader mistakes — but it knows nothing about the host side: bind group layouts, vertex buffer formats, uniform struct field names the JS expects. A shader can validate clean and still render nothing. Say so plainly if the user seems to expect a correctness guarantee.

The standalone part also cuts the other way: a .wgsl file that's a fragment meant to be concatenated into a larger shader will fail validation on its own, which is a false alarm rather than a bug. Repos with a shader-chunk system either want those paths in the script's SKIP set or want the hook narrowed — worth raising before the user concludes the setup is broken.

© oframe, Unlicense. 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 1 other file (assets) in .claude/skills/naga-setup of oframe/ogpu.

  • SKILL.md
  • assets/validate-shaders.mjs

Open the folder on GitHubat commit 65e0a1a

Compare with similar skills

Naga Setup 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.

Naga Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Naga Setup this skilloframe/ogpu151—~1.9kAutomated safety check: PassUnlicense
PixijsRSamaium/CanvasEngine4012 repos~1.6kAutomated safety check: PassMIT
New ExperimentTresjs/tres3.8k—~782Automated safety check: PassMIT
Assets Shader List AllIvanMurzak/Unity-MCP4.4k—~435Automated safety check: PassApache-2.0
Handle Sdr Tonemap Lutclshortfuse/renodx4.4k—~7.3kAutomated safety check: PassMIT
Unreal Material and VFX Workflowflopperam/unreal-engine-mcp1.1k—~927Automated safety check: PassNone

Similar skills

  • Pixijs

    RSamaium/CanvasEngine

    Use this skill first for ANY PixiJS v8 task; it routes to the right specialized skill for the job.

    401 GitHub starsUsed in 2 repos~1.6k tokens
    Game DevelopmentAuto-check passed
  • 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
  • Assets Shader List All

    IvanMurzak/Unity-MCP

    List all shaders available in the project assets and packages, sorted by name.

    4.4k GitHub stars~435 tokensUpdated 3 days ago
    Game DevelopmentAuto-check passed
  • Handle Sdr Tonemap Lut

    clshortfuse/renodx

    RenoDX HLSL/Slang shader workflow for proven shader-side SDR tonemap, hard clip, LUT, color grade, and HDR bridge changes.

    4.4k GitHub stars~7.3k tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Unreal Material and VFX Workflow

    flopperam/unreal-engine-mcp

    Walks an Unreal Engine MCP agent through building materials, Niagara particle systems, Chaos destruction, and curve assets with inspect-then-edit steps.

    1.1k GitHub stars~927 tokensUpdated 3 mo ago
    Game DevelopmentAuto-check passed
  • Rdc CLI

    BANANASJIM/rdc-cli

    A skill your agent uses when working with RenderDoc capture files (.rdc), analyzing GPU frames, tracing shaders, inspecting draw calls, or running CI assertions against GPU captures.

    180 GitHub stars~2.9k tokensUpdated 2 mo ago
    Game DevelopmentAuto-check passed

More from oframe/ogpu

  • Scaffold Shader

    oframe/ogpu

    Scaffold a new simple WGSL shader for the OGPU engine, wired for a RenderPipeline + Mesh.

    151 GitHub stars~1.4k tokensUpdated 11 days ago
    Auto-check passed
  • Scaffold App

    oframe/ogpu

    Scaffold a new OGPU example/app from scratch — a Renderer + Camera + Orbit + update loop and a single spinning cube wired through the vanilla Box primitive - RenderPipeline - Mesh setup.

    151 GitHub stars~1.1k tokensUpdated 11 days ago
    Auto-check passed
  • Ground any answer about the webgpu-utils library (greggman/webgpu-utils) in its actual API before responding.

    151 GitHub stars~1.4k tokensUpdated 11 days ago
    Auto-check passed
  • Ground any answer about the WebGPU platform itself — browser support/compatibility, feature availability, limits, what's shipping or behind a flag, and exact spec behavior — in the live Chrome…

    151 GitHub stars~1.3k tokensUpdated 11 days ago
    Auto-check passed
  • Pbr Shading

    oframe/ogpu

    Fold PBR/IBL shading into a RenderPipeline in the OGPU engine.

    151 GitHub stars~1.6k tokensUpdated 11 days ago
    Auto-check passed
  • Shadow Mapping

    oframe/ogpu

    Fold real-time shadow mapping into an existing RenderPipeline/shader in the OGPU engine.

    151 GitHub stars~1.9k tokensUpdated 11 days ago
    Auto-check passed

Questions about Naga Setup

What does Naga Setup do?

Get naga WGSL validation working in a repo — installs the naga/jq toolchain, a PostToolUse hook that compiles every .wgsl on write, and a batch validate-shaders script, so shader checking then…. Naga Setup is an agent skill from oframe/ogpu.wgsl on write, and a batch validate-shaders script, so shader checking then happens automatically with no skill involved.

When should I use Naga Setup?

Naga Setup fits situations like: the setup act: set up naga here; add the shader validation hook; wire up WGSL checking in my new repo; port my naga setup over.

How do I install Naga Setup in Claude Code?

Run `npx skills add oframe/ogpu --skill naga-setup -a claude-code`. Or copy the skill folder (.claude/skills/naga-setup in oframe/ogpu) into .claude/skills/naga-setup in your project. Claude Code loads it when a task matches its description.

How do I install Naga Setup in Codex?

Run `npx skills add oframe/ogpu --skill naga-setup -a codex`. Or copy the skill folder (.claude/skills/naga-setup in oframe/ogpu) into .agents/skills/naga-setup in your project. Codex loads it when a task matches its description.

Can I use Naga Setup 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 oframe/ogpu --skill naga-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/naga-setup, .gemini/skills/naga-setup, .github/skills/naga-setup and .opencode/skills/naga-setup in your project.

What does Naga Setup need to run?

Going by SKILL.md and its folder, Naga Setup needs JavaScript for the scripts in its folder and the command-line tools its instructions call (jq, brew, node, cargo and git). Our summary lists: Node.js.

Does Naga Setup access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Naga Setup 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 Naga Setup use?

Naga Setup is published under the Unlicense licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Naga Setup use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Naga Setup?

Skills that share tags, products or a category with Naga Setup: Pixijs (RSamaium/CanvasEngine, 401 stars), New Experiment (Tresjs/tres, 3.8k stars), Assets Shader List All (IvanMurzak/Unity-MCP, 4.4k stars) and Handle Sdr Tonemap Lut (clshortfuse/renodx, 4.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Naga Setup?

oframe (a GitHub organization) maintains it in oframe/ogpu, which has 151 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on September 26, 2026.

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