MCPInstall

godot-ui-theming

Expert blueprint for UI themes using Theme resources, StyleBoxes, custom fonts, and theme overrides for consistent visual styling. Covers StyleBoxFlat/Texture, theme inheritance, dynamic theme switching, and font variations. Use when implementing consistent UI styling OR supporting multiple themes. Keywords Theme, StyleBox, StyleBoxFlat, addthemeoverride, font, theme inheritance, dark mode.

Installs
623
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/thedivergentai/game-dev-agentic-skills --skill godot-ui-theming
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads godot-ui-theming automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

UI Theming

Theme resources, StyleBox styling, font management, and override system define consistent UI visual identity.

Available Scripts

global_theme_manager.gd

Expert theme manager with dynamic switching, theme variants, and fallback handling.

ui_scale_manager.gd

Runtime theme switching and DPI/Resolution scale management.

theme_swapper.gd

Dynamic Dark/Light mode implementation using cascading theme root propagation.

danger_button_assignment.gd

Expert use of theme_type_variation for semantic UI styling without scene duplication.

dynamic_stylebox_color.gd

Safe runtime StyleBox modification. Demonstrates the critical duplicate() pattern for isolated overrides.

procedural_theme_safe.gd

Reliable theming for generated UI elements using NOTIFICATION_THEME_CHANGED.

custom_chart_drawing.gd

Pattern for reading active Theme properties (colors, fonts) in custom _draw() logic.

theme_isolation.gd

Ensuring HUD consistency by isolating nodes from parent themes and referencing Project Defaults.

pulsating_ui_theme.gd

Animating UI styles via Tweens. Targets StyleBox properties directly after duplication.

crisp_ui_scaler.gd

High-quality resolution-independent scaling using content_scale_factor to maintain font crispness.

memory_safe_custom_drawing.gd

Fixing the "disappearing stylebox" bug by caching resources at the class level for the RenderingServer.

rtl_theme_mirroring.gd

Bi-directional (RTL/LTR) UI support. Swaps theme variants dynamically based on layout direction.

focus_prompt_icon_swapper.gd

Controller/keyboard prompt icon bank swap + focus highlight panel. MANDATORY for accessibility prompt chrome.

NEVER Do in UI Theming

  • NEVER create StyleBox in _ready() for many nodes — Instantiating StyleBoxFlat.new() 100 times creates 100 unique objects. Use a Theme resource for shared heritage.
  • NEVER forget theme inheritance — Parent themes are ignored if a child has its own theme. Apply themes at the root and use theme_type_variation for specific overrides.
  • NEVER hardcode colors in StyleBox — Use theme.get_color() to maintain a single source of truth for your palette.
  • NEVER use add_theme_override for global styles — This is brittle. Define styles in a Theme resource for automatic propagation across the project.
  • NEVER modify theme resources during _draw() OR _process() — Frequent layout recalculations will severely degrade performance.
  • NEVER assign StyleBoxEmpty to focus styles without a fallback — This invisibly breaks controller/keyboard navigation [1]. Always provide a visible alternative (e.g. scale change).
  • NEVER use standard set() for theme properties — Calling node.set("font_color", red) fails. You MUST use the dedicated add_theme_color_override() API [3].
  • NEVER use expand_margin_* to increase clickable area — It only expands the VISUAL bounds. Use content_margin_* on the StyleBox or adjust the Control's size to ensure input works [5].
  • NEVER define StyleBoxes as local variables inside _draw() — They will be garbage collected before the RenderingServer can finish drawing them [7]. Store at class level.
  • NEVER duplicate scenes/themes just to change one color — Use theme_type_variation to create lightweight derived styles (e.g. "DangerButton") within the same Theme [8].
  • NEVER skip corner_radius_all on StyleBoxFlat — shorthand for uniform rounding; prefer it over four separate radius fields when all corners match.
  • NEVER confuse Theme items with Control overrides — add_theme_*_override beats Theme resource items on that node only; a child Control with its own theme still blocks parent cascade. Clear with remove_theme_*_override when swapping roots — do not leave stale overrides fighting the new Theme.

Decision Tree — Theme Ownership

GoalChooseNotes / script
App-wide lookProject Settings → GUI → ThemeAuthor in Theme editor — no per-node StyleBox tutorials here
One Control differsadd_theme_*_override on that nodeLocal only; never for global styles
Button/panel subtypetheme_type_variationSee danger_button_assignment.gd
Runtime color tweak without mutating shared Themestylebox.duplicate() then overrideSee dynamic_stylebox_color.gd

Fonts & StyleBoxes: edit via Theme editor / Project Theme. Runtime helpers: global_theme_manager.gd, theme_swapper.gd, procedural_theme_safe.gd.

Expert Theming Patterns

1. Shared-Color-Palette (The Static Pattern)

Maintain a single source of truth for UI colors accessible to both the Theme Editor and GDScript.

  • Theme Setup: In your .theme file, create a custom type called Palette and add Color items (e.g., primary, danger, accent).
  • Static Access: Use a SharedPalette class with static func get_primary() -> Color that pulls from ThemeDB.get_project_theme(). This ensures UI scripts and the visual theme never drift.

2. Theme-Type-Variations

Avoid duplicating button scenes or styleboxes for variants like "Danger" or "Ghost" styles.

  • Implementation: In the Theme Editor, create a new Type Variation. Set its Base Type to Button.
  • Inheritance: The variation inherits all properties from the base type. You only override what's different (e.g., set font_color to red for DangerButton).
  • Usage: Assign via code node.theme_type_variation = &"DangerButton" or via the Inspector dropdown.

MANDATORY: Read danger_button_assignment.gd — do not fork Button scenes for color variants.

3. Runtime StyleBox Color (duplicate first)

When a single Control needs a runtime tint, duplicate the StyleBox before mutating — shared Theme StyleBoxes must stay immutable.

MANDATORY: Read dynamic_stylebox_color.gd — never mutate a Theme StyleBox in place.

4. Runtime-Theme-Swapping (Accessibility)

Efficiently switch the visual style of the entire game for Light, Dark, or High-Contrast modes.

  • Cascading Updates: Assign a new Theme resource to the root Control node. Godot propagates this to every descendant.
  • Accessibility: Use NOTIFICATION_THEME_CHANGED to update elements that don't support automatic theming (like custom _draw() logic or RichText effects).
  • High-Contrast: Ensure High-Contrast themes use pure black/white and thicker focus outlines for low-vision accessibility.

MANDATORY: Read theme_swapper.gd — swap at the theme root; do not walk every Control assigning themes.

5. RTL / LTR Theme Mirroring

Bi-directional layouts need mirrored StyleBox / type-variation banks when direction flips — not hand-flipped anchors alone.

MANDATORY: Read rtl_theme_mirroring.gd — swap theme variants from layout direction; do not hardcode LTR margins.

6. Themed-Asset-Loading (Seasonal Variants)

Godot Themes support more than just colors and fonts—they can store textures.

  • Setup: Define UI icons as Icon items within separate Theme resources (e.g., halloween.theme, christmas.theme).
  • Swapping: Swapping the root theme resource instantly cascades the new icon textures across all buttons and panels without manual logic.

7. UI-Focus-Manager (Dynamic Controller Icons)

Standard focus styles are static. For accessibility UX, swap prompt icons by device and tween a highlight panel to get_global_rect().

MANDATORY: Read focus_prompt_icon_swapper.gd — do not paste joypad icon paths into Control scripts.

Pairs with Runtime-Theme-Swapping (Accessibility) above and theme_swapper.gd for High-Contrast roots.

8. Asset-Dependency-Audit (Draw-Call Reduction)

Ensuring UI textures are optimized for rendering performance.

  • Atlas Packing: Use AtlasTexture to crop small UI elements from a singular large sheet. This reduces VRAM state changes and minimizes draw calls [14].
  • Compression Policy:
    • 2D/Pixel Art: Use Lossless compression to avoid blurry artifacts [15].
    • UI Backgrounds: Use Lossy or Basis Universal for large illustrations to save disk space without decreasing VRAM usage [15].
  • Audit: Use ResourceLoader.get_dependencies(scene_path) to ensure no uncompressed raw assets (e.g. .png) are leaking into the final export [19].

Deep recipes (on demand)

LLM-ignorance rule: if a general agent would not know it before reading, it lives here or in scripts/ — never delete, only move.

TopicReference
StyleBox / font setuptheme-authoring-recipes.md

Reference

Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing work to a peer domain — do not preload the whole lattice.

Official Documentation

  • GUI skinning — Theme resources, StyleBoxes, and cascading skin ownership.
  • Using the theme editor — Authoring Theme assets without hand-editing every Control override.
  • Theme type variations — Variants for button/panel subtypes without duplicating whole themes.
  • Using fonts — DynamicFont / font size theming for UI readability.
  • Custom GUI controls — When themed _draw() needs theme item lookups.
  • Size and anchors — Layout that survives theme scale and DPI changes.
  • Theme — Runtime get/set for colors, constants, icons, StyleBoxes.
  • ThemeDB — Project default theme and fallback resolution.
  • Control — Theme overrides and NOTIFICATION_THEME_CHANGED.
  • StyleBox — Panel/button chrome used by most Theme skins.
  • AtlasTexture — Pack UI icons to cut draw-call churn.
  • Input — Custom cursors and joypad-driven prompt icon swaps.

Related Skills

Prerequisites

Complements

Downstream / consumers

Master

  • godot-master — Library router and mirrored module entry for UI theming.

FAQ

What does the godot-ui-theming skill do?

Expert blueprint for UI themes using Theme resources, StyleBoxes, custom fonts, and theme overrides for consistent visual styling. Covers StyleBoxFlat/Texture, theme inheritance, dynamic theme switching, and font variations. Use when implementing consistent UI styling OR supporting multiple themes. Keywords Theme, StyleBox, StyleBoxFlat, addthemeoverride, font, theme inheritance, dark mode.

How do I install godot-ui-theming?

Run npx skills add https://github.com/thedivergentai/game-dev-agentic-skills --skill godot-ui-theming in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/godot-ui-theming/ (personal) or .claude/skills/godot-ui-theming/ (project).

Which AI agents can use godot-ui-theming?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is godot-ui-theming safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains godot-ui-theming?

It is published by thedivergentai in thedivergentai/game-dev-agentic-skills. It has 623 recorded installs.

More from thedivergentai/game-dev-agentic-skills

View all →

godot-master

thedivergentai/game-dev-agentic-skills

Consolidated expert library for professional Godot 4.7+ game and application development. Orchestrates 92 Domain Skills through architectural workflows, anti-pattern catalogs, performance budgets, and Server API patterns. Use when: (1) starting a new Godot project, (2) designing game or app architecture, (3) building entity/component systems, (4) debugging performance or physics issues, (5) choosing between 2D/3D approaches, (6) implementing multiplayer, (7) optimizing draw calls or script time, (8) porting between platforms, (9) migrating from 4.6 to 4.7. Primary entry point for ALL Godot development tasks. Keywords: Godot 4.7, AreaLight3D, HDR, Asset Store, godot-master.

godot-shaders-basics

thedivergentai/game-dev-agentic-skills

Expert Godot shader patterns for batch-safe hitflash, alpha-scissor foliage/dissolve, screenspace postFX, depth reconstruction, triplanar, and instance uniforms — not first-shader tutorials. Trigger on draw-call batching breaks, discard vs depth-prepass, foliage shadows, post-process quads, or world-position FX. Keywords: instance uniform, ALPHASCISSOR, hintscreentexture, hintdepthtexture, global uniform, sampler2DArray, canvasitem, spatial, post-processing.

AI & Agents691 installs

godot-2d-animation

thedivergentai/game-dev-agentic-skills

Expert patterns for 2D animation in Godot using AnimatedSprite2D and skeletal cutout rigs. Use when implementing sprite frame animations, procedural animation (squash/stretch), cutout bone hierarchies, or frame-perfect timing systems. Trigger keywords: AnimatedSprite2D, SpriteFrames, animationfinished, animationlooped, framechanged, frameprogress, setframeandprogress, cutout animation, skeletal 2D, Bone2D, procedural animation, animation state machine, advance(0).

Frontend & Design688 installs

godot-gdscript-mastery

thedivergentai/game-dev-agentic-skills

Expert GDScript landmine guidance: static typing opcodes, signal-up/call-down, %UniqueName/@onready lifecycle, Callable bind/unbind, await sequences, typed collections, and safe Dictionary iteration. Use for code review, refactoring hot paths, or project standards. Trigger keywords: statictyping, signalarchitecture, uniquenodes, @onready, classname, signalupcalldown, Callable.bind, typedcollections, awaitsequence.

godot-particles

thedivergentai/game-dev-agentic-skills

Expert blueprint for GPU particle systems (explosions, magic effects, weather, trails) using GPUParticles2D/3D, ParticleProcessMaterial, gradients, sub-emitters, and custom shaders. Use when creating VFX, environmental effects, or visual feedback. Keywords GPUParticles2D, ParticleProcessMaterial, emissionshape, colorramp, subemitter, oneshot.

Media & Creative614 installs

godot-save-load-systems

thedivergentai/game-dev-agentic-skills

Expert blueprint for save/load systems using JSON/binary serialization, PERSIST group pattern, versioning, and migration. Covers player progress, settings, game state persistence, and error recovery. Use when implementing save systems OR data persistence. Keywords save, load, JSON, FileAccess, user://, serialization, version migration, PERSIST group.

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs