scaffold-shader

scaffold-shader is a skill for Claude Code, Codex from oframe/ogpu. It costs 102 tokens per session (1,431 once invoked), scanned A, original, Unlicense.

A starting template for a simple WGSL shader used by the OGPU WebGPU engine to render a mesh. It includes the required vertex and fragment entry points, standard transform uniforms, and a basic normal-based color output.

In plain words
What is it for?
Use it when creating a new mesh shader, adding a .wgsl file, or starting a basic shader before adding custom uniforms or textures.
Why use it?
It removes the need to remember the exact names and bindings expected by OGPU's rendering pipeline. Following the template helps avoid shaders that fail to build or render incorrectly.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/oframe/ogpu/scaffold-shader
Any agent
npx skills add oframe/ogpu --skill scaffold-shader
Clone the repo
git clone --depth 1 https://github.com/oframe/ogpu

Made for: Claude Code, Codex.

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 scaffold-shader

README.md
[![agentmods](https://agentmods.dev/badge/skills/oframe/ogpu/scaffold-shader.svg)](https://agentmods.dev/skills/oframe/ogpu/scaffold-shader)
Your own site
<a href="https://agentmods.dev/skills/oframe/ogpu/scaffold-shader"><img src="https://agentmods.dev/badge/skills/oframe/ogpu/scaffold-shader.svg" alt="Measured on agentmods" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,431 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00102 $0.01431
Opus 5 $0.00051 $0.00715
Sonnet 5 $0.00020 $0.00286
Haiku 4.5 $0.00010 $0.00143

Measured 4d ago against content hash 9e666fca9f63, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

scaffold-shader 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 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/scaffold.py), 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/scaffold-shader/SKILL.md · 96 lines

How it starts

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

Scaffold a simple WGSL shader

Generate a minimal, correct WGSL file (plus optional JS wiring) for a mesh rendered through RenderPipeline + Mesh. The base shader is deliberately bare — vs/fs with the standard transform uniforms and a fragment that outputs the normal mapped to 0..1. No custom uniforms, no textures: those are modifications you layer on top after generating, per the task. The reference shape is examples/hellowebgpu/cube.wgsl (same conventions).

Conventions that are NOT optional (reflection-enforced)

These come from webgpu-utils reflection in RenderPipeline/Mesh — get one wrong and the pipeline silently shades garbage or fails construction:

  • Uniform block MUST be @group(0) @binding(0) var<uniform> uniforms : Uniforms. Lowercase uniforms, struct typed (commonly Uniforms). RenderPipeline reads this.defs.uniforms.uniforms by that exact name.
  • Vertex entry point MUST be vs, fragment MUST be fs. Hardcoded.
  • Mesh.draw writes standard uniforms BY NAME into the struct — only the fields that exist are written. Available: projectionMatrix, viewMatrix, modelViewMatrix, modelMatrix, objectMatrix (inverse model), normalMatrix (mat3x3f), cameraPosition (vec3f), cameraQuaternion (vec4f), resolution (vec2f), time (f32). Declare only the subset the shader uses, spelled exactly. Custom uniforms (e.g. uScale, uAlpha) go after them and are set via mesh.uniforms.set({...}) — the Mesh owns the uniform buffer, not the pipeline.
  • Vertex attribute @location is assigned by declaration ORDER in the geometry's data object, not by name. Standard primitives (@core/primitives Box/Sphere/…) emit position (loc 0), normal (loc 1), uv (loc 2). The Vertex struct must match that order.
  • Texture uniforms are named t<Name> (e.g. tMap). Samplers keep descriptive names. Only add these if the shader actually samples a texture — a declared binding with no bind-group entry throws at pipeline creation.

Read the full file on GitHub · 96 lines

Files

What ships with it

3 files 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. 4d ago First seen · 96 lines · 102 tokens per session scan A 9e666fca9f63

Subscribe to this mod's changes

scaffold-shader is a skill published in the GitHub repository oframe/ogpu (141 stars, last pushed 23d ago), licensed Unlicense. It adds 102 tokens to every session and 1,431 once invoked, about $0.0005 per session on Opus 5. 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.