Roblox UI with ScreenGui and PlayerGui: ResetOnSpawn, UDim2 scale and offset, UIListLayout flex, safe areas, StyleSheet, gamepad selection and touch controls. Use for Roblox HUDs, shops or settings menus, or UI that clips on phones, resets on respawn or loses controller focus. Load `game-ui-ux` too. Not for input mapping (`input-systems`) or purchase checks (`roblox-networking`).
Ships in gamedev. 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.
Build editable Roblox interfaces that keep the experience's visual language and work on every
supported device. This skill owns the Roblox Instances and APIs; game-ui-ux owns the design
rules, so load both for menu and HUD work.
ScreenGuis, UI modules, fonts, colors, icon
family, spacing, corners, strokes, animation timing, naming, and any StyleSheet/StyleLink
tokens. Capture two viewports (screen_capture over Studio MCP, or ask the user for
screenshots). Extend that language.StarterGui is the authored template; Roblox clones it into
each PlayerGui. Decide per ScreenGui whether it survives respawn (ResetOnSpawn = false) and
never keep references to a destroyed clone.UDim2 scale for placement, bounded offsets for components,
matching AnchorPoints, layouts, padding, and size constraints. Design an explicit narrow
arrangement instead of shrinking the desktop panel.CoreUISafeInsets (the ScreenInsets
default) and away from the touch movement and jump controls; allow for TV overscan.Activated for buttons, explicit
selected states, and a reachable gamepad path. Bind screen actions only while the screen owns
them.GuiService.ReducedMotionEnabled, and cancel tweens and connections on close.rojo build <project>.project.json -o out.rbxlx must
succeed for Rojo projects. Live, with the Studio MCP server connected: start play, open the
screen from execute_luau on the Client datamodel, print GuiService.SelectedObject and the
AbsoluteSize of the root and scroll canvas, then screen_capture; Studio's built-in
rbx-device-simulator-lua skill (through the skill tool) switches device presets for the
viewport matrix. Without MCP, ask the user to check the matrix in
references/responsive-layout.md with Device Simulator and Controller Emulator and report
clipping, overlap, focus path, and respawn behavior.StarterGui
└── InventoryGui (ScreenGui; ResetOnSpawn = false)
├── Root (Frame)
│ ├── Header
│ ├── Content
│ │ ├── CategoryList
│ │ ├── ItemGrid (ScrollingFrame)
│ │ └── DetailsPanel
│ └── Footer
└── InventoryController (LocalScript)
ReplicatedStorage
└── UI
├── Components
└── Theme
Names describe roles, not colors or positions. Repeated cells are templates or components; the shell stays visible in Explorer.
-- Authored on ItemGrid (ScrollingFrame):
-- AutomaticCanvasSize = Enum.AutomaticSize.Y, CanvasSize = UDim2.fromOffset(0, 0)
-- Children: UIPadding + UIGridLayout
local grid = itemGrid.UIGridLayout
local projectBreakpoint = 700 -- where this composition stops being usable, not a device name
local function applyComposition()
local narrow = root.AbsoluteSize.X < projectBreakpoint
categoryList.UIListLayout.FillDirection = if narrow
then Enum.FillDirection.Horizontal
else Enum.FillDirection.Vertical
categoryList.Size = if narrow then UDim2.new(1, 0, 0, 40) else UDim2.new(0, 148, 1, 0)
itemGrid.Position = if narrow then UDim2.fromOffset(0, 52) else UDim2.fromOffset(164, 0)
itemGrid.Size = if narrow then UDim2.new(1, 0, 1, -52) else UDim2.new(0.58, -164, 1, 0)
detailsPanel.Visible = not narrow -- narrow screens open details as a separate state
local width = itemGrid.AbsoluteSize.X
local columns = if width < 520 then 2 elseif width < 820 then 3 else 4
local gap = 12
local usable = width - itemGrid.UIPadding.PaddingLeft.Offset
- itemGrid.UIPadding.PaddingRight.Offset - gap * (columns - 1)
grid.CellSize = UDim2.fromOffset(math.floor(usable / columns), 112)
grid.CellPadding = UDim2.fromOffset(gap, gap)
end
root:GetPropertyChangedSignal("AbsoluteSize"):Connect(applyComposition)
applyComposition()
UIListLayout for one-dimensional flow (with flex for shared space), UIGridLayout for uniform
cells, UITableLayout only for real tables. AutomaticSize fits content; AutomaticCanvasSize
fits scroll content. Bound extremes with UISizeConstraint, UIAspectRatioConstraint or
UITextSizeConstraint rather than one global UIScale. In a styled project, a StyleQuery can
switch rules at a size breakpoint without a resize script.
local GuiService = game:GetService("GuiService")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local function usesDirectionalFocus(): boolean
local preferred = UserInputService.PreferredInput
return preferred == Enum.PreferredInput.Gamepad
or preferred == Enum.PreferredInput.MicroGamepad
end
local function focusFirstItem()
task.spawn(function()
RunService.RenderStepped:Wait() -- the target must be rendered and selectable
if root.Visible and usesDirectionalFocus() then
GuiService.SelectedObject = firstItemButton
end
end)
end
local function openInventory()
root.Visible = true
focusFirstItem()
end
local function closeInventory()
GuiService.SelectedObject = nil
root.Visible = false
end
-- Owned by the screen lifecycle; disconnect on teardown.
local inputConnection = UserInputService:GetPropertyChangedSignal("PreferredInput"):Connect(function()
if root.Visible and GuiService.SelectedObject == nil then focusFirstItem() end
end)
firstItemButton.Activated:Connect(function()
selectItem(firstItemButton:GetAttribute("ItemId"))
end)
Choose input-dependent UI from UserInputService.PreferredInput, which follows the player's
primary device. TouchEnabled and GamepadEnabled are capabilities (a touch laptop reports
touch), and GetLastInputType() flips on every stray input. Set NextSelection* where automatic
navigation is ambiguous (grids, sidebars, modals). A modal traps focus with
SelectionGroup = true plus SelectionBehavior* set to Stop, and restores a sensible selection
on close. If the default selection adornment overwhelms the design, give it a project-owned
SelectionImageObject; do not remove focus feedback.
local TweenService = game:GetService("TweenService")
local GuiService = game:GetService("GuiService")
local fade = TweenInfo.new(0.14, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local activeTween: Tween? = nil
local function setPanelVisible(visible: boolean)
if activeTween then activeTween:Cancel(); activeTween = nil end
local target = if visible then 0 else 1
panel.Visible = true -- panel is a CanvasGroup
if GuiService.ReducedMotionEnabled then
panel.GroupTransparency = target
panel.Visible = visible
return
end
local tween = TweenService:Create(panel, fade, { GroupTransparency = target })
activeTween = tween
tween.Completed:Once(function(state)
if state == Enum.PlaybackState.Completed and not visible then panel.Visible = false end
end)
tween:Play()
end
Animate the panel once, not every descendant, and cancel the previous tween so a fast open and close cannot leave the panel invisible but interactive.
StyleRules, not per-instance properties. With no system in place, define a compact token set
(a token StyleSheet or module) instead of improvising per component.Frame. Avoid card-on-card shells,
universal pills, arbitrary gradients, glows, neon outlines, heavy transparency or blur, oversized
headings, meaningless icons, and huge empty panels.PreferredInput.| Symptom | Likely cause | Remedy |
|---|---|---|
| UI disappears or duplicates after respawn | wrong ResetOnSpawn policy or stale clone | choose the policy; reacquire from PlayerGui; clean old bindings |
| phone layout clips | desktop offsets or one global scale used as layout | narrow composition, layouts, bounds, Device Simulator checks |
| content under the topbar or notch | insets ignored or ScreenInsets = None | CoreUISafeInsets for interactive UI; bleed only decoration |
| scroll ends early | fixed CanvasSize | AutomaticCanvasSize or the layout's AbsoluteContentSize |
| controller gets stuck or escapes a modal | no entry selection or bad neighbor graph | set SelectedObject; define edges; SelectionGroup with Stop |
| panel invisible but still blocks clicks | interrupted tween left Visible = true | cancel the previous tween; hide on Completed |
| UI looks generated | decoration substituted for hierarchy | remove effects; align, reduce nesting, fix density and roles |
| Explorer shows only one script | whole interface built at runtime | author the shell as named Instances |
| connection or tween count keeps rising | screen rebinds without cleanup | own connections per screen; disconnect and cancel on teardown |
references/responsive-layout.md when a screen must adapt across viewports or a layout
defect appears: layout primitives, flex, insets, density, and the required viewport matrix.references/input-navigation.md when implementing gamepad or touch focus, modals,
ContextActionService or Input Action bindings, or motion preferences.assets/inventory-quality-test.project.json with Rojo when you need an editable Instance
fixture for layout review: rojo build assets/inventory-quality-test.project.json -o inventory-test.rbxlx
from the skill directory. It is a test baseline, not a style to ship.game-ui-ux: information hierarchy, screen flow, accessibility, and design rules.input-systems: gameplay action mapping and device switching.roblox-networking: server-authoritative requests started from UI.roblox-studio-workflow: Explorer-first editing and Studio verification.Last verified: 2026-11-11.
StyleQuery and enhanced styling reached full release in May 2026; styling transitions are also
fully released.Enum.PreferredInput values: KeyboardAndMouse, Gamepad, Touch, MicroGamepad (a gamepad
without a thumbstick, such as a TV remote).GuiBase2d.SelectionGroup and SelectionBehaviorUp/Down/Left/Right are the property-based way
to contain navigation. GuiService:AddSelectionParent() and AddSelectionTuple() still exist
and were not marked deprecated in the API reference on the verification date..md to its Creator Hub URL, or start from
https://create.roblox.com/docs/llms.txt.Sources: https://create.roblox.com/docs/ui/on-screen-containers,
https://create.roblox.com/docs/ui/position-and-size,
https://create.roblox.com/docs/ui/size-modifiers,
https://create.roblox.com/docs/reference/engine/enums/PreferredInput,
https://create.roblox.com/docs/reference/engine/classes/GuiService,
https://create.roblox.com/docs/assistant/skills (built-in Studio skills),
https://devforum.roblox.com/t/full-release-stylequery-more-styling-features/4566519.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/gamedev:roblox-uifrom gamedev
npx claudepluginhub cirobarone78/games-skill --plugin gamedev80 skills in this plugin
/ai-behavior-trees-utility-aiEngine-neutral behavior tree and utility AI code for NPCs in any language: Blackboard, reactive composites, decorators and response-curve scoring. Use when an enemy keeps chasing after losing sight, restarts its action every frame or flip-flops between choices. Not for FSMs, steering or pathfinding (`game-ai`) or Unreal BT, EQS and StateTree (`unreal-behavior-trees`).
/audio-designEngine-neutral game audio technique: bus layout, volume sliders in decibels, loudness, ducking music under dialogue, adaptive music and SFX variation, with Godot, Unity and FMOD/Wwise mappings. Use when mixing a game, making music react to combat, fixing repetitive footsteps or beat sync, or a mix that clips or pumps. Not for the Godot audio API (`godot-audio`).
/bevy-ecsBuilds and debugs Bevy 0.20 games in Rust: components, Query and Commands systems, schedules, States, observers and headless tests. Use when Cargo.toml depends on bevy, on a B0001 query-conflict panic, or pre-0.20 code (EventReader, SpriteBundle). Not for engine-neutral AI, generation, physics or shaders (`game-ai`, `procedural-gen`, `physics-tuning`, `shader-programming`).
/camera-systemsBuilds and tunes game cameras, engine-neutral with Godot and Cinemachine 3 mappings: 2D follow with deadzone and look-ahead, third-person orbit, first-person look and split-screen. Use when the camera lags, jitters while following, shows past the level edge, clips through walls or changes with frame rate. Not for shake (`game-feel`) or physics timestep jitter (`physics-tuning`).
/card-gameDesigns card games and deckbuilders in any engine: cards as data with one effect interpreter, deck zones, a trigger stack and seeded shuffles. Use for a Slay the Spire- or Balatro-like or a TCG, or cards that duplicate or streaky shuffles. Pair with the engine skill for card data and hand UI (`godot-resources`, `godot-ui-control`, `unity-scriptableobjects`). Not for grid crawlers (`roguelike`).
/create-game-assetsPlans, generates or sources, and validates consistent game art: style guides, sprites, pixel art, tilesets, icons and textures, with QA and licence records. Use when making or AI-generating game art, fixing fake transparency, or checking Steam AI disclosure. Not for engine import (`godot-tilemap`, `godot-animation`, `unity-tilemap-2d`), UI layout (`game-ui-ux`) or sound (`audio-design`).