Agent skill

Dream Shader Decompile

by TypeDreamMoon in TypeDreamMoon/DreamShader

Export an existing Unreal material, material function, layer, layer blend, material instance or Custom Pass pipeline back into DreamShaderLang source headlessly, so a hand-built material graph or…

MITAuto-check passedGame Development

Install Dream Shader Decompile

skills CLI
$ npx skills add TypeDreamMoon/DreamShader --skill dream-shader-decompile -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install TypeDreamMoon/DreamShader dream-shader-decompile --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/TypeDreamMoon/DreamShader.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.skill/dream-shader-decompile .claude/skills/dream-shader-decompile && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dream-shader-decompile
GitHub stars
106
Token cost
~2.9k tokens
SKILL.md length
1,330 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Export an existing Unreal material, material function, layer, layer blend, material instance or Custom Pass pipeline back into DreamShaderLang source headlessly, so a hand-built material graph or…

  • Works in 4 steps: Read the // Warning: DSHnnnn: … lines… → Compile it as-is, to establish that the… → Clean it up — dream-shader-optimize. → …
  • Asked to decompile
  • SKILL.md covers Run it, What comes out, After the export — do this, in… and Gotchas, plus 2 more sections
  • Calls pwsh

What it does

Dream Shader Decompile is an agent skill from TypeDreamMoon/DreamShader. Export an existing Unreal material, material function, layer, layer blend, material instance or Custom Pass pipeline back into DreamShaderLang source headlessly, so a hand-built material graph or pipeline can be migrated to a text source file. Use when asked to decompile, export, reverse, convert, or migrate a material / material function / material layer / material instance / pass pipeline asset to .dss, .dsi or .dsp (or, with -Format Legacy, a material or function to .dsm / .dsf).

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Game Development, covering Shaders and Game development. It works with Unreal Engine. The repository describes itself as: Unreal Engine Material DSL. Use Dream Shader Lang Write Unreal Material. Simple · Fast · Full syntax · HLSL GLSL Lang Support. The licence is MIT.

When your agent uses it

  • Asked to decompile
  • Migrate a material / material function / material layer / material instance / pass pipeline asset to .dss
  • With -Format Legacy
  • Function to .dsm / .dsf)

Example prompts

  • “/dream-shader-decompile”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Read the // Warning: DSHnnnn: … lines under the // Decompiled by DreamShader from …
  2. Compile it as-is, to establish that the export is at least buildable
  3. Clean it up — dream-shader-optimize.
  4. Only then let it take over the original: move the file to the place that names the original

What it can do on your machine

Read from SKILL.md and the folder at commit 1a5dfab. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pwsh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dream Shader Decompile loads about 2.9k tokens when it runs. Until then it costs about 128 tokens; SKILL.md has 1,330 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~128
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from TypeDreamMoon/DreamShader at commit 1a5dfab, republished under its MIT licence (© TypeDreamMoon). 1,330 words, ~2,855 tokens.

