shadergraph
Skill15 starsChanged 5 months agoMITView on GitHub
Skill for AI agents driving the Unity Shader Graph package (com.unity.shadergraph) in a Unity project through the unity-open-mcp MCP server. This domain is embedded in the bridge, compile-gated on com.unity.shadergraph, and auto-activating. Its tools compile in only when the project has com.unity.shadergraph installed (the bridge sets the UNITY_OPEN_MCP_EXT_SHADERGRAPH define automatically). When the package is present, the shadergraph group activates automatically for the session — its tools appear in ListTools with no manual manage_tools call. This is the first domain to…
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- demo/AGENTS.mdAGENTS.md
- hub/AGENTS.mdAGENTS.md
- mcp-server/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- animationSkill
- audioSkill
- cinemachineSkill
- constraintsSkill
- input-simulationSkill
- inputsystemSkill
- lightingSkill
- memoryprofilerSkill
- navigationSkill
- particlesystemSkill
- probuilderSkill
- splinesSkill
- spriteatlasSkill
- terrainSkill
- textureSkill
- tilemapSkill
- timelineSkill
- uiSkill
- vfxSkill
- unity-open-mcpSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
All tools in this pack use unity_open_mcp_shader_graph_* (note the underscore split — shader_graph, matching the catalog word-boundary …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Unity Open MCP — Shader Graph Extension
Skill for AI agents driving the Unity Shader Graph package
(com.unity.shadergraph) in a Unity project through the unity-open-mcp MCP
server.
This domain is embedded in the bridge, compile-gated on
com.unity.shadergraph, and auto-activating. Its tools compile in only when the project hascom.unity.shadergraphinstalled (the bridge sets theUNITY_OPEN_MCP_EXT_SHADERGRAPHdefine automatically). When the package is present, theshadergraphgroup activates automatically for the session — its tools appear inListToolswith no manualmanage_toolscall. This is the first domain to ship with package-detection auto-activation.
Preconditions
- Unity Editor is open with the target project.
unity_open_mcp_pingreturnsconnected: true.- The project has
com.unity.shadergraphinstalled. Ifcapabilitiesreports theshadergraphgroup asavailable: false, install the package (and a Scriptable Render Pipeline — URP or HDRP) and let the bridge recompile. - The
shadergraphgroup is auto-activated when the package is present — checkunity_open_mcp_manage_tools(action="list_groups"); the group should showactivationSource: "auto". If you deactivated it manually, re-activate withmanage_tools(action="activate", group="shadergraph").
Tool prefix
All tools in this pack use unity_open_mcp_shader_graph_* (note the
underscore split — shader_graph, matching the catalog word-boundary
convention).
Vocabulary
A Shader Graph is a .shadergraph asset — the authored graph that
compiles into a shader. It holds an ordered list of nodes, each exposing
input and output slots (identified by integer slot ids). Edges connect
an output slot of one node to an input slot of another. The graph has one or
more output nodes (Vertex / Fragment / etc.) that the rest of the graph
feeds into.
Node ids are stable string GUIDs assigned by Shader Graph — read them via
shader_graph_open or the return value of shader_graph_node_add. Slot ids
are integers; an open summary lists each node's slots with { id, name }.
Version-stability note
Shader Graph's editing API (UnityEditor.ShaderGraph: GraphData,
AbstractMaterialNode, slots) is partially internal and shifts across
com.unity.shadergraph versions. The mutating tools (create, node_add,
node_connect) wrap it behind a reflection helper:
shader_graph_openparses the.shadergraphJSON directly — always works, stable across versions.create/node_add/node_connectuse reflection; when the installed version exposes a different surface, they return a structuredshadergraph_api_unavailableerror rather than throwing. In that case, do the edit manually in the graph window, then callshader_graph_opento read the result.
Canonical workflow: build a graph
- Create the asset —
unity_open_mcp_shader_graph_createwrites a new.shadergraphatasset_path(anAssets/.../*.shadergraphpath; parent folder must exist).shader_typeselects the template:Unlit(default),Lit,Decal,Fullscreen,Blank. Returns the created asset path. - Open + inspect —
unity_open_mcp_shader_graph_openbrings up the Shader Graph editor window and returns a structured summary: node count, each node's{ id, name, type, position, slots }, edge count, each edge's{ outputNodeId, outputSlot, inputNodeId, inputSlot }. Read-only, nopaths_hint. Always call this first to learn the existing node/slot ids and the output node's input slots. - Add nodes —
unity_open_mcp_shader_graph_node_addper node.node_typeis a friendly name (UV,Multiply,Sample Texture 2D,Add,Time,Color,Vector3, …) or a fullUnityEditor.ShaderGraphclass name.positionisx,yin graph space.properties_jsonoptionally seeds initial field values. Returns the new node's id + its slot ids. - Connect nodes —
unity_open_mcp_shader_graph_node_connectwires an output slot to an input slot. Passsource_node_id+source_slot(output) anddestination_node_id+destination_slot(input). Idempotent (re-connecting an existing edge is a no-op success). - Verify — call
shader_graph_openagain to confirm the graph structure;unity_open_mcp_shader_get_dataon the asset path inspects the compiled shader properties (the runtime-facing surface — complementary, not overlapping with the graph tools).
Common recipes
Texture-tinted color
shader_graph_create→Assets/Shaders/Tinted.shadergraph(shader_type: "Unlit").shader_graph_opento read the output node's id + the Fragment input slot id.shader_graph_node_addnode_type: "Sample Texture 2D"→ note node id + its output slot.shader_graph_node_addnode_type: "Color"→ note node id + output slot.shader_graph_node_addnode_type: "Multiply"→ note id + its two input slots.shader_graph_node_connect: SampleTexture2D.out → Multiply.in0, Color.out → Multiply.in1, Multiply.out → Fragment.input.
Sub-graph reuse
shader_graph_open lists every node, so to wire a Sub Graph asset you already
authored, add its node by the Sub Graph's type/friendly name, then connect its
output slot into the parent graph. Read the Sub Graph's output slot id from its
own open summary first.
Agent-sense pairing
unity_senses_screenshot(view: "game") visually confirms the shader on a material after assignment.unity_open_mcp_shader_get_data/unity_open_mcp_shader_list_allinspect the compiled shader (properties, passes, compile errors) — the runtime surface, complementary to this authoring surface.unity_open_mcp_execute_csharpis the fallback for advanced operations the reflection layer can't reach (e.g. custom function nodes, sub-graph creation, keyword setup).
Tool reference
| Tool | Mutating | Lifecycle | Notes |
shader_graph_create | yes | editor_settle | New .shadergraph from a template. |
shader_graph_open | no (read-only) | none | Window bring-up + structured node/edge summary. Gate = Off. |
shader_graph_node_add | yes | editor_settle | Add a node by friendly name or class name. |
shader_graph_node_connect | yes | editor_settle | Connect output slot → input slot. Idempotent. |
Address every graph by asset_path (Assets/.../*.shadergraph). Every
mutating tool requires a non-empty paths_hint scoped to the graph asset path
— the gate has no whole-project fallback. When a mutating tool returns
shadergraph_api_unavailable, fall back to manual editing in the graph window
and re-open to read the result.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

