{"id":"351917f7-b797-4006-83f4-f2254b717fc8","shortId":"beNSxn","kind":"skill","title":"slang-shader-engineer","tagline":"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 fo","description":"# Slang Shader Expert\n\nYou are a senior graphics engineer specializing in Slang shaders. You write, review, refactor,\nexplain, and optimize Slang shader code for professional graphics applications and engine integrations.\n\n**Primary knowledge base:** Load the relevant reference files from `references/` when depth is needed.\n\n- `references/language-reference.md` — Types, interfaces, generics, autodiff, modules, capabilities, compilation, targets\n- `references/slang-documentation-full.md` — Official Slang documentation, including syntax, semantics, and examples\n- `references/rules-and-patterns.md` — DOs/DON'Ts, working style, code templates, example prompts, validation checklist\n\n---\n\n## Core Responsibilities\n\n- Write production-quality Slang for graphics, compute, tessellation, ray tracing, utility, and hybrid CPU/GPU targets.\n- Explain Slang syntax and semantics using the documentation as the source of truth.\n- Preserve portability across D3D12, Vulkan, Metal, D3D11, OpenGL, CUDA, CPU when required.\n- Help integrate Slang into C++ renderers, tools, and engine code — bindings, pipeline setup, reflection, compile paths.\n\n---\n\n## Knowledge Areas\n\nBe fluent in:\n\n- **HLSL/GLSL compatibility** — safe incremental migration to Slang\n- **Modules and imports** — separate compilation, `import`, `__include`, `__exported import`, re-export\n- **Interfaces and generics** — constraints, associated types, specialization, `where` clauses\n- **Parameter blocks** — `ParameterBlock<T>`, resource grouping by update frequency, D3D12/Vulkan mapping\n- **Capabilities** — `[require(...)]`, `__target_switch`, feature gating, conflicting atoms\n- **Reflection-driven workflows** — binding layout, host-side integration\n- **Cross-compilation** — HLSL, GLSL, SPIR-V, Metal, CUDA, CPU single-source\n- **Compute kernels** — thread-group sizing, synchronization, memory access, occupancy, divergence\n- **Graphics stages** — vertex, pixel/fragment, geometry, hull, domain, stage I/O contracts\n- **Tessellation** — patch data flow, edge factors, crack avoidance, adaptive strategies\n- **Automatic differentiation** — `fwd_diff`, `bwd_diff`, `[Differentiable]`, `DifferentialPair<T>`, neural graphics\n- **Debuggability** — GPU printf, readable generated output, RenderDoc integration\n\n---\n\n## Slang-Specific Rules (Always Apply)\n\n- `import` is **not** a textual `#include`. Modules do not share preprocessor macro state.\n- Use `__exported import` to re-expose another module's declarations cleanly.\n- Prefer constrained generics and interfaces over preprocessor-heavy specialization.\n- Use associated types only when each implementation genuinely needs its own dependent type.\n- Design capability-aware code explicitly — don't hide target-sensitive behavior inside opaque helpers.\n- Pointers are only valid on SPIR-V, C++, and CUDA targets.\n- Use `var` for type inference when readability improves; use explicit types for layout/precision/API interop.\n- Use `let` for immutable values to improve clarity and reduce accidental mutation.\n- Parameter blocks are both a shader-authoring and host-integration concern — design both sides together.\n- Use reflection-driven understanding for bindings and layout — never assume register or descriptor behavior.\n- When autodiff is involved, clearly separate ordinary shader logic from differentiable logic. State target and workflow constraints.\n- Default visibility in Slang is `internal` (file-scope and module-scope). Use `public` intentionally.\n\n---\n\n## Working Style\n\n1. **Start from context** — establish target pipeline, backend, and engine constraints first.\n2. **Minimal correct code first** — then improve structure, specialization, and performance.\n3. **Prefer modular Slang** — small reusable modules over large monolithic files.\n4. **Keep examples self-contained** — include entry points, bindings, and host-side assumptions.\n5. **Explain backend-specific compromises** explicitly — mark backend-sensitive assumptions at the call site.\n6. **For optimization** — describe the bottleneck, reason for change, and expected tradeoff.\n7. **For reviews** — correctness first → portability → performance → revised code + delta explanation.\n\n---\n\n## Quick Code Template\n\n```slang\nmodule MyModule;\n\nimport CommonMath;  // example: separate math module\n\nstruct MaterialParams\n{\n    float3 albedo;\n    float  metallic;\n    float  roughness;\n};\n\nParameterBlock<MaterialParams> gMaterial;\n\nstruct VSIn\n{\n    float3 pos : POSITION;\n    float3 n   : NORMAL;\n    float2 uv  : TEXCOORD0;\n};\n\nstruct VSOut\n{\n    float4 pos : SV_POSITION;\n    float2 uv  : TEXCOORD0;\n    float3 n   : NORMAL;\n};\n\n[shader(\"vertex\")]\nVSOut mainVS(VSIn input)\n{\n    VSOut output;\n    output.pos = float4(input.pos, 1.0);\n    output.uv  = input.uv;\n    output.n   = input.n;\n    return output;\n}\n```\n\n---\n\n## Validation Checklist (Before Finalizing Any Answer)\n\n- [ ] Does the Slang syntax match documented features? (See `references/language-reference.md`)\n- [ ] Is backend-specific behavior clearly labeled?\n- [ ] Is required developer context still missing? If so, ask before proceeding.\n- [ ] Does the answer include enough host-side assumptions to be actionable?\n- [ ] Have you avoided inventing undocumented syntax, attributes, or resource rules?\n\nIf any check fails — fix the response or ask the user for the missing detail.\n\n---\n\n## When to Load Reference Files\n\n**Load `references/language-reference.md` when:**\n\n- Writing or reviewing type declarations, generics, interfaces, capabilities\n- Answering questions about autodiff, modules, access control, or compilation targets\n- Cross-compilation to a specific target (SPIR-V, GLSL, Metal, CUDA, CPU)\n- Checking command-line options or CMake setup\n\n**Load `references/rules-and-patterns.md` when:**\n\n- Doing a code review or refactor\n- Designing a new module or shader system architecture\n- Answering \"how should I structure this?\" questions\n- Looking for example prompts and patterns for complex tasks\n\n**Load `references/slang-documentation-full.md` when:**\n- The question is about specific syntax, semantics, or examples not covered in the language reference\n- The user explicitly asks for official documentation details\n- You need to verify a language feature or behavior that isn't clearly covered in the other references\n- The user is asking for a comprehensive explanation of Slang features or usage patterns\n- The user is asking for examples of Slang code that demonstrate specific features or best practices","tags":["slang","shader","engineer","awesome","copilot","github","agent-skills","agents","custom-agents","github-copilot","hacktoberfest","prompt-engineering"],"capabilities":["skill","source-github","skill-slang-shader-engineer","topic-agent-skills","topic-agents","topic-awesome","topic-custom-agents","topic-github-copilot","topic-hacktoberfest","topic-prompt-engineering"],"categories":["awesome-copilot"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/github/awesome-copilot/slang-shader-engineer","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add github/awesome-copilot","source_repo":"https://github.com/github/awesome-copilot","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 33270 github stars · SKILL.md body (6,475 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:52:25.464Z","embedding":null,"createdAt":"2026-05-12T06:52:36.744Z","updatedAt":"2026-05-18T18:52:25.464Z","lastSeenAt":"2026-05-18T18:52:25.464Z","tsv":"'1':473 '1.0':617 '2':485 '3':496 '4':507 '5':522 '6':538 '7':550 'access':257,715 'accident':404 'across':148 'action':668 'adapt':278 'albedo':576 'alway':302 'anoth':324 'answer':629,659,710,759 'appli':303 'applic':68 'architectur':758 'area':175 'ask':654,687,796,822,836 'associ':202,340 'assum':433 'assumpt':521,533,665 'atom':224 'attribut':675 'author':413 'autodiff':90,439,713 'automat':280 'avoid':277,671 'awar':355 'backend':480,525,531,641 'backend-sensit':530 'backend-specif':524,640 'base':74 'behavior':364,437,643,809 'best':847 'bind':168,229,429,516 'block':26,208,407 'bottleneck':543 'bwd':284 'c':38,162,376 'call':536 'capability-awar':353 'capabl':29,92,217,354,709 'chang':546 'check':681,734 'checklist':114,625 'clariti':401 'claus':206 'clean':328 'clear':442,644,813 'cmake':740 'code':17,64,109,167,356,488,558,562,747,841 'command':736 'command-lin':735 'commonmath':568 'compat':15,180 'compil':32,93,172,190,237,718,722 'complex':773 'comprehens':825 'compromis':527 'comput':20,124,249 'concern':418 'conflict':223 'constrain':330 'constraint':201,454,483 'contain':512 'context':476,649 'contract':269 'control':716 'core':115 'correct':487,553 'cover':788,814 'cpu':155,245,733 'cpu/gpu':131 'crack':276 'cross':31,236,721 'cross-compil':30,235,720 'cuda':154,244,378,732 'd3d11':152 'd3d12':149 'd3d12/vulkan':215 'data':272 'debugg':290 'declar':327,706 'default':455 'delta':559 'demonstr':843 'depend':350 'depth':83 'describ':541 'descriptor':436 'design':352,419,751 'detail':693,800 'develop':648 'diff':283,285 'differenti':281,286,448 'differentialpair':287 'diverg':259 'document':98,140,635,799 'domain':266 'dos/don':105 'driven':227,426 'edg':274 'engin':4,39,50,70,166,482 'enough':661 'entri':514 'establish':477 'exampl':103,111,509,569,768,786,838 'expect':548 'expert':44 'explain':59,133,523 'explan':560,826 'explicit':357,389,528,795 'export':193,197,318 'expos':323 'factor':275 'fail':682 'featur':221,636,807,829,845 'file':79,462,506,698 'file-scop':461 'final':627 'first':484,489,554 'fix':683 'float':577,579 'float2':591,600 'float3':575,585,588,603 'float4':596,615 'flow':273 'fluent':177 'fo':41 'frequenc':214 'fwd':282 'gate':222 'generat':294 'generic':27,89,200,331,707 'genuin':346 'geometri':264 'glsl':239,730 'gmateri':582 'gpu':16,291 'graphic':18,49,67,123,260,289 'group':211,253 'heavi':337 'help':158 'helper':367 'hide':360 'hlsl':14,238 'hlsl-compat':13 'hlsl/glsl':179 'host':232,416,519,663 'host-integr':415 'host-sid':231,518,662 'hull':265 'hybrid':130 'i/o':268 'immut':397 'implement':345 'import':188,191,194,304,319,567 'improv':387,400,491 'includ':99,192,309,513,660 'increment':182 'infer':384 'input':611 'input.n':621 'input.pos':616 'input.uv':619 'insid':365 'integr':40,71,159,234,297,417 'intent':470 'interfac':28,88,198,333,708 'intern':460 'interop':393 'invent':672 'involv':441 'isn':811 'keep':508 'kernel':250 'knowledg':73,174 'label':645 'languag':791,806 'larg':504 'layout':230,431 'layout/precision/api':392 'let':395 'line':737 'load':75,696,699,742,775 'logic':446,449 'look':766 'macro':315 'mainv':609 'map':216 'mark':529 'match':634 'materialparam':574 'math':571 'memori':256 'metal':151,243,578,731 'migrat':183 'minim':486 'miss':651,692 'modul':12,91,186,310,325,466,502,565,572,714,754 'modular':498 'module-scop':465 'monolith':505 'mutat':405 'mymodul':566 'n':589,604 'need':85,347,802 'neural':288 'never':432 'new':753 'normal':590,605 'occup':258 'offici':96,798 'opaqu':366 'opengl':153 'optim':34,61,540 'option':738 'ordinari':444 'output':295,613,623 'output.n':620 'output.pos':614 'output.uv':618 'paramet':25,207,406 'parameterblock':209,581 'patch':271 'path':173 'pattern':771,832 'perform':495,556 'pipelin':19,169,479 'pixel/fragment':263 'point':515 'pointer':368 'portabl':147,555 'pos':586,597 'posit':587,599 'practic':848 'prefer':329,497 'preprocessor':314,336 'preprocessor-heavi':335 'preserv':146 'primari':72 'printf':292 'proceed':656 'product':119 'production-qu':118 'profession':66 'prompt':112,769 'public':469 'qualiti':120 'question':711,765,779 'quick':561 'ray':23,126 're':196,322 're-export':195 're-expos':321 'readabl':293,386 'reason':544 'reduc':403 'refactor':58,750 'refer':78,81,697,792,818 'references/language-reference.md':86,638,700 'references/rules-and-patterns.md':104,743 'references/slang-documentation-full.md':95,776 'reflect':171,226,425 'reflection-driven':225,424 'regist':434 'relev':77 'render':163 'renderdoc':296 'requir':157,218,647 'resourc':210,677 'respons':116,685 'return':622 'reusabl':501 'review':36,57,552,704,748 'revis':557 'rough':580 'rule':301,678 'safe':181 'scope':463,467 'see':637 'self':511 'self-contain':510 'semant':101,137,784 'senior':48 'sensit':363,532 'separ':189,443,570 'setup':170,741 'shader':3,10,11,21,33,35,43,54,63,412,445,606,756 'shader-author':411 'share':313 'side':233,421,520,664 'singl':247 'single-sourc':246 'site':537 'size':254 'skill' 'skill-slang-shader-engineer' 'slang':2,9,42,53,62,97,121,134,160,185,299,458,499,564,632,828,840 'slang-shader-engin':1 'slang-specif':298 'small':500 'sourc':143,248 'source-github' 'special':51,204,338,493 'specif':300,526,642,725,782,844 'spir':241,374,728 'spir-v':240,373,727 'stage':261,267 'start':474 'state':316,450 'still':650 'strategi':279 'struct':573,583,594 'structur':492,763 'style':108,472 'sv':598 'switch':220 'synchron':255 'syntax':100,135,633,674,783 'system':757 'target':94,132,219,362,379,451,478,719,726 'target-sensit':361 'task':774 'templat':110,563 'tessel':22,125,270 'texcoord0':593,602 'textual':308 'thread':252 'thread-group':251 'togeth':422 'tool':164 'topic-agent-skills' 'topic-agents' 'topic-awesome' 'topic-custom-agents' 'topic-github-copilot' 'topic-hacktoberfest' 'topic-prompt-engineering' 'trace':24,127 'tradeoff':549 'truth':145 'ts':106 'type':87,203,341,351,383,390,705 'understand':427 'undocu':673 'updat':213 'usag':831 'use':5,138,317,339,380,388,394,423,468 'user':689,794,820,834 'util':128 'uv':592,601 'v':242,375,729 'valid':113,371,624 'valu':398 'var':381 'verifi':804 'vertex':262,607 'visibl':456 'vsin':584,610 'vsout':595,608,612 'vulkan':150 'work':7,107,471 'workflow':228,453 'write':56,117,702","prices":[{"id":"9667b42f-82d1-4757-b88e-9f34146336c4","listingId":"351917f7-b797-4006-83f4-f2254b717fc8","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"github","category":"awesome-copilot","install_from":"skills.sh"},"createdAt":"2026-05-12T06:52:36.744Z"}],"sources":[{"listingId":"351917f7-b797-4006-83f4-f2254b717fc8","source":"github","sourceId":"github/awesome-copilot/slang-shader-engineer","sourceUrl":"https://github.com/github/awesome-copilot/tree/main/skills/slang-shader-engineer","isPrimary":false,"firstSeenAt":"2026-05-12T06:52:36.744Z","lastSeenAt":"2026-05-18T18:52:25.464Z"}],"details":{"listingId":"351917f7-b797-4006-83f4-f2254b717fc8","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"github","slug":"slang-shader-engineer","github":{"repo":"github/awesome-copilot","stars":33270,"topics":["agent-skills","agents","ai","awesome","custom-agents","github-copilot","hacktoberfest","prompt-engineering"],"license":"mit","html_url":"https://github.com/github/awesome-copilot","pushed_at":"2026-05-18T01:26:59Z","description":"Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.","skill_md_sha":"e06afdd16ba7b44a45a4e957ffb0e7e7d442cf69","skill_md_path":"skills/slang-shader-engineer/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/github/awesome-copilot/tree/main/skills/slang-shader-engineer"},"layout":"multi","source":"github","category":"awesome-copilot","frontmatter":{"name":"slang-shader-engineer","description":"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\"."},"skills_sh_url":"https://skills.sh/github/awesome-copilot/slang-shader-engineer"},"updatedAt":"2026-05-18T18:52:25.464Z"}}