Download SKILL.mdSave it as .claude/skills/dream-shader-decompile/SKILL.md (or your agent's skills folder).
name
dream-shader-decompile
description
Export an existing Unreal material, material function, layer, layer blend, material instance or Custom Pass pipeline back into DreamShaderLang source headlessly, so a hand-built material graph or pipeline can be migrated to a text source file. Use when asked to decompile, export, reverse, convert, or migrate a material / material function / material layer / material instance / pass pipeline asset to .dss, .dsi or .dsp (or, with -Format Legacy, a material or function to .dsm / .dsf).

dream-shader-decompile <asset>

Read an existing asset's node graph and write the DreamShaderLang source that builds it. Since 2.0 the default output is 2.0 text — a .dss, a .dsi for a material instance, or (since 2.1.0) a .dsp for a Custom Pass pipeline — written by the compiler run backwards (graph → IR → AST → printer; a pipeline has no graph, so its fields are read back into the payload a .dsp binds to). The 1.x exporter that writes .dsm / .dsf is still there behind -Format Legacy.

This is the front half of a migration; the back half is dream-shader-optimize.

Paths below are relative to the plugin root, Plugins/DreamShader/.

Run it

bash
pwsh -File Plugins/DreamShader/.skill/dsc.ps1 decompile /Game/Materials/M_Steel
bash
pwsh -File Plugins/DreamShader/.skill/dsc.ps1 decompile /Game/Materials/MI_Steel_Worn
bash
pwsh -File Plugins/DreamShader/.skill/dsc.ps1 decompile /MyPlugin/Materials/M_RectBlock -Out D:/Work/M_RectBlock.dss -KeepAssetPath

Exit 0 writes the file and logs where, and in which format:

text
LogDreamShader: Display: DreamShader decompiled '/Game/Materials/M_Steel.M_Steel' to '…/M_Steel.dss' (dss).
dsc: OK (exit 0)
Switch
-Out <file>where to write. Its extension picks the format when -Format is absent: .dsm / .dsf is 1.x text, anything else 2.0.
-Format Dss|Legacy|AutoAuto is the default. A format that contradicts the extension — or a .dss for an instance — is DSH9085.
-SourceFile <source>instead of an asset: decompile every asset that source builds into one file. Build the source first (DSH9087).
-KeepAssetPathwrite /// @name <the asset's own path> wherever the output file's place would name another asset, so a rebuild takes over the original. A .dsp has no /// @name: a pipeline keeps its path only when the file is written where its source belongs, and anywhere else is DSH9224 (warning).
-Readableprefer HLSL sugar over class-exact node calls. Easier to read; a rebuilt graph may then differ in node classes.
-DiagnosticsOut <file>the decompile's diagnostics as JSON, written whether or not it succeeded.

Without -Out the destination is computed from the asset's package path:

Asset classLands inExtension
UMaterialDShader/Decompiled/Materials/<package path>.dss
UMaterialFunctionDShader/Decompiled/Functions/<package path>.dss
UMaterialFunctionMaterialLayerDShader/Decompiled/Layers/<package path>.dss
UMaterialFunctionMaterialLayerBlendDShader/Decompiled/LayerBlends/<package path>.dss
UMaterialInstanceConstantDShader/Decompiled/Instances/<package path>.dsi
UDreamPassPipeline (since 2.1.0)DShader/Decompiled/Pipelines/<package path>.dsp

So /Game/Materials/Metal/M_Steel → DShader/Decompiled/Materials/Game/Materials/Metal/M_Steel.dss. With -Format Legacy the same places get .dsm / .dsf, and an instance or a pipeline is refused.

What comes out

hlsl
// Decompiled by DreamShader from /Game/Materials/M_Steel.M_Steel
uniform float A = 1.0;
uniform float B = 2.0;

export void M_Steel(inout material m)
{
    float Sum = A + B;
    float Twice = Sum * Sum;

    m.Opacity = saturate(Twice - Sum);
    m.Roughness = A * 0.5;
}
  • Uniforms come out in the material's display order; /// @sort is written only where a priority is not the uniform's place in that order.
  • A value gets a local when it is read twice, or when the statement that made it named it; the rest is written inline.
  • A Custom node comes back as a /// @custom function with its helpers; a function asset the graph calls becomes an extern prototype with /// @asset.
  • Comment boxes are #pragma regions, node positions are #pragma layout hints.
  • A material instance comes out as a .dsi: its parent, the #pragma instance keys it overrides, and only the parameters that differ from the parent.
  • A DreamShader thin-custom pair (hidden MB_DreamThinBase_* base + instance) is decompiled as the one material it is — pass the instance. Backend = ThinCustom is written only where it is not the project default anyway, or with -SourceFile / -KeepAssetPath.
  • A Custom Pass pipeline comes out as a .dsp: #pragma pipeline, the uniforms, the buffers and the passes in the asset's order, every key that would read back as its default left out. What the text cannot say the way the asset has it is DSH9211–DSH9220; the text is then parsed and bound again and compared with the asset (DSH9221–DSH9223, warnings — the file is written either way). Docs/tools/decompiler.md has the details.

After the export — do this, in order

  1. Read the // Warning: DSHnnnn: … lines under the // Decompiled by DreamShader from … header. Each names something the text cannot state the way the asset has it (warnings of DSH9060–DSH9084; for a pipeline DSH9211–DSH9220) — the notes of those ranges stay in the log. They are the migration work list; Docs/diagnostics/DSH9xxx.md says what each one means and what to do about it.
  2. Compile it as-is, to establish that the export is at least buildable:
    bash
    pwsh -File Plugins/DreamShader/.skill/dsc.ps1 compile DShader/Decompiled/Materials/…/M_Steel.dss -Force -CleanNew
    Without -KeepAssetPath this is safe by construction: a .dss builds its asset where the file is, so a file under Decompiled/… builds a new asset (/Game/Decompiled/Materials/…) and leaves the original alone.
  3. Clean it up — dream-shader-optimize.
  4. Only then let it take over the original: move the file to the place that names the original asset, or add /// @name /Game/Materials/Metal/M_Steel to the export (what -KeepAssetPath would have written), and delete nothing until the rebuilt asset has been looked at.
Show full SKILL.md (628 more words)Show less

Gotchas

  • The 2.0 output is proved, the 1.x output is not. A 2.0 decompile is parsed again before it is written (DSH9089, a warning, if that fails — the file is written anyway, and it is a decompiler defect, not an asset problem), and the round-trip suite compiles decompiled text and compares IRs. The 1.x exporter stays "a migration starting point"; read Docs/tools/decompiler.md before trusting a -Format Legacy export.
  • What 2.0 text cannot say is named, never dropped silently. Known today: a default expression wired into a function input's Preview pin (DSH9071), additional defines on a Custom node (DSH9067), a node class outside the builtin catalog (DSH9065), a function asset that no longer exists (DSH9064), a node property that is an array, a map or a delegate (DSH9068).
  • An instance decompile writes overrides only. A parameter the instance sets to the parent's own value is not an override and is left out; layer-only parameters and overrides the language cannot state are named (DSH9101, DSH9104, DSH9105).
  • A decompiled .dsp with HLSL passes takes registry slots when compiled. Its pipeline is a new asset under Decompiled/…, and each compute pass or fullscreen pass with Shader = gets a slot of its own in the project's committed .dreampass/ registry. Delete the file afterwards and run dsc.ps1 pass-registry -Gc to free them.
  • In Git Bash, a leading-slash asset path is mangled. /LGUI/Materials/X becomes C:/Program Files/Git/LGUI/Materials/X and the asset "cannot be loaded". Run decompiles from PowerShell.
  • The asset path is normalised: \ → /, and a path starting with / that contains no . gets the short name appended, so /Game/Path/Asset is loaded as /Game/Path/Asset.Asset. Both forms work.
  • Layout export is a project setting (Export Decompiled Layout, default on). With it off you lose node positions and the regenerated graph is auto-laid-out. Regions are emitted regardless.
  • Comment boxes whose text begins with DreamShader: are DreamShader's own markers: the 2.0 decompiler strips the prefix and keeps a box that encloses nodes as a #pragma region; the 1.x exporter drops them.
  • -Format Legacy only: struct-, array-, map- and set-valued node properties are dropped silently, and material instances are rejected outright.

Troubleshooting

MessageCause
DreamShader could not load asset '…'.the object path is wrong, or the plugin/mount point is not loaded. Check the path in the Content Browser's Copy Reference
DSH9085the format and the output file disagree: -Format Dss with -Out x.dsm, or a material instance with anything but a .dsi
DSH9086the asset is not a material, function, layer, blend, material instance or pass pipeline
DSH9210a pass pipeline with an -Out that does not end in .dsp
DSH9221 / DSH9222 / DSH9223warnings, a pipeline only: the .dsp text did not parse again, did not bind into a pipeline, or reads back as a different pipeline (the first difference is named). The file is written either way. DSH9221 and DSH9223 are decompiler defects — report them with the asset; DSH9222 can also mean the asset breaks a rule a .dsp is checked against, which a hand edit can do
DSH9087-SourceFile: the source does not resolve to its products, or a product has not been built yet
DSH9088the graph did not read into a valid module — a decompiler defect; report it with the asset
DSH9089warning: the printed text does not parse back. The file is written; report it with the asset
MaterialFunction '…' does not expose any outputs.-Format Legacy: the function declares no outputs; nothing to export
exports, but the graph is full of UE.<Class>(…)expected for nodes the language has no sugar for. -Readable trades class-exactness for readability

See also

© TypeDreamMoon, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .skill/dream-shader-decompile of TypeDreamMoon/DreamShader.

Open the folder on GitHubat commit 1a5dfab

Compare with similar skills

Dream Shader Decompile next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dream Shader Decompile compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dream Shader Decompile this skillTypeDreamMoon/DreamShader106—~2.9kAutomated safety check: PassMIT
UMG Material MCPwinyunq/UnrealMotionGraphicsMCP210—~913Automated safety check: PassMIT
Game DeveloperJeffallan/claude-skills12k—~1.5kAutomated safety check: PassMIT
Scenario Unreal Materialsscenario-labs/skills946—~4.6kAutomated safety check: PassMIT
Gamedev Shadersericrisco/rsc-harness180—~3.6kAutomated safety check: PassMIT
UMG MCP Authoringwinyunq/UnrealMotionGraphicsMCP210—~2.6kAutomated safety check: PassMIT

Similar skills

  • UMG Material MCP

    winyunq/UnrealMotionGraphicsMCP

    Creates, edits and compiles Unreal Engine 5.8 material assets as one HLSL Custom node through the UMG MCP bridge, instead of editing .uasset files directly.

    210 GitHub stars~913 tokensUpdated 2 mo ago
    Game DevelopmentAuto-check passed
  • Game Developer

    Jeffallan/claude-skills

    Covers game programming in Unity and Unreal Engine: ECS design, physics, multiplayer networking, shaders and profiling toward a 60 FPS target.

    12k GitHub stars~1.5k tokensUpdated 7 days ago
    Game DevelopmentAuto-check passed
  • Scenario Unreal Materials

    scenario-labs/skills

    A skill your agent uses when a UE5 task involves materials or textures: a master material and instances for a kit, Substrate or legacy, Blendable vs Adaptive GBuffer, glass, emissive screens…

    946 GitHub stars~4.6k tokensUpdated today
    Game DevelopmentAuto-check passed
  • Gamedev Shaders

    ericrisco/rsc-harness

    A skill your agent uses when authoring or debugging a shader, material, VFX, or full-screen post-process in a game engine — Godot 4.x .gdshader, Unity 6 URP/HDRP, Unreal 5.x Materials, effect…

    180 GitHub stars~3.6k tokensUpdated today
    Game DevelopmentAuto-check passed
  • UMG MCP Authoring

    winyunq/UnrealMotionGraphicsMCP

    Builds and edits Unreal Engine UMG interfaces through the Unreal Motion Graphics MCP, covering widget trees, HLSL materials, Sequencer animations and readback checks.

    210 GitHub stars~2.6k tokensUpdated 2 mo ago
    Game DevelopmentAuto-check passed
  • Unreal Bridge

    TornLux/UnrealBridge

    Execute Python scripts inside a running Unreal Engine 5.3+ editor via TCP bridge.

    306 GitHub stars~8.4k tokensUpdated 9 days ago
    Game DevelopmentAuto-check: notes

More from TypeDreamMoon/DreamShader

  • Dream Shader Create

    TypeDreamMoon/DreamShader

    Write a new DreamShader source from a plain-language description — a material, material function, layer, material instance or Custom Pass pipeline — then check and compile it headlessly to prove it…

    106 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Dream Shader Diagnose

    TypeDreamMoon/DreamShader

    Resolve a DreamShader compile error or warning — look its DSH code up, explain the cause, and fix the source — or find out why a DreamShader material silently comes out wrong.

    106 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Dream Shader Migrate

    TypeDreamMoon/DreamShader

    Rewrite DreamShaderLang 1.x sources (.dsm / .dsf / .dsh) as 2.0 .dss with dsc migrate, which proves each rewrite builds the same graph before it writes anything.

    106 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Dream Shader Optimize

    TypeDreamMoon/DreamShader

    Clean up a machine-written DreamShader source — a decompiled or migrated .dss (or a 1.x .dsm / .dsf export) — into one a person would have written, without changing what it builds, and prove the…

    106 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Dream Shader Verify

    TypeDreamMoon/DreamShader

    Check and compile DreamShader sources headlessly — one file or the whole DShader tree — without opening the Unreal editor, and read back every diagnostic with its file, line and code.

    106 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Dream Shader Decompile

What does Dream Shader Decompile do?

Export an existing Unreal material, material function, layer, layer blend, material instance or Custom Pass pipeline back into DreamShaderLang source headlessly, so a hand-built material graph or…. Dream Shader Decompile is an agent skill from TypeDreamMoon/DreamShader. Export an existing Unreal material, material function, layer, layer blend, material instance or Custom Pass pipeline back into DreamShaderLang source headlessly, so a hand-built material graph or pipeline can be migrated to a text source file.

When should I use Dream Shader Decompile?

Dream Shader Decompile fits situations like: asked to decompile; migrate a material / material function / material layer / material instance / pass pipeline asset to .dss; with -Format Legacy; function to .dsm / .dsf).

How do I install Dream Shader Decompile in Claude Code?

Run `npx skills add TypeDreamMoon/DreamShader --skill dream-shader-decompile -a claude-code`. Or copy the skill folder (.skill/dream-shader-decompile in TypeDreamMoon/DreamShader) into .claude/skills/dream-shader-decompile in your project. Claude Code loads it when a task matches its description.

How do I install Dream Shader Decompile in Codex?

Run `npx skills add TypeDreamMoon/DreamShader --skill dream-shader-decompile -a codex`. Or copy the skill folder (.skill/dream-shader-decompile in TypeDreamMoon/DreamShader) into .agents/skills/dream-shader-decompile in your project. Codex loads it when a task matches its description.

Can I use Dream Shader Decompile in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TypeDreamMoon/DreamShader --skill dream-shader-decompile -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dream-shader-decompile, .gemini/skills/dream-shader-decompile, .github/skills/dream-shader-decompile and .opencode/skills/dream-shader-decompile in your project.

What does Dream Shader Decompile need to run?

Going by SKILL.md and its folder, Dream Shader Decompile needs the command-line tools its instructions call (pwsh).

Does Dream Shader Decompile access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Dream Shader Decompile safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dream Shader Decompile use?

Dream Shader Decompile is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dream Shader Decompile use?

About 2.9k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Dream Shader Decompile?

Skills that share tags, products or a category with Dream Shader Decompile: UMG Material MCP (winyunq/UnrealMotionGraphicsMCP, 210 stars), Game Developer (Jeffallan/claude-skills, 12k stars), Scenario Unreal Materials (scenario-labs/skills, 946 stars) and Gamedev Shaders (ericrisco/rsc-harness, 180 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dream Shader Decompile?

TypeDreamMoon (a GitHub user) maintains it in TypeDreamMoon/DreamShader, which has 106 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 9, 2026.

Source: TypeDreamMoon/DreamShader on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.