一键导入
godot-cache-refresh
Regenerate Godot caches (class_name registry and .uid files). Use after creating or renaming GDScript files with class_name.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Regenerate Godot caches (class_name registry and .uid files). Use after creating or renaming GDScript files with class_name.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Format and lint GDScript files using gdscript-formatter. Use after editing GDScript files to ensure code style consistency.
Write gdUnit4 test code with type-specific assertions, signal testing, and scene runner support. Use when creating or updating tests for GDScript files.
Re-save Godot text resources (.tscn/.tres) through the editor pipeline to inject UIDs and validate that they load. Use after creating or editing .tscn/.tres files by hand.
Run gdUnit4 tests for Godot projects and report results (read-only). Use to verify test status after code changes. USE PROACTIVELY to check test results.
Launch the Godot editor GUI in the background so its stdout (print / push_warning / push_error) is directly readable. Use when the user explicitly asks to open the Godot editor, or when a change needs hands-on verification in the running editor/game.
Validate GDScript changes by refreshing Godot cache and checking diagnostics. Use after creating or editing GDScript files.
| name | godot-cache-refresh |
| description | Regenerate Godot caches (class_name registry and .uid files). Use after creating or renaming GDScript files with class_name. |
| allowed-tools | ["Bash"] |
Regenerate Godot Engine's project caches by running the editor in headless mode.
.godot/global_script_class_cache.cfg — registry of all class_name declarations.uid files for resources that are missing themclass_name<godot> --headless --editor --path <project_root> --quit
<godot> — path to the Godot binary (use whatever is available: godot, godot4, /usr/bin/godot, etc.)<project_root> — directory containing project.godotfind . -maxdepth 4 -name "project.godot" -type f 2>/dev/null
Exit code 0 means the cache was regenerated successfully.
Godot prints WARNING and ERROR messages to stderr during headless runs. These are normal and expected — do not treat them as failures:
WARNING: ObjectDB instances leaked at exitERROR: Condition "..." is trueOnly the exit code matters.
This skill is a passive scan: it never rewrites project files, only regenerates caches and missing .gd.uid sidecars. To inject uid= into .tscn / .tres files themselves (and validate that they load), use godot-resource-resave, which actively rewrites those files. When new .gd files are referenced by new scenes, run this skill first so the UID cache is populated, then godot-resource-resave.