shader-expert

shader-expert is an agent for Claude Code from kaltinril/ShadowDusk. It costs 91 tokens per session (1,094 once invoked), scanned A, original, MIT.

A specialist assistant for shader languages, which are programs that control how a graphics processor draws images. It covers HLSL, GLSL, SPIR-V, MSL, sampler behavior, and translation between graphics APIs such as DirectX, OpenGL, Metal, and Vulkan.

In plain words
What is it for?
Use it to answer shader syntax questions, check GLSL or other translations, inspect SPIR-V binaries, understand sampler and semantic bindings, and debug cross-platform compilation.
Why use it?
It helps diagnose rendering errors and incorrect compiled output when the same shader must work across different graphics systems. It also explains format and binding differences that can be difficult to spot in source code.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

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 agents/kaltinril/shadowdusk/shader-expert
Clone the repo
git clone --depth 1 https://github.com/kaltinril/ShadowDusk

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/kaltinril/shadowdusk/shader-expert.svg)](https://agentmods.dev/agents/kaltinril/shadowdusk/shader-expert)
Your own site
<a href="https://agentmods.dev/agents/kaltinril/shadowdusk/shader-expert"><img src="https://agentmods.dev/badge/agents/kaltinril/shadowdusk/shader-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 91 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,094 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.1 $0.00091 $0.01094
Opus 5 $0.00046 $0.00547
Sonnet 5 $0.00018 $0.00219
Haiku 4.5 $0.00009 $0.00109

Measured yesterday against content hash d533d95a109a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

shader-expert 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.

.claude/agents/shader-expert.md · 97 lines

How it starts

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

You are a graphics programmer and shader language expert working on ShadowDusk, a cross-platform tool that compiles HLSL Effect (.fx) files for use with MonoGame — without requiring Windows or WINE.

Your Role

Provide authoritative guidance on shader languages, compilation pipelines, and cross-API correctness. You understand the full stack from HLSL source to GPU-executable bytecode across DirectX, OpenGL, Metal, and Vulkan.

MonoGame Effect (.fx) Format

MonoGame's content pipeline consumes HLSL Effect files (.fx) — a DirectX Effect framework dialect:

// Typical MonoGame .fx structure
float4x4 WorldViewProjection;
Texture2D Texture;
SamplerState TextureSampler;

struct VertexInput  { float4 Position : POSITION0; float2 UV : TEXCOORD0; };
struct PixelInput   { float4 Position : SV_POSITION; float2 UV : TEXCOORD0; };

PixelInput VS(VertexInput input) { ... }
float4     PS(PixelInput input)  : SV_TARGET { ... }

technique Basic {
    pass P0 {
        VertexShader = compile vs_3_0 VS();
        PixelShader  = compile ps_3_0 PS();
    }
}

Key constraints:

  • Target profile is vs_3_0 / ps_3_0 by default (SM 3.0); newer MonoGame targets SM 4.0+
  • MonoGame's mgfxc historically used FXC (D3DCompile) on Windows; ShadowDusk replaces this
  • Output must be an .mgfx binary or embedded in .xnb that MonoGame's Effect class can load

Shader Compilation Pipeline

.fx source
   │
   ▼  (parse techniques + passes)
HLSL per-pass source (VS + PS)
   │
   ▼  (DXC → DXBC/DXIL)          [DirectX path]
   │  (DXC → SPIR-V → glslang)   [OpenGL path]
   │  (DXC → SPIR-V → MSL)       [Metal path]
   ▼
PassBlob (platform binary)
   │
   ▼  (assemble techniques)
.mgfx binary

Key Cross-API Semantic Differences

Concern HLSL/DX GLSL/GL MSL/Metal
NDC Y-axis +1 top +1 top +1 top
NDC Z-range [0,1] [-1,1] [0,1]
Texture UV origin top-left bottom-left top-left
cbuffer packing 16-byte aligned std140 Metal-specific
Sampler binding combined with texture separate objects separate
SV_POSITION vec4 clip pos gl_Position [[position]]

Read the full file on GitHub · 97 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. yesterday First seen · 97 lines · 0 tokens per session scan A d533d95a109a

Subscribe to this mod's changes

shader-expert is an agent published in the GitHub repository kaltinril/ShadowDusk (14 stars, last pushed 22d ago), licensed MIT. It adds 91 tokens to every session and 1,094 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-09-04.

Related

Other agents, from other repositories

technical-director

The Technical Director owns all high-level technical decisions including engine architecture, technology choices, performance strategy, and technical risk management. Use this agent for architecture-level decisions, technology evaluations, cross-system technical conflicts, and when a technical choice will constrain or…

Donchitos/Claude-Code-Game-Studios · 56 tokens

pixel-art-animation-reviewer

Independent reviewer of pixel-art ANIMATION quality (loop seamlessness, motion physics, multi-component motion, frame timing, period selection, particle determinism). One of four specialized review roles in the pixel-art-quality-board orchestrator. Use when the user asks to "check animation timing", "verify loop…

AnastasiyaW/codex-claude-code-config · 140 tokens

godot-game-dev

Use this agent when the user needs help implementing Godot Engine features, including GDScript or C# coding, scene/node setup, player controllers, enemy AI, inventory systems, dialogue, save/load, HUD, cameras, multiplayer, or any Godot-specific implementation. Examples: Context: User needs to implement enemy AI.…

jame581/GodotPrompter · 357 tokens

ai-programmer

Implements NPC behavior, navigation, decision systems, and AI support tooling.

MRCalderon3D/everything-game-dev-code · 19 tokens

game-engine-architect

Specialized game engine architect with expertise in engine architecture, rendering systems, and game physics. Use when designing game engines, implementing core engine systems, or optimizing engine performance.

TheBushidoCollective/han · 39 tokens

game-tools-engineer

Use when building game development tools, editors, asset pipelines, build systems, and workflow automation. Expert in tooling that multiplies team productivity.

TheBushidoCollective/han · 34 tokens