Re-saves Godot text resources (.tscn/.tres) through the editor pipeline to inject UIDs and validate loading. Use after creating or editing resource files by hand.
Ships in gdscript-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Re-serialize .tscn / .tres files through Godot's editor resource pipeline (ResourceLoader.load → ResourceSaver.save). Never hand-write uid://... values into resource files — run this skill instead and let Godot assign them.
This skill REWRITES the target files in place. It is not read-only.
uid="uid://..." attribute to the resource header, exactly as the editor would.tscn / .tres files (they have no uid= yet)<godot> --headless --editor --path <project_root> --script <script> -- <paths...>
<godot> — path to the Godot binary (use whatever is available: godot, godot4, /usr/bin/godot, etc.)<project_root> — directory containing project.godot<script> — absolute path to this skill's scripts/resave.gd. Relative --script paths are resolved against res://, so a path outside the project only works in absolute form.<paths...> — files and/or directories (recursed), as res://, absolute, or project-root-relative paths. Only .tscn / .tres are processed; hidden directories (.godot, .git, ...) are skipped. Glob expansion is left to the shell.--editor is required: without it the text saver never writes uid= lines and even strips existing ones.
cd <project_root>
git ls-files -z '*.tscn' '*.tres' | xargs -0 <godot> --headless --editor --path . --script <script> --
Using git ls-files naturally excludes .godot/ and gitignored addons.
Read only the [RESAVE] marker lines and the exit code:
[RESAVE] FAIL <res://path> (load|save) — one line per failed file[RESAVE] ok=<N> failed=<M> — final summaryExit code: 0 all files saved / 1 one or more failures / 2 bad arguments (no paths, or a path that does not exist).
Godot prints WARNING/ERROR noise (ObjectDB leaks, RID leaks, first_scan_filesystem progress) during headless runs — ignore it, same policy as godot-cache-refresh.
UIDs for referenced resources (e.g. the uid= on an ext_resource line pointing to a .gd script) are looked up from the project's UID cache, which is populated by the editor's filesystem scan — and that scan completes only after this script has already run. Verified consequence: for a brand-new .gd referenced by a brand-new .tscn, a single resave writes the scene's own header uid= but not the ext_resource uid=.
So when new .gd files are involved, run godot-cache-refresh first, then this skill (a second resave run also works, but the explicit order is cheaper and clearer).
Review the result with git diff --stat. The operation is idempotent: a second run over the same files must produce zero diff, which doubles as a health check. Note the first pass may include benign normalization beyond UIDs (e.g. recalculated load_steps, canonical value formatting) — that is expected.
.godot cache contention).| godot-cache-refresh | godot-resource-resave | |
|---|---|---|
| Target | whole project | given .tscn / .tres files |
| Mechanism | passive scan (--editor --quit) | active load→save (--editor --script) |
| Produces | class_name cache + missing .gd.uid sidecars | uid= inside .tscn/.tres + load validation |
| Rewrites project files | no | yes |
Note: gdunit4-toolkit's gdunit4-test-runner performs the same passive scan before running tests by default, so .gd.uid sidecar generation can also happen as a side effect of running tests. That runner is read-only by contract and does not resave resources.
What SKILL.md sets; muted values are Claude Code's defaults
/gdscript-toolkit:godot-resource-resavefrom gdscript-toolkit
npx claudepluginhub minami110/claude-godot-tools --plugin gdscript-toolkit7 skills in this plugin
/gdscript-file-managerMove, rename, or delete GDScript files with their .uid files for Godot projects. Use when reorganizing code, renaming scripts, or removing unused GDScript files./gdscript-formatFormat and lint GDScript files using gdscript-formatter. Use after editing GDScript files to ensure code style consistency./godot-cache-refreshRegenerate Godot caches (class_name registry and .uid files). Use after creating or renaming GDScript files with class_name.Other plugins' skills for the same job