dream-shader-optimize
Skill by TypeDreamMoon
Cleans up a machine-written DreamShader source, such as a decompiled or migrated .dss file, into code a person would have written. It checks that the node graph is unchanged. Aimed at developers who use the DreamShader decompiler or dsc migrate.
Install dream-shader-optimize
Built from the published package, never by AI.
git clone --depth 1 https://github.com/TypeDreamMoon/DreamShader /tmp/DreamShader && mkdir -p ~/.claude/skills && cp -r /tmp/DreamShader/.skill/dream-shader-optimize ~/.claude/skills/dream-shader-optimizeRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/TypeDreamMoon/DreamShader /tmp/DreamShader && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/DreamShader/.skill/dream-shader-optimize ~/.gemini/antigravity-cli/skills/dream-shader-optimizeAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install dream-shader-optimize in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill tidies a DreamShader source that a machine produced, either a decompiled or migrated .dss file or a 1.x .dsm or .dsf export. It works through a set of passes: resolving header warnings, renaming locals to describe their values, preferring HLSL over class-exact node calls, factoring repeated logic into helpers, and keeping layout pragmas. Rules forbid changes to behaviour, such as reordering lerp arguments or folding pow into multiplication.
The skill captures the graph before and after editing with dump-graph, then diffs the two canonical JSON captures. Every difference must be a change the user asked for or a Constant node added by a -Readable decompile. It is for developers working with the DreamShader decompiler or the dsc migrate command who want readable source that still builds the same asset.
Written from the project's SKILL.md and checked against it.
What it can do
- Resolve header warningsWorks through the DSH warnings in a decompiled file as the work list for cleanup.
- Rename localsRenames machine-named locals to describe the value they hold, keeping layout pragmas in step.
- Prefer HLSLReplaces class-exact node calls with the HLSL that builds the same node where possible.
- Factor repeated logicMoves logic written out twice into a helper function without growing the graph.
- Keep layoutKeeps #pragma layout and region lines so node positions and comment boxes survive.
- Prove graph unchangedUses dump-graph before and after edits and diffs the captures to confirm no behavioural change.
- Retarget the assetMoves the file or adds a /// @name so the source names the original asset, then compiles it.
What you need
- DreamShader plugin with the dsc.ps1 script
- PowerShell (pwsh) to run the commands
- Unreal Editor, since dump-graph boots the editor
Try asking
- Clean up DShader/Decompiled/Materials/Game/M_Steel.dss and keep it unchanged in behaviour
- Rename the machine-named locals in this decompiled DreamShader source
- Factor the repeated logic in this .dss file into a helper and prove the graph is the same
Good to know
- Behaviour must not change, so reordering arguments or rounding numbers is out of scope
- Re-running the decompiler overwrites a cleaned file in Decompiled/
- Struct, array, map and set node properties are dropped silently in 1.x exports
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .skill/dream-shader-optimize/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to dream-shader-optimize
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
dream-shader-optimize: common questions
Does this change what the material builds?
The skill's rule is that behaviour must not change. It captures the graph before and after editing and requires every difference in the diff to be one the user asked for.
Can it clean up a 1.x .dsm or .dsf export?
The source advises against cleaning 1.x text by hand. It recommends decompiling the asset again as 2.0 or running dsc migrate first, then optimizing the .dss.
What is dump-graph?
dump-graph generates the source in memory and writes a canonical JSON of each asset's graph, covering node classes, properties, connections and pin order. It writes no asset.
How do I install dream-shader-optimize?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is dream-shader-optimize free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is dream-shader-optimize safe to use?
It scores 71 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to dream-shader-optimize?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
