unity-shader

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

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/ethanJPope/Our-Main-Hackathon-Game --skill unity-shader-ethanjpope
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-shader
Source: https://github.com/ethanJPope/Our-Main-Hackathon-Game/tree/main/.agents/skills/unity-skills/skills/shader
Command: npx skills add https://github.com/ethanJPope/Our-Main-Hackathon-Game --skill unity-shader-ethanjpope

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with handwritten Unity shaders requires repetitive file operations and manual inspection of properties, keywords, and compilation errors. This Skill provides a unified set of operations to create, read, list, find, validate, and delete .shader files without leaving your AI-assisted workflow. ## Core Features & Use Cases - Shader Creation from Templates: Create standard Unlit shaders or URP Unlit/Lit shaders with correct ShaderLab structure, writing raw HLSL/ShaderLab source directly to asset paths. - Shader Inspection & Diagnostics: Read shader source, list all shaders with filters, extract property definitions, enumerate keywords, 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 for a stylized material. Create it via shader_create_urp, verify it compiles with shader_check_errors, then inspect its properties with shader_get_properties before assigning it to materials. ## Quick Start Create a URP Lit shader named Custom/MyShader at Assets/Shaders/MyShader.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 custom shader in Unity programmatically?

Use shader_create with a shaderName, savePath, and template containing raw ShaderLab/HLSL source code. For URP projects, use shader_create_urp with type set to Unlit or Lit to generate from a built-in preset template.

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 count of error messages.

Does the template parameter in shader_create accept preset names?

No, the template parameter is raw shader source code written verbatim into the file. Passing a name like Standard writes that literal string to disk and fails compilation. Use shader_create_urp for named Unlit or Lit presets.

Can I change material properties with the shader module?

No, shader_get_properties only returns property definitions like name, type, and range from the shader itself. To read or set actual material instance values, use the material module functions such as material_get_properties or material_set_float.

Why is shader_delete not executing in Auto mode?

shader_delete carries a Delete operation flag and is auto-forbidden in Approval and Auto modes. It only runs under Bypass mode or when explicitly added to the user-managed allowlist.

When should I use ShaderGraph instead of handwritten shaders?

Use the shadergraph module for node-based visual shader authoring. This shader module is intended for handwritten HLSL/ShaderLab .shader files where you work directly with source code, keywords, and variants.