besty0728/unity-shadergraph
Create and inspect Shader Graph assets — create graphs, inspect structure, and perform constrained blackboard and node editing. Use when creating a Shader Graph, inspecting its structure, or making controlled edits to its blackboard or nodes, even if the user just says "shader graph" or "着色器图". 创建与检查 Shader Graph 资产(创建图、检查结构、受约束的黑板与节点编辑);当用户要创建 Shader Graph、检查其结构、或对黑板/节点做受控编辑时使用。
npx skills add https://github.com/Besty0728/Unity-Skills --skill unity-shadergraph
Shader Graph asset workflows for Unity 2022.3+ with source-backed template handling, MultiJson inspection, and constrained internal-editor reflection writes.
shadergraph_list_templates, shadergraph_list_assets, shadergraph_get_info, shadergraph_get_structure, shadergraph_list_supported_nodes, shadergraph_list_properties, shadergraph_list_keywords) are SkillMode.SemiAuto — they run in all three modes without grant.SkillMode.FullAuto — under Approval they need user grant (grant triggers one server-side execute returning the result); under Auto / Bypass they execute directly.shadergraph_remove_node, shadergraph_remove_property, shadergraph_remove_keyword carry SkillOperation.Delete and are auto-forbidden in Approval / Auto modes (NeverInSemi). Only Bypass or the user-managed Allowlist can run them.This module reaches into UnityEditor.ShaderGraph and UnityEditor.ShaderGraph.Internal via reflection (see ShaderGraphReflectionHelper.cs and ShaderGraphNodeRegistry.cs). The supported node whitelist, slot layout, and settings keys are version-pinned to com.unity.shadergraph 14.0.x (Unity 2022.3) with limited Unity 6 coverage. Treat the following as a hard contract:
shadergraph_list_supported_nodes and shadergraph_get_structure first.MultiJson schema, mutators may fail or silently no-op until the registry is updated.Routing:
shader_*Runtime-first rules:
shadergraph_get_structure before any node-level edit; treat returned nodeId and slotId as the only valid identifiersshadergraph_set_node_defaults only applies to unconnected input slots; if the slot is connected, disconnect firstshadergraph_set_node_settings only writes the whitelist exposed by shadergraph_list_supported_nodesPropertyNode only binds existing blackboard properties; create the property first with shadergraph_add_propertySubGraphOutputNode structureValidated behavior:
[email protected] does not ship GraphTemplates/; shadergraph_create_graph falls back to blank graph creationAppendVectorNode is currently Unity 6 onlyshadergraph_list_templatesList Shader Graph templates shipped by the installed package.
shadergraph_create_graphCreate a Shader Graph asset from a package template or blank fallback.
shadergraph_create_subgraphCreate a blank Shader Sub Graph asset with a configured output slot.
shadergraph_list_assetsList Shader Graph and Sub Graph assets in the project.
shadergraph_get_infoGet a high-level summary of a Shader Graph or Sub Graph asset.
shadergraph_get_structureInspect the live graph structure. Returns real nodeId, position, slots, edges, properties, and keywords.
shadergraph_list_supported_nodesList the constrained node whitelist, supported versions, slots, and editable settings.
shadergraph_add_nodeAdd a supported node by nodeType with optional initial settings and position.
shadergraph_remove_nodeRemove a node by serialized nodeId; related edges are removed together.
shadergraph_move_nodeMove a node by serialized nodeId.
shadergraph_connect_nodesConnect a specific output slot to a specific input slot using nodeId + slotId.
shadergraph_disconnect_nodesDisconnect one exact edge using the same four-tuple.
shadergraph_set_node_defaultsSet the default value of an unconnected input slot.
shadergraph_set_node_settingsWrite whitelisted node settings only.
shadergraph_list_propertiesList graph blackboard properties.
shadergraph_add_propertyAdd a constrained blackboard property.
shadergraph_update_propertyUpdate a constrained blackboard property.
shadergraph_remove_propertyRemove a graph property.
shadergraph_list_keywordsList graph blackboard keywords.
shadergraph_add_keywordAdd a graph keyword.
shadergraph_update_keywordUpdate a graph keyword.
shadergraph_remove_keywordRemove a graph keyword.
shadergraph_reimportForce reimport of a Shader Graph asset after external edits.
shadergraph_get_structure.shadergraph_list_supported_nodes to confirm node type, settings whitelist, and slot layout.nodeId/slotId values.shadergraph_get_structure after each significant edit if the next step depends on topology.Exact names, parameters, defaults, and returns are defined by GET /skills/schema or unity_skills.get_skill_schema(), not by this file.
Take besty0728/unity-shadergraph from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.