unity-shadergraph

Create and edit Unity Shader Graph assets through constrained node and blackboard operations.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Editing Unity Shader Graph assets programmatically is fragile because the Shader Graph package exposes no stable public API for graph mutation, forcing developers to hand-edit serialized assets or click through the editor for every node, connection, and blackboard property change. ## Core Features & Use Cases - Graph Creation and Inspection: Create Shader Graph and Sub Graph assets from package templates or blank fallbacks, then inspect live structure including nodeIds, slots, edges, properties, and keywords. - Constrained Node Editing: Add, move, connect, disconnect, and remove nodes from a version-pinned whitelist, with default values and settings validated against the supported node registry. - Blackboard Management: Add, update, list, and remove blackboard properties and keywords before binding them to PropertyNodes. - Use Case: Build a toon shading prototype by creating a blank graph, adding a Color property to the blackboard, adding multiply and sample nodes from the supported list, connecting them via live nodeId/slotId pairs, and reimporting the asset. ## Quick Start Create a new Shader Graph asset named ToonShading, then show me its structure and the list of supported nodes I can add.

Frequently Asked Questions about unity-shadergraph

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

FAQPage Schema
How do I create a Shader Graph asset programmatically in Unity?

Use shadergraph_create_graph to create a graph from a package template or a blank fallback, then call shadergraph_get_structure to inspect it. On Unity 2022.3 with shadergraph 14.0.12, templates are not shipped, so creation falls back to a blank graph.

How do I add and connect nodes in a Unity Shader Graph?

First call shadergraph_get_structure to get real nodeId and slotId values, then shadergraph_add_node with a whitelisted nodeType, and shadergraph_connect_nodes using the nodeId plus slotId four-tuple. Never invent slot names or ids from memory.

Which Unity and Shader Graph versions are supported?

The node whitelist, slot layout, and settings keys are pinned to com.unity.shadergraph 14.0.x on Unity 2022.3, with limited Unity 6 coverage. The shared validated node set is 28 nodes, with AppendVectorNode currently Unity 6 only.

Why does a Shader Graph edit fail or silently do nothing?

Failures usually mean the installed Shader Graph package changed internal types or the MultiJson schema that the reflection layer depends on. Do not retry with different arguments; report the version mismatch and stop until the registry is updated.

Can I delete nodes or properties from a Shader Graph automatically?

Removal operations like shadergraph_remove_node and shadergraph_remove_property carry a Delete operation flag and are auto-forbidden in Approval and Auto modes. They only run in Bypass mode or through a user-managed allowlist.

When should I use Shader Graph editing versus writing HLSL shaders?

Use this module for Shader Graph and Sub Graph assets; use the shader_* skills for hand-written HLSL text shaders. For design guidance before proposing a graph architecture, load the shadergraph-design skill first.