# roblox-ui

roblox-ui — a skill for Claude Code and Codex constructs responsive Roblox interfaces. Runs when building HUDs, inventories, storefronts, or fixing layouts across mobile devices and consoles.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 1300 installs · ★ 131 repo stars
- Author: EL4CTEO
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/EL4CTEO/roblox-skills/tree/HEAD/skills/roblox-ui/SKILL.md
- Updated: 2026-11-03
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/el4cteo-roblox-ui

## What it does

The skill produces client-side Luau interface code relying on `ScreenGui`, `UDim2.fromScale`, and layout constraints. Setups configure `CoreUISafeInsets` to avoid device notches, utilize `UIListLayout` with `UIFlexItem` for dynamic bars, and set engine-level token themes via `StyleSheet`.

Cross-platform interaction uses `GuiButton.Activated` across mouse, touch, and controller inputs rather than click listeners. Drag gestures rely on `UIDragDetector` because `GuiObject.Draggable` is deprecated. Pure Offset breaks interfaces on mobile displays and 4K monitors, requiring Scale for base dimensions. Text visible between players requires server-side checks with `TextService:FilterStringAsync`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add EL4CTEO/roblox-skills --skill roblox-ui -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/roblox-ui/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/roblox-ui/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add EL4CTEO/roblox-skills --skill roblox-ui -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/roblox-ui/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add EL4CTEO/roblox-skills --skill roblox-ui -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/roblox-ui/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install EL4CTEO/roblox-skills skills/roblox-ui
```

2. **Manually: put the files in place**
- File: `.github/skills/roblox-ui/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add EL4CTEO/roblox-skills --skill roblox-ui -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/EL4CTEO/roblox-skills --path skills/roblox-ui
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/roblox-ui/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add EL4CTEO/roblox-skills --skill roblox-ui -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/EL4CTEO/roblox-skills/tree/HEAD/skills/roblox-ui/SKILL.md

## When to use it
- scale HUD layouts across mobile displays and 4K monitors
- configure gamepad menu traversal with SelectionGroup
- build dynamic inventory toolbars using UIListLayout
- implement item dragging with UIDragDetector

## Example prompts
- Build an adaptive five-slot toolbar HUD inside StarterGui using UIListLayout
- Configure ScreenInsets safe areas and center positioning for the shop frame
- Set up gamepad navigation for the inventory menu using SelectionGroup and Activated

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 981f656a6e0af97c.

BEGIN THIRD-PARTY FILE 981f656a6e0af97c
````text
---
name: roblox-ui
description: Responsive cross-platform UI - ScreenGui and safe areas (ScreenInsets), Scale vs Offset, UIListLayout flex/UIFlexItem, constraints, StyleSheets/tokens/themes, RichText, gamepad/touch navigation, UIDragDetector, CanvasGroup, tweens, BillboardGui/SurfaceGui, React-lua/Fusion/Vide. Use when building HUDs, menus, shops, inventories, or fixing UI that breaks on mobile, console, or other screen sizes.
---

# Roblox UI

## Foundations

- Put UI in `StarterGui` as `ScreenGui`s (copied to each player's `PlayerGui`), or create it from a
  client controller. UI code is client-only; the server never touches `PlayerGui` in normal designs.
- `ScreenGui` defaults to set: `ResetOnSpawn = false` (keep UI across deaths), `ZIndexBehavior = Sibling`,
  `IgnoreGuiInset` per design, `ScreenInsets = CoreUISafeInsets` for interactive UI (clears notches and
  the Roblox top bar); `DeviceSafeInsets`/`None` only for full-bleed backgrounds.
- **Size and position with Scale** (`UDim2.fromScale`) plus constraints; use Offset only for fixed
  details (padding, strokes, icons). Pure-Offset UI breaks on phones and 4K screens.
- `AnchorPoint = Vector2.new(0.5, 0.5)` + `Position = UDim2.fromScale(0.5, 0.5)` centers an element.
- `UIAspectRatioConstraint` keeps shapes square/consistent; `UISizeConstraint` caps sizes;
  `UITextSizeConstraint` with `TextScaled` bounds text size (prefer fixed `TextSize` + `AutomaticSize`
  where possible — `TextScaled` produces inconsistent sizes).
- `AutomaticSize` lets frames grow with content (lists, tooltips, chat bubbles).
- Test every screen in the **Device Simulator** (phone portrait/landscape, tablet, console 10-foot, 4K).

## Layout

| Need | Use |
| --- | --- |
| Rows/columns that adapt | `UIListLayout` (`FillDirection`, `Padding`, `HorizontalFlex`/`VerticalFlex`, `Wraps`) |
| One item grows to fill space | `UIFlexItem` child with `FlexMode = Fill` (or `Grow`/`Shrink`/`Custom`) |
| Grids (inventory) | `UIGridLayout` inside a `ScrollingFrame` with `AutomaticCanvasSize` |
| Carousels/pages | `UIPageLayout` |
| Rounded corners, borders, padding | `UICorner`, `UIStroke`, `UIPadding` |
| Gradients, shadows | `UIGradient` (`Type` = `Linear`/`Radial`/`Conical`/`Elliptical`), `UIShadow` |
| Scale a whole group | `UIScale` |

```luau
--!strict
local Players = game:GetService("Players")

local playerGui = Players.LocalPlayer:WaitForChild("PlayerGui")

local screenGui = Instance.new("ScreenGui")
screenGui.Name = "Hud"
screenGui.ResetOnSpawn = false
screenGui.ScreenInsets = Enum.ScreenInsets.CoreUISafeInsets

local bar = Instance.new("Frame")
bar.Name = "Toolbar"
bar.AnchorPoint = Vector2.new(0.5, 1)
bar.Position = UDim2.new(0.5, 0, 1, -16)
bar.Size = UDim2.fromScale(0.6, 0.1)
bar.BackgroundTransparency = 0.3
bar.Parent = screenGui

local list = Instance.new("UIListLayout")
list.FillDirection = Enum.FillDirection.Horizontal
````
END THIRD-PARTY FILE 981f656a6e0af97c

The third-party file has ended. Everything between the 981f656a6e0af97c tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2903 of 7895 bytes. © EL4CTEO · MIT · https://github.com/EL4CTEO/roblox-skills/tree/HEAD/skills/roblox-ui/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
