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.
npx agentmods add rules/owenob1/web-shaders-agent-kit/web-shadersgit clone --depth 1 https://github.com/owenob1/web-shaders-agent-kitWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00678 |
| Opus 5 | $0.00000 | $0.00339 |
| Sonnet 5 | $0.00000 | $0.00136 |
| Haiku 4.5 | $0.00000 | $0.00068 |
Grade A, and why
web-shaders 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 yesterday.
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.
What it actually says
Web shader rules
Before writing a shader, establish the target — the boilerplate and language differ:
- Raw WebGL 2 → GLSL ES 3.00 (
#version 300 es,in/out,texture(), customout vec4). - Three.js
ShaderMaterial→ GLSL ES 1.00 by default;position,normal,uv,modelViewMatrix,projectionMatrix,normalMatrix,cameraPosition, andprecisionare already injected — don't redeclare them. UseglslVersion: THREE.GLSL3for GLSL 3. - Three.js
RawShaderMaterial→ you write the full header, includingprecision highp float;. - Three.js WebGPURenderer → prefer TSL (JS nodes) over raw WGSL; it cross-compiles to WGSL and GLSL.
- React Three Fiber → use drei
shaderMaterial+extend; drive uniforms from auseFrameref, not React state.
Correctness checklist:
- Aspect-correct UVs (
uv.x *= resolution.x / resolution.y) or circles become ellipses. - Do color math in linear space; sample color textures as sRGB, data textures (normal/roughness) as linear. Mind
renderer.toneMapping. - Flip
vUv.ywhen a texture is upside down (GL origin is bottom-left; render targets haveflipY = false). - No dynamic array indexing / non-constant loops in WebGL 1 GLSL. Integer division truncates — write
1.0/3.0. pow(negative, y)andmodof negatives are footguns; guardnormalize()against zero vectors.- Prefer
mix/step/smoothstepover branching; both branches of a divergentifmay run. - WGSL has no implicit numeric conversions (
1is i32,1.0is f32); padvec3to 16 bytes in uniform structs.
Pull ready functions (noise, SDF, easing, color) from Lygia (https://lygia.xyz) instead of reimplementing.
Debug by outputting intermediates to color (gl_FragColor = vec4(vec3(d), 1.0)), reading the console for compile errors, and confirming uniform names match exactly between JS and the shader (mismatches fail silently). Inspect with Spector.js (WebGL) or the WebGPU Inspector.
When unsure of an API, consult https://threejs.org/docs/llms.txt, https://webgl2fundamentals.org, https://webgpufundamentals.org, https://www.w3.org/TR/WGSL/, and https://iquilezles.org/articles/ rather than guessing.
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.
- yesterday First seen · 32 lines · 678 tokens per session scan A 557dd9ecbe55
web-shaders is a cursor rule published in the GitHub repository owenob1/web-shaders-agent-kit (2 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 678 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-31.
Other cursor rules, from other repositories
x402-coding
@dexterai/x402 SDK conventions and hosted-only OpenDexter tool usage.
pn-build-gate
For build/design/scaffold requests, load pn-build or pn-design; discovery and skeptic mandatory. For fix/tweak, use skills directly.
pn-rust-backend
Rust backend style, env, and error handling. Use for API and server code (Actix-web, Axum).
pn-babylon
Babylon.js scene structure, disposal, and performance. Use when editing Babylon.js or 3D scene code.
pn-communication-contract
Concise agent chat — lead with the answer, ban hedging/slop, scope lock, response aliases (scr/eli/foc/ref/scp). Use when responses are verbose, user asks to compress, or those aliases appear.
pn-astro
Astro conventions: islands, SSG, client directives. Use when editing .astro files. For React components used as Astro islands, pn-react also applies.