mobile-shader-optimization

mobile-shader-optimization is a skill for Claude Code, Codex from adevra/unity-shader-agent-skills. It costs 31 tokens per session (2,913 once invoked), scanned A, original, MIT.

A guide to making Unity shaders run efficiently on mobile and other graphics-limited devices such as Android, iOS, and some virtual-reality headsets. Shaders are small programs that determine how surfaces are drawn.

In plain words
What is it for?
Use it when writing, reviewing, or profiling Unity shaders for mobile or WebGL, including work involving precision, overdraw, fill rate, baked lighting, and level of detail.
Why use it?
It addresses common limits such as GPU work, memory transfers, screen coverage, and the cost of drawing too many pixels, which can cause low frame rates.

Skill for Claude CodeCodex

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

Good fit Use it when writing, reviewing, or profiling Unity shaders for mobile or WebGL, including work involving precision, overdraw, fill rate, baked lighting, and level of detail.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/adevra/unity-shader-agent-skills/mobile-shader-optimization"><img src="https://agentmods.dev/badge/skills/adevra/unity-shader-agent-skills/mobile-shader-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,913 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.00031 $0.02913
Opus 5 $0.00015 $0.01456
Sonnet 5 $0.00006 $0.00583
Haiku 4.5 $0.00003 $0.00291

Measured 9d ago against content hash 6ae2b6e6d507, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

mobile-shader-optimization 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 9d 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/mobile-shader-optimization/SKILL.md · 243 lines

How it starts

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

Mobile Shader Optimization for Unity

TRIGGER

Use this skill when the user is writing, reviewing, or optimizing Unity shaders for mobile platforms (Android, iOS) or any GPU-constrained environment (Meta Quest VR, low-end devices). Triggers include: mentions of "mobile", "Android", "iOS", "Mali", "Adreno", "PowerVR", "performance", "optimization", "fillrate", "overdraw", "bandwidth", "frame budget", "half precision", "LOD", "baked lighting", or any shader work targeting sub-60fps scenarios. Also trigger when the user is profiling shaders, asking about GPU architecture, or comparing Simple Lit vs Complex Lit in URP.


CORE RULES — HARD CONSTRAINTS

These rules must always be followed when writing mobile shaders:

  1. Use half precision by default. Only use float for world-space positions, UV coordinates requiring high precision, and depth calculations. On Mali and Adreno GPUs, half triggers 16-bit fast paths that are 2x faster.

  2. Never use discard (clip/alpha-test) on PowerVR or Apple GPUs. It breaks Early-Z/Hidden Surface Removal, forcing the GPU to process fragments it would otherwise skip. Use alpha blending instead, or move discard to a separate pass.

  3. Keep Shader Graph node count under 100 for mobile. Each node compiles to shader instructions. Exceeding ~100 nodes risks exceeding mobile GPU instruction limits and causes performance cliffs.

  4. Never use while or do-while loops in shaders targeting OpenGL ES 2.0 / WebGL 1.0. Only counting for loops are allowed. Even on ES 3.0+, avoid dynamic loop bounds — they prevent the compiler from unrolling.

  5. Avoid dynamic branching on mobile. Mobile GPUs often execute both branches regardless. Use step(), lerp(), saturate() for branchless alternatives.

  6. Multiply scalars before vectors. float3 result = scalar1 * scalar2 * vector is faster than float3 result = vector * scalar1 * scalar2 because the first scalar multiply is 1 ALU op instead of 3.

  7. Limit texture samples. Each sample costs bandwidth. Target ≤4 texture samples per fragment on low-end mobile. Use channel packing to combine maps (see texture-packing-variant-stripping skill).

Read the full file on GitHub · 243 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. 9d ago First seen · 243 lines · 31 tokens per session scan A 6ae2b6e6d507

Subscribe to this mod's changes

mobile-shader-optimization is a skill published in the GitHub repository adevra/unity-shader-agent-skills (9 stars, last pushed 5mo ago), licensed MIT. It adds 31 tokens to every session and 2,913 once invoked, about $0.0002 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

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

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

realitykit

Build iOS augmented reality and 3D experiences with RealityKit and ARKit. Use when adding RealityView content, loading entities or USDZ models, anchoring objects to planes or world positions, distinguishing entity hit tests from ARKit real-world raycasts, handling AR camera availability, world tracking, scene updates…

dpearson2699/swift-ios-skills · 75 tokens