unity-shader

Create, inspect, and manage HLSL/ShaderLab .shader files in Unity projects.

Updated Jun 21, 2026
One-click install
npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-shader-du-qwq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-shader
Source: https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications/tree/main/.agents/skills/unity-skills/skills/shader
Command: npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-shader-du-qwq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing and maintaining handwritten Unity shaders involves repetitive boilerplate, error-prone property inspection, and manual compilation checks. This Skill automates the full lifecycle of .shader files so you can create, read, find, and validate HLSL/ShaderLab code without leaving your workflow. ## Core Features & Use Cases - Shader Creation from Templates: Generate built-in Unlit shaders or URP Unlit/Lit shaders by name, or write raw ShaderLab source directly to a .shader file. - Inspection & Diagnostics: Read shader source, list and find shaders, extract property definitions and keyword lists, count shader variants, and check for compilation errors. - Global Keyword Control: Enable or disable global shader keywords to toggle rendering features across the project. - Use Case: You need a custom URP Lit shader at Assets/Shaders/MyLit.shader. Call shader_create_urp with the name, path, and type "Lit", then run shader_check_errors to confirm it compiles cleanly. ## Quick Start Create a URP Lit shader named Custom/MyLit at Assets/Shaders/MyLit.shader and then check it for compilation errors.

Frequently Asked Questions about unity-shader

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a URP shader in Unity from a template?

Use shader_create_urp with a shader name, save path, and type set to "Unlit" or "Lit". It generates a ready-to-use URP shader file, unlike shader_create whose template parameter expects raw ShaderLab source code rather than a preset name.

How to check a Unity shader for compilation errors?

Call shader_check_errors with the shader name or asset path, such as "Custom/MyShader" or "Assets/Shaders/My.shader". It returns the shader name, a hasErrors flag, and the number of error messages.

What is the difference between shader properties and material properties in Unity?

shader_get_properties returns the property definitions declared in the shader, including name, type, and range. To read or change actual values on a material instance, use material_get_properties or material_set_float and material_set_color from the material module instead.

Can I delete a Unity shader file automatically?

shader_delete removes a shader asset but is auto-forbidden in Approval and Auto modes due to its destructive nature. It only runs in Bypass mode or when explicitly added to the user-managed allowlist.

Why does my shader fail after passing a template name to shader_create?

The template parameter of shader_create is raw ShaderLab source written verbatim to disk, not a preset name. Passing "Standard" writes that literal string into the file, causing compilation failure; use shader_create_urp for named presets.