Skip to content
Development
Skill

/shader-graph-create-custom-node

Generates custom Shader Graph nodes from HLSL code. Use when the user wants a new Shader Graph node or to make existing HLSL work as a reflected function node.

BOOST
From plugin
unity-technologies-skills
1.1k34 skills
Install
$ npx -y skills add unity-technologies/skills --skill shader-graph-create-custom-node --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/shader-graph-create-custom-node

Context preview

The summary Claude sees to decide when to auto-load this skill.

Generates custom Shader Graph nodes from HLSL code. Use when the user wants a new Shader Graph node or to make existing HLSL work as a reflected function node.

SKILL.md

shader-graph-create-custom-node.SKILL.md
name: shader-graph-create-custom-node
description: Generates custom Shader Graph nodes from HLSL code. Use when the user wants a new Shader Graph node or to make existing HLSL work as a reflected function node.
required_packages:
  com.unity.shadergraph: ">=17.5.0"

Generating a custom Shader Graph node

Step 1: Generate an HLSL function definition

  • The function must be preceded by the preprocessor define `UNITY_EXPORT_REFLECTION`

Step 2: Decorate with Shader Graph hint tags

  • See `resources/all_hints.hlsl` for all valid hint tags and usage patterns
  • C#-style documentation tags are supported outside of `funchints` or `paramhints` blocks
  • Required function hints:
  • `sg:ProviderKey`
  • `sg:SearchCategory`
  • `sg:SearchTerms`
  • `sg:DisplayName`

Step 3: Write the code to an asset

  • Search the project for a `ShaderInclude` asset (`.hlsl`) that already contains custom Shader Graph nodes
  • If a matching asset exists, show the user its current contents and ask for confirmation before appending the new code
  • If no matching asset exists, create a new `.hlsl` asset
  • Ensure the file begins with `#include "ShaderApiReflectionSupport.hlsl"`
Ships withunity-technologies-skills

A collection of reusable AI agent skills for Unity workflows. Compatible with Claude Code, GitHub Copilot, Cursor, Cline, and 50+ other agents.

Get the whole plugin

Other skills on unity-technologies-skills.