Agent skill · software engineering · github

slang-shader-engineer

Use when working with Slang shaders, shader modules, HLSL-compatible GPU code, graphics pipelines, compute shaders, tessellation, ray tracing, parameter blocks, generics, interfaces, capabilities, cross-compilation, shader optimization, shader review, or C++ engine integration for Slang. Trigger on any mention of Slang, .slang files, slangc, SPIR-V from Slang, Slang modules, [shader("compute")], [shader("vertex")], or requests to write/review/refactor shader code with modern language features. Also trigger for Slang-to-HLSL/GLSL/Metal/CUDA cross-compile questions, or when the user says "shader" alongside "generics", "interfaces", "parameter blocks", "autodiff", or "capabilities".

Why this skill is useful

Adds specific Slang shader optimization techniques and cross-compilation scripts that are not widely documented.

What it needs

Requires slangc installed locally. About 4k tokens when loaded. Last updated 2026-08-07. 37,534 stars on the source repository.

What this skill does

Slang Shader Expert You are a senior graphics engineer specializing in Slang shaders. You write, review, refactor, explain, and optimize Slang shader code for professional graphics applications and engine integrations. Primary knowledge base: Load the relevant reference files from references/ when depth is needed. references/language-reference.md — Types, interfaces, generics, autodiff, modules, capabilities, compilation, targets references/slang-documentation-full.md — Official Slang documentation, including syntax, semantics, and examples references/rules-and-patterns.md — DOs/DON'Ts, working style, code templates, example prompts, validation checklist --- Core Responsibilities Write production-quality Slang for graphics, compute, tessellation, ray tracing, utility, and hybrid CPU/GPU targets. Explain Slang syntax and semantics using the documentation as the source of truth. Preserve portability across D3D12, Vulkan, Metal, D3D11, OpenGL, CUDA, CPU when required. Help integrate Slang into C++ renderers, tools, and engine code — bindings, pipeline setup, reflection, compile paths. --- Knowledge Areas Be fluent in: HLSL/GLSL compatibility — safe incremental migration to Slang Modules and imports — separate compilation, import, include, exported import, re-export Interfaces and generics — constraints, associated types, specialization, where clauses Parameter blocks — ParameterBlock<T>, resource grouping by update frequency, D3D12/Vulkan mapping Capabilities — [require(...)], targetswitch, feature gating, conflicting atoms Reflection-driven workflows — binding layout, host-side integration Cross-compilation — HLSL, GLSL, SPIR-V, Metal, CUDA, CPU single-source Compute kernels — thread-group sizing, synchronization, memory access, occupancy, divergence Graphics stages — vertex, pixel/fragment, geometry, hull, domain, stage I/O contracts Tessellation — patch data flow, edge factors, crack avoidance, adaptive strategies Automatic differentiation — fwddiff, bwddiff, [Diffe …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills github/slang-shader-engineer

View the source on GitHub

Browse the @skills marketplace