gamedev-unity/skills/unity-skills/skills/shadergraph/SKILL.md
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 skillsauth add bernatmv/ai-rules unity-shadergraphInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
development
Keyword research and validation with real search-demand data — never ship keywords from intuition alone. Probes Google Autocomplete per language (free, no account) to prove demand and discover the exact phrasing people type, checks SERPs for winnability, and uses Keyword Planner/Ahrefs/Semrush exports when the user has access. Activates when: choosing or reviewing SEO keywords, meta keywords, page titles, article topics or slugs, landing page copy targeting search, App Store/ASO keyword fields, multilingual keyword sets, 'what should we rank for', 'keyword analysis', or auditing why a page doesn't rank. Also invoke it as a validation pass whenever another skill or task produces a keyword list.
development
Automate YooAsset hot-update and asset bundles — build bundles, run Editor simulate builds, manage Collector groups, analyze BuildReport, and validate runtime. Use when building or simulating YooAsset bundles, configuring collectors, or validating hot-update assets, even if the user just says "热更" or "打AB包". 自动化 YooAsset 热更新与资源包(构建 bundle、编辑器模拟构建、管理 Collector 分组、分析 BuildReport、运行时校验);当用户要构建或模拟 YooAsset 资源包、配置 collector、或校验热更资源时使用。
development
Source-anchored design rules for YooAsset v2.3.18 — initialization, default-package shortcuts, play modes, asset handles, loading, updates, filesystem, build, and pitfalls. Use when writing or reviewing YooAsset code, initializing packages, loading assets via handles, setting up hot-update/download, or choosing a play mode, even if the user just says "热更" or "资源包". 为 YooAsset v2.3.18 提供源码锚定的设计规则(初始化、默认包快捷方式、运行模式、资源句柄、加载、更新、文件系统、构建、陷阱);当用户要编写或审查 YooAsset 代码、初始化 package、用句柄加载资源、配置热更/下载、或选择运行模式时使用。
data-ai
Last-resort guidance for safely hand-editing Unity serialized YAML (.unity/.prefab/.asset/.meta/ProjectSettings) — reference/fileID repair, GUID safety, and merge-conflict fixes. Use when REST cannot reach the change and YAML must be hand-edited — fixing m_Script GUIDs, broken fileID references, .meta files, or merge conflicts, even if the user just says "场景文件打不开" or "引用丢了". 安全手编 Unity 序列化 YAML(.unity/.prefab/.asset/.meta/ProjectSettings)的最后手段(引用/fileID 修复、GUID 安全、合并冲突修复);当 REST 无法触达、必须手编 YAML 时使用——修复 m_Script GUID、断裂 fileID 引用、.meta 文件或合并冲突。