shader-graph-best-practices

shader-graph-best-practices is a skill for Claude Code, Codex from adevra/unity-shader-agent-skills. It costs 28 tokens per session (1,792 once invoked), scanned A, original, MIT.

A set of guidelines for building Unity Shader Graph effects, where visual shader logic is arranged as connected nodes, for mobile devices.

In plain words
What is it for?
Use it when creating or optimizing Unity URP or HDRP Shader Graphs, including custom lighting, sub-graphs, precision settings, and mobile workflows.
Why use it?
It helps keep shaders within mobile performance limits while keeping graphs readable and reusable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating or optimizing Unity URP or HDRP Shader Graphs, including custom lighting, sub-graphs, precision settings, and mobile workflows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/adevra/unity-shader-agent-skills/shader-graph-best-practices
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.

Any agent
npx skills add adevra/unity-shader-agent-skills --skill shader-graph-best-practices
Clone the repo
git clone --depth 1 https://github.com/adevra/unity-shader-agent-skills

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 shader-graph-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/adevra/unity-shader-agent-skills/shader-graph-best-practices/github.svg)](https://agentmods.dev/skills/adevra/unity-shader-agent-skills/shader-graph-best-practices)
Your own site
<a href="https://agentmods.dev/skills/adevra/unity-shader-agent-skills/shader-graph-best-practices"><img src="https://agentmods.dev/badge/skills/adevra/unity-shader-agent-skills/shader-graph-best-practices/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 shader-graph-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/adevra/unity-shader-agent-skills/shader-graph-best-practices"><img src="https://agentmods.dev/badge/skills/adevra/unity-shader-agent-skills/shader-graph-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,792 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.
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.00028 $0.01792
Opus 5 $0.00014 $0.00896
Sonnet 5 $0.00006 $0.00358
Haiku 4.5 $0.00003 $0.00179

Measured 12d ago against content hash 8790fafc481b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

shader-graph-best-practices 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.

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.

skills/shader-graph-best-practices/SKILL.md · 137 lines

How it starts

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

Shader Graph Best Practices for Mobile Unity

TRIGGER

Use this skill when the user is working with Unity Shader Graph (the node-based visual shader editor) for URP or HDRP. Triggers include: "Shader Graph", "node-based shader", "sub-graph", "custom function node", "Shader Graph mobile", "Shader Graph optimization", "custom lighting Shader Graph", "Shader Graph precision", or any visual shader authoring workflow in Unity. Also trigger when the user references Ben Cloward, Cyanilux, or Daniel Ilett Shader Graph tutorials.


CORE RULES

  1. Keep node count under 100 for mobile targets. Each node compiles to shader instructions. Above ~100 nodes, mobile GPUs hit instruction cache limits and performance drops sharply. Use Sub Graphs to organize, but they don't reduce instruction count.

  2. Set graph-level precision to Half for mobile. In the Graph Inspector, change Precision to "Half". Override individual nodes to "Float" only for positions and UVs.

  3. Use Sub Graphs to organize, not to optimize. Sub Graphs improve readability but compile inline — they don't reduce instruction count. However, they enable reuse across graphs, which reduces total project maintenance.

  4. Custom Function nodes are the escape hatch. When Shader Graph can't express something efficiently (or uses too many nodes for a simple operation), write a Custom Function node in HLSL. This is especially useful for lighting access, complex math, and platform-specific branching.

  5. Shader Graph generates all required passes automatically (ForwardLit, ShadowCaster, DepthOnly, DepthNormals, Meta). You don't need to worry about multi-pass like in HLSL — but you also can't optimize individual passes.


CUSTOM LIGHTING IN SHADER GRAPH

Shader Graph's default Lit target uses PBR (Physically Based Rendering). For mobile, you often want simpler lighting. Use Cyanilux's custom lighting sub-graphs:

Install Custom Lighting Nodes

The Cyanilux/URP_ShaderGraphCustomLighting package adds these sub-graph nodes to Shader Graph:

Read the full file on GitHub · 137 lines

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 First seen · 137 lines · 28 tokens per session scan A 8790fafc481b

Subscribe to this mod's changes

shader-graph-best-practices is a skill published in the GitHub repository adevra/unity-shader-agent-skills (9 stars, last pushed 5mo ago), licensed MIT. It adds 28 tokens to every session and 1,792 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

mobile-development

Use when targeting Android/iOS — export and signing, permissions, plugins, in-app purchases, ads, app lifecycle, device features, and mobile performance.

jame581/GodotPrompter · 33 tokens

gamedev-shaders

Use when authoring or debugging a shader, material, VFX, or full-screen post-process in a game engine — Godot 4.x .gdshader, Unity 6 URP/HDRP, Unreal 5.x Materials, effect recipes, shader performance. NOT gameplay or engine-API code (that is godot/unity/unreal), NOT physics (gamedev-physics), NOT build variant…

ericrisco/rsc-harness · 102 tokens

3d-games-v2

3D Game Development workflow skill. Use this skill when the user needs 3D game development principles. Rendering, shaders, physics, cameras and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.

diegosouzapw/awesome-omni-skills · 55 tokens

gamekit

Integrate Game Center features using GameKit. Use when authenticating GKLocalPlayer, checking player restrictions, submitting leaderboard scores, reporting achievements, implementing real-time or turn-based matchmaking, handling GKMatch data, showing the Game Center dashboard or access point, adding challenges and…

dpearson2699/swift-ios-skills · 71 tokens

shareplay-activities

Build shared real-time experiences using GroupActivities and SharePlay. Use when implementing shared media playback, collaborative app features, synchronized game state, or any FaceTime, Messages, AirDrop, or nearby visionOS group activity on iOS, macOS, tvOS, or visionOS.

dpearson2699/swift-ios-skills · 62 tokens

tabletopkit

Builds multiplayer spatial board games using TabletopKit on visionOS. Use when creating tabletop game experiences with boards, pieces, cards, or dice; managing seats, turns, equipment state, TabletopAction flows, or TabletopInteraction delegates; synchronizing gameplay through FaceTime Group Activities; rendering with…

dpearson2699/swift-ios-skills · 82 tokens