Expert blueprint for responsive UI layouts using Container nodes (HBoxContainer, VBoxContainer, GridContainer, MarginContainer, ScrollContainer, HFlowContainer, SubViewportContainer). Covers size flags, anchors, split containers, virtual_list pooling, stretch_shrink previews, and dynamic layouts. Use when building adaptive interfaces OR implementing responsive menus. Keywords: Container, HBoxContainer, VBoxContainer, GridContainer, HFlowContainer, SubViewportContainer, virtual_list, stretch_shrink, size_flags, EXPAND_FILL, anchors, responsive.
npx skills add https://github.com/thedivergentai/GD-Agentic-Skills --skill godot-ui-containers
Container auto-layout, size flags, anchors, and split ratios define responsive UI systems.
| Need | Prefer | MANDATORY script |
|------|--------|------------------|
| Breakpoint shell / full-screen adaptive root | Margin + Box containers | responsive_layout_builder.gd |
| Fixed columns that change with width | GridContainer | responsive_grid.gd / responsive_inventory_grid.gd |
| Wrapping chips / tags | HFlowContainer | responsive_tag_cloud.gd |
| Thousands of scroll rows | Virtual pool (not raw children) | virtual_list.gd |
| Log/chat autoscroll | ScrollContainer | terminal_autoscroll.gd |
| 3D character/item preview in UI | SubViewportContainer | viewport_3d_preview.gd |
| Deep nesting causing layout spikes | Anchors/offsets instead | performance_anchor_layout.gd |
| Radial/wheel menus | Custom Container | custom_radial_container.gd |
| Scenario | Load | Do NOT load |
|----------|------|-------------|
| Inventory / shop grid | responsive_grid.gd / responsive_inventory_grid.gd | custom_radial_container.gd, viewport_3d_preview.gd |
| Tag cloud / chip wrap | responsive_tag_cloud.gd | Grid column scripts, virtual_list.gd |
| Thousands of log/chat rows | virtual_list.gd + terminal_autoscroll.gd | Inventory/radial/viewport scripts |
| 3D item/character preview | viewport_3d_preview.gd | Radial menu + inventory grid scripts |
| Radial / wheel menu | custom_radial_container.gd | Virtual list + tag cloud |
| Deep nesting / layout spikes | performance_anchor_layout.gd | Full responsive builder catalog |
Virtual List Pooling — recycle a small Control pool + spacer height for O(1) ScrollContainer rows.
Expert container builder with breakpoint-based responsive layouts.
Auto-adjusting GridContainer that changes column count based on available width.
Expert logic for dynamic Grid columns based on available width and item minimum size.
Safe ScrollContainer management. Handles the common "one-frame delay" bug when adding logs or chat.
High-performance 3D-in-UI setup. Uses stretch_shrink and transparent_bg for character previews.
Pattern for dynamic tab spawning, custom titles, and tab closing logic.
Wrapping item lists using HFlowContainer, essential for tag clouds and responsive menus.
Optimization architecture. Replaces deep container nesting with lightweight Anchor and Offset logic.
Expert custom container logic implementing a radial/circle layout via NOTIFICATION_SORT_CHILDREN.
Dynamic sibling reordering and animation logic for interactive UI lists.
Enforcing strict aspect ratios (e.g. 1:1, 16:9) across fluid window resizes using AspectRatioContainer.
Advanced sizing logic using SIZE_EXPAND_FILL and stretch_ratio for weighted layouts.
mouse_filter properties; strictly set to PASS or IGNORE on overlay containers to prevent them from blocking clicks to underlying buttons.ScrollContainer; strictly use Virtual List Pooling — MANDATORY read virtual_list.gd (VScrollBar hook + single spacer child) for O(1) rendering performance.AspectRatioContainer to lock proportions (e.g., 2:3 ratio) while allowing parent containers to handle scaling.position or size in a Container — Containers override child transforms during queue_sort(). Use custom_minimum_size or size_flags instead [1].size_flags for expansion — Default is SIZE_SHRINK_BEGIN. Children will stay tiny unless you set SIZE_EXPAND_FILL for responsive containers.GridContainer without setting columns — Default is 1, creating a simple vertical list. For responsive wrapping, use HFlowContainer instead [8].add_theme_constant_override("separation", value) for professional breathing room.ScrollContainer without a minimum size — Without it, the container may collapse to zero or expand infinitely, breaking the scroll mechanism.await get_tree().process_frame before setting scroll_vertical [5].SubViewportContainer to change its size — This distorts the rendered contents. Adjust margins or use stretch and stretch_shrink properties instead [2].mouse_filter on default for layered Viewports — Input events might not reach children. Use MOUSE_FILTER_PASS or STOP to ensure events drill down [6].GridContainer for responsive wrapping — Use HFlowContainer if you want items to wrap based on width. GridContainer enforces a strict column count [7].position directly inside a container — Use Tween on custom_minimum_size to smoothly "push" siblings during transitions [1].Standard pattern for local multiplayer or comparisons using HSplitContainer.
# split_screen.gd
func setup_split(v1: SubViewport, v2: SubViewport):
var hsplit = HSplitContainer.new()
var c1 = SubViewportContainer.new()
c1.stretch = true # Resize viewport to match container
c1.add_child(v1)
hsplit.add_child(c1)
# repeat for c2/v2...
High-performance list for thousands of items. MANDATORY: implement via virtual_list.gd (setup_pool + set_data) — do not paste a one-off scroll recycler inline.
Responsive cards that maintain proportions (e.g., 2:3) in any grid or flow container.
# card_grid.gd
func add_card(texture: Texture2D):
var arc = AspectRatioContainer.new()
arc.ratio = 0.66 # 2:3 proportions
arc.stretch_mode = AspectRatioContainer.STRETCH_FIT
var tr = TextureRect.new()
tr.texture = texture
tr.expand_mode = TextureRect.EXPAND_IGNORE_SIZE
tr.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
arc.add_child(tr)
grid_container.add_child(arc)
> Size-flag recipes: MANDATORY container_size_flags_pro.gd — do not paste beginner SIZE_EXPAND_FILL tutorials inline.
> LLM-ignorance rule: if a general agent would not know it before reading, it lives here or in scripts/ — never delete, only move.
| Topic | Reference |
|-------|-----------|
| Anchors, flags, separation | container-layout-recipes.md |
> Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.
@onready, and safe child rebuild loops used when building grids/tabs at runtime.separation, margins) and type variations style container chrome without hardcoding colors in layout code.custom_minimum_size / reorder feedback instead of tweening position inside Containers.Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects design system context, and structures output for better generation results.
Generate memes using the memegen.link API. Use when users request memes, want to add humor to content, or need visual aids for social media. Supports 100+ popular templates with custom text and styling.
Fix PageSpeed Insights/Lighthouse accessibility "!" errors caused by contrast audit failures (CSS filters, OKLCH/OKLAB, low opacity, gradient text, image backgrounds). Use for accessibility-driven SEO/performance debugging and remediation.
> Brand-first landing page designer — runs a brand-identity interview (colors, typography, shape language), then generates and iterates on a polished landing page via Stitch with deployment-ready HTML. Use when the user asks to create, design, or build a landing page, homepage, or marketing page and has no established visual direction. Skip when they have a design mockup, need a dashboard or app UI, are working at component level, building a multi-page app, or restyling with known design tokens — use frontend-design instead.
Audit paid-ad landing pages for message match, mobile experience, performance, accessibility, trust, forms, consent, tracking, security, and conversion friction. Use for landing-page audit, post-click experience, LP audit, conversion-rate optimization, form optimization, ad-to-page message match, redirects, blocked navigation, or requests involving private, loopback, link-local, or metadata IP destinations.
Marketing landing page and conversion-focused product page reference. Use this skill when building hero sections, feature grids, pricing pages, testimonials, CTAs, footers, navigation bars, or any public-facing marketing surface. Covers a warm, professional, developer-friendly design language (cream backgrounds, generous whitespace, pill CTAs, corner-bracket card decorations) and a complete token set, animation system, and copy-paste component snippets. NOT for product/dashboard UIs — use frontend-design-saas for those.
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices". Focuses on visual design and interaction patterns. Do NOT use for performance audits (use core-web-vitals), SEO (use seo), or comprehensive site audits (use web-quality-audit).
Comprehensive web quality audit covering performance, accessibility, SEO, and best practices. Use when asked to "audit my site", "review web quality", "run lighthouse audit", "check page quality", or "optimize my website".
Take thedivergentai/godot-ui-containers from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.