/godot-dev:godot-uifrom godot-dev
Guides building Godot UI: Control nodes, containers, themes, HUD/menus, gamepad focus, content scaling, localisation, and font handling.
Ships in godot-dev. 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.
UI is a tree of Control nodes laid out by containers and styled by one Theme. The HUD lives on
a CanvasLayer, menus are reachable by gamepad, and every string is a key.
| The situation | Read |
|---|---|
| A HUD or a menu from scratch | Start from the templates below, then reference/layout.md §1-3 |
| A centred box that is not centred; anchors, offsets, grow direction | reference/layout.md §1 |
| Which container; size flags; a spacer that pushes labels apart | reference/layout.md §2 |
| The HUD scrolls with the camera, or swallows clicks | reference/layout.md §3 |
| Ultra-wide, portrait, 4K: stretch mode and aspect | reference/layout.md §4 |
| "The pad does nothing in the menu"; focus stuck, lost or never reaching a button | reference/layout.md §5 · resources/menu_focus.gd |
| Colours, fonts, button styles, one look everywhere | reference/themes.md · templates/courier_theme.tres |
| Chinese, Japanese or Korean text shows boxes | reference/themes.md §5 |
Translations: CSV or PO, tr(), switching language, plurals | reference/localisation.md §1-4 |
| Text set from code stays in English after a switch | reference/localisation.md §1 · resources/hud.gd |
| German overflows the button; long text, wrapping, pseudolocalisation | reference/localisation.md §5 |
| Proving any of it without a window | Checking it headless below · scripts/ui_probe.py |
| Input actions, rebinding, touch | godot-input |
| Pausing the game behind the menu; changing scenes | godot-scene-flow |
| Draw order of the world below the HUD | godot-2d-rendering |
| File | What it is |
|---|---|
templates/courier_hud.tscn | HUD (CanvasLayer) > HudRoot (full-rect, ignores the mouse, hud.gd, the theme) > a margin, a top bar with the parcels count and the timer; a hidden pause menu (CenterContainer > PanelContainer > VBoxContainer with menu_focus.gd) with Resume, Options and Quit |
templates/courier_theme.tres | one default font size, button styles with a visible focus ring, a HudLabel type variation (outlined) |
resources/hud.gd | sets the parcels and timer text with tr(), rebuilds it on every locale switch, falls back to English when a key is missing |
resources/menu_focus.gd | wires focus neighbours and Tab order through a list, row or grid with wrap-around, skips disabled buttons, focuses the first (or last used) item whenever the menu is shown |
Copy templates/ and resources/ side by side into the project (the scene reaches the scripts
by ../resources/), or re-point its two ext_resource paths. Feed it from the game:
@onready var hud: Control = $HUD/HudRoot
@onready var pause_menu: Control = $HUD/HudRoot/PauseMenu
func _on_parcel_picked() -> void:
hud.parcels += 1 # the setter refreshes the label
func _process(delta: float) -> void:
hud.time_left -= delta
func open_pause_menu() -> void:
pause_menu.visible = true # menu_focus.gd grabs focus for Resume
PRESET_CENTER to an empty box
and then filling it leaves its top-left corner at the centre; set both grow directions to
both, or use a CenterContainer.custom_minimum_size, never anchors or positions.CanvasLayer; full-screen layout roots ignore the mouse.canvas_items stretch with expand aspect for a game UI that reaches the edges of
wide and tall screens; test at the base size, an ultra-wide and a portrait size.Control.grab_focus; a plain
VBoxContainer does not wrap ui_down; a neighbour pointing at a hidden control goes
nowhere. Every menu gets menu_focus.gd (or the same wiring), and focus must be drawn.tr() and rebuilds on NOTIFICATION_TRANSLATION_CHANGED, with the label's own
auto-translation off..translation files exist only after the
first --import; listing them in project.godot before that prints ERROR: lines.Layout, focus and text are all computed without rendering, so they can be checked in a headless
run. scripts/ui_probe.py writes a probe script outside the project, runs the scene and reports:
python3 scripts/ui_probe.py --project game --scene res://ui/courier_hud.tscn \
--show HudRoot/PauseMenu --sizes 1152x648,2560x1080,720x1280 --locales en,fr,ja --pseudo 0.4
| Line | Means |
|---|---|
FAIL OFFSCREEN <size> <path> | a visible control leaves the visible rect at that window size |
FAIL FOCUS_UNREACHABLE <path> | no ui_* action leads to this focusable control from the start (the whole focus graph is walked) |
FAIL FOCUS_LOST <path> <action> | that action left nothing focused |
FAIL UNTRANSLATED <locale> <path> <KEY> | a key that locale does not translate |
FAIL ENGINE ... | the scene prints ERROR: or SCRIPT ERROR: |
FOCUS_ORDER ui_down: A > B > C > A | the walk, for the record |
Exit 0 pass, 2 a check failed, 3 nothing verified (no Godot, a timeout, no sentinel), 1 usage.
--rects and --texts print every rectangle and text, for a test that asserts positions.
Run the project's --import first. A headless window is 64 x 64: with stretch disabled that is
the whole visible rect, so always pass --sizes (the default is the project's base size).
What it cannot check: how anything looks. Colours, contrast, focus-ring visibility, font sharpness and drawn overlap need a windowed run and a person.
scripts/ui_probe.py --selftest (needs GODOT_BIN) builds a project from these templates, imports
a CSV and loads a PO file, and proves: the template passes at two sizes and three locales with
pseudolocalisation; the parcels label reads Parcels: 0, Colis : 0, 荷物: 0; ui_down walks
Resume, Options, Quit and wraps; the timer's right edge stays 24 px from the visible edge at two
window shapes; and an unreachable button, a label off the screen, an untranslated key and a
missing scene each fail with exit 2.
.tscn is a string nobody
translates.--pseudo 0.4.| Need | Skill |
|---|---|
Actions, rebinding, touch, the input map the ui_* actions live in | godot-input |
| Pause, scene changes, the autoload that holds run state | godot-scene-flow |
| Draw order, 2D lights, shaders below the HUD | godot-2d-rendering |
| HUD art and icons | codex-visual |
| Running Godot headless and trusting the result | godot-verify |
reference/layout.md (opens in a new tab)reference/localisation.md (opens in a new tab)reference/themes.md (opens in a new tab)resources/hud.gd (opens in a new tab)resources/menu_focus.gd (opens in a new tab)scripts/ui_probe.py (opens in a new tab)templates/courier_hud.tscn (opens in a new tab)templates/courier_theme.tres (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
godot-ui, control-nodes, themes, localisation, gamepad-focus
Other plugins' skills for the same job
npx claudepluginhub tipoli5890/game-studio --plugin godot-dev28 skills in this plugin
/godot-2d-controllerMove a 2D character in Godot: CharacterBody2D jump, coyote time, jump buffer, slopes, one-way and moving platforms, top-down movement./godot-2d-renderingGodot 2D look: draw order, z_index and y-sort, CanvasLayer, 2D lights and shadows, canvas shaders, Parallax2D, pixel-perfect scaling./godot-2d-rigA layered 2D character into Godot: rig2d.json to Skeleton2D, Bone2D and weighted Polygon2D parts, cut-out animation, 2D IK./godot-2d-spritesSprite frames into Godot: frames.json to SpriteFrames, AnimatedSprite2D, sheet slicing, pivots, filtering and import for pixel art./godot-3d-controllerMove a 3D character in Godot: CharacterBody3D grounding, slopes and steps, third and first person, lane runner, click-to-move./godot-3d-modelsBring a glTF model into Godot: import settings, post-import script, materials, LODs, collision; audit it against a triangle and texture budget.