К основному содержанию
скилл Claude Code CX Codex Cursor GitHub Copilot

game-ui-ux — скилл для Claude Code: что делает и как установить

Архитектурный скилл для создания адаптивных игровых интерфейсов, стека экранов и навигации с геймпада без покадрового опроса состояния.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill game-ui-ux -a claude-code
Открыть на GitHub

Что делает game-ui-ux

Скилл задаёт движково-нейтральные правила вёрстки меню, оверлеев и HUD. Координаты в пикселях запрещены. Вместо них агент применяет якоря и контейнеры, чтобы интерфейс не разваливался при смене разрешения экрана. Сюда же входит учёт безопасной зоны дисплея для мобильных вырезов.

Поведение экранов организуется через стек. Это упрощает возврат назад и показ оверлеев. Для геймпада задаётся стартовый фокус и соседние элементы навигации. При этом показатели здоровья или счёта обновляются строго по событиям, поэтому игра не опрашивает состояние в каждом кадре.

Инструмент не создаёт конкретные узлы движка и шейдеры. Для визуальных эффектов и сочности нужен game-feel, а для нод Godot — godot-ui-control.

Какие задачи решает

  • сверстать адаптивный игровой HUD на базе якорей и контейнеров
  • настроить навигацию по меню с геймпада и клавиатуры с выделением фокуса
  • реализовать стек экранов для меню паузы и настроек
  • перевести обновление интерфейса на события вместо опроса каждый кадр
  • учесть безопасную зону экрана под вырезы дисплея

Примеры запросов агенту

  • Помоги настроить меню паузы поверх игры через стек экранов и добавь навигацию для геймпада
  • Переведи обновление полоски здоровья в HUD на события вместо проверки в каждом кадре
  • Сделай адаптивную вёрстку главного меню на якорях с учётом безопасной зоны

Как установить game-ui-ux

1Через Skills CLI (Vercel)

npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill game-ui-ux -a claude-code

2Вручную: положить файлы

~/.claude/skills/game-ui-ux/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/game-ui-ux/

Из того же набора40

Весь набор →
game-feel gamedev-skills Скилл учит агента добавлять отклик к игровым действиям: тряску камеры, стоп-кадр, твины с easing, сквош и отброс. Для случаев, когда механика работает, но ощущается ватной. Claude Code CX Codex Cursor +1 9 400установок level-design gamedev-skills Помогает спроектировать игровой уровень от блокута до плейтеста: маршруты, темп, препятствия и столкновения. Нужен при работе с whitebox, критическим путём и геймплейными комнатами. Claude Code CX Codex Cursor +1 7 500установок camera-systems gamedev-skills Рецепты для игровых камер в 2D и 3D: плавное следование, мёртвые зоны, опережение движения и обработка столкновений для Godot и Unity. Claude Code CX Codex Cursor +1 7 100установок audio-design gamedev-skills Скилл учит раскладывать игровой звук по шинам, глушить музыку под голос и собирать адаптивный саундтрек слоями. Примеры кода — на GDScript под Godot 4.7, с пометками для Unity. Claude Code CX Codex Cursor +1 7 100установок performance-optimization gamedev-skills Скилл учит искать узкое место в игре по профайлеру движка, а не по догадке, и даёт набор правок: пулы объектов, батчинг, отказ от лишних аллокаций. Claude Code CX Codex Cursor +1 7 100установок game-ai gamedev-skills Помогает проектировать логику врагов и NPC: конечные автоматы, деревья поведения, алгоритмы руления и поиск пути A*. Пригодится при сборке поведения ботов для любого движка. Claude Code CX Codex Cursor +1 7 100установок input-systems gamedev-skills Архитектура игровых управлений: отображение клавиш на действия, перекоординирование с проверкой конфликтов, поддержка клавиатуры, геймпада и сенсора, мёртвые зоны, буферизация и coyote time. Claude Code CX Codex Cursor +1 6 800установок procedural-gen gamedev-skills Генерирует уровни и таблицы лута по сиду на основе детерминированных алгоритмов. Пригодится для процедурного контента без ручной расстановки. Claude Code CX Codex Cursor +1 6 800установок

Похожие

loading-assets phaserjs Скилл подсказывает, как загружать ресурсы в Phaser 4 через Loader. Нужен при работе с preload(), спрайтами, аудио, картами и индикатором загрузки. Claude Code CX Codex Cursor +1 901установок tweens phaserjs Скилл учит ИИ-агентов анимировать свойства объектов в Phaser 4 через TweenManager, цепочки TweenChain и функцию stagger. Claude Code CX Codex Cursor +1 891установок cameras phaserjs Скилл для работы с системой камер Phaser 4: эффекты (тряска, затемнение, вспышка, панорама, зум), слежение за спрайтами, скролл и границы. Подключается к Claude Code, Cursor, Copilot и другим IDE. Claude Code CX Codex Cursor +1 873установок particles phaserjs Скилл для Claude Code, который объясняет агенту, как собрать эффекты частиц в Phaser 4: эмиттеры, зоны эмиссии, гравитационные колодцы. Пригодится, когда искры и дым надо превратить в код. Claude Code CX Codex Cursor +1 859установок physics-arcade phaserjs Скилл для работы с Arcade Physics в Phaser 4: настройка физического мира, скорость и ускорение тел, гравитация, обнаружение столкновений и перекрытий. Нужен, чтобы ИИ-помощник помогал с динамикой объектов в играх. Claude Code CX Codex Cursor +1 852установок orbit-card heygen-com Скилл для встраивания готового 10-секундного 3D-блока HyperFrames: карточка фичи облетает сферу из точек по траектории камеры из Blender. Claude Code CX Codex Cursor +1 9 800установок sdf earthtojake Скилл создаёт и проверяет SDFormat-файлы для моделей и миров, а затем помогает подготовить их к передаче в симулятор. Claude Code CX Codex Cursor +1 10 500установок urdf earthtojake Скилл помогает создавать, проверять и отлаживать описания роботов в формате URDF. Пригодится для работы со звеньями, сочленениями и геометрией. Claude Code CX Codex Cursor +1 10 400установок

Вопросы о game-ui-ux

Как установить game-ui-ux в Claude Code?

Выполните команду npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill game-ui-ux -a claude-code в терминале или добавьте файл ~/.claude/skills/game-ui-ux/SKILL.md.

Что делает скилл game-ui-ux?

Он предоставляет архитектурные шаблоны для создания игрового интерфейса: вёрстку на якорях, стек экранов, поддержку геймпада и обновление HUD по событиям.

Подходит ли game-ui-ux для добавления сочности и визуальных эффектов интерфейса?

Нет, скилл отвечает только за архитектуру и вёрстку. Для анимаций кнопок, тряски экрана и всплывающих цифр урона исходный текст рекомендует использовать game-feel.

Исходный текст

SKILL.md · Apache-2.0
---
name: game-ui-ux
description: >
  Design and build game UI/UX — HUDs, menus, and overlays — that survive every screen: anchor-
  based responsive layout, resolution/aspect scaling and safe areas, keyboard/gamepad focus
  navigation, a screen/menu state stack, and event-driven (not polled) HUD updates. Engine-
  neutral patterns that pair with the detected engine's UI skill. Use when the user mentions
  HUD, health bar, main menu, pause menu, settings screen, UI layout, anchors, UI scaling,
  aspect ratio, safe area, controller/keyboard menu navigation, or wiring UI to game state.
---

# Game UI/UX

Build HUDs and menus that stay correct on a phone, an ultrawide monitor, and a TV across a
gamepad and a mouse. This skill owns the engine-neutral UI architecture — responsive layout,
scaling, focus navigation, screen flow, and how UI talks to game state — and defers the
concrete widget API to the engine UI skill.

## When to use

- Use when building a HUD (health/ammo/score), a menu (main/pause/settings), an inventory or
  shop screen, or any overlay, and you want it to scale and navigate correctly.
- Use to fix UI that breaks at other resolutions/aspect ratios, ignores notches/safe areas,
  can't be used with a controller, or is wired to game state by per-frame polling.
- Use to structure screen flow (title → game → pause → settings) as a stack, not flag soup.

**When *not* to use:** for the engine's concrete UI nodes/components and styling, use
`godot-ui-control` or Unity UI (UGUI/UI Toolkit). For *visual* punch (button pop, damage
numbers, shake) use `game-feel`. For branching conversation UI use `dialogue-systems`. For
translating UI strings, that is localization (see `references/` and `input-systems` for
rebinding screens). For card/board layout specifics, the `card-game` genre composes this skill.

## Core workflow

1. **Pick a layout model: anchors + containers, never absolute pixels.** Anchor elements to
   edges/corners/center and let containers (rows, columns, grids) flow children. Absolute
   `(x, y)` positions break at the first new resolution.
2. **Choose a scaling strategy** for the whole UI: a reference resolution that scales to fit
   (most games), plus a policy for extra width/height on other aspect ratios (letterbox,
   expand, or anchor HUD corners outward).
3. **Respect the safe area.** Inset critical UI from screen edges so notches, rounded corners,
   and TV overscan don't clip it.
4. **Make every screen keyboard/gamepad navigable.** Set an initial focused control per screen,
   define focus order/neighbors, and show a clear focus highlight. Mouse and focus must coexist.
5. **Model screens as a stack.** Push (pause over game), pop (resume), with input + visibility
   handed to the top screen. This makes overlays and "back" trivial.
6. **Drive the HUD from events, not polling.** The HUD subscribes to `health_changed`,
   `score_changed`, etc. and updates only when they fire — it does not read game state every
   frame.
7. **Verify across screens and devices.** Resize the window, switch aspect ratios, unplug the
   mouse and navigate by gamepad only, and confirm focus, scaling, and safe-area insets. Report
   what you actually observed at which resolutions.

## Patterns

### 1. Anchors + containers, not absolute coordinates

```gdscript
# Godot 4.7. Anchor a HUD label to the TOP-LEFT; let a container flow a row of hearts.
func _ready() -> void:
    $Score.set_anchors_preset(Control.PRESET_TOP_LEFT)   # sticks to the corner at any size
    # An HBoxContainer auto-lays-out children left-to-right; never position hearts by hand.
    for i in lives:
        $Hearts.add_child(make_heart())                   # HBoxContainer spaces them for you
# Unity 6.3 LTS uGUI: set RectTransform anchors to the corner; use a HorizontalLayoutGroup.
# RIGHT: anchors + layout groups. WRONG: rect.anchoredPosition = new Vector2(640, 360) (1080p-only).
```

### 2. Scale to a reference resolution (one UI, many screens)

```text
# Godot 4.7 — Project Settings > Display > Window > Stretch:
#   Mode = "canvas_items", Aspect = "expand", reference size e.g. 1920x1080.
#   UI scales to the window; "expand" reveals extra space you anchor HUD corners into.
# Unity 6.3 LTS — Canvas > CanvasScaler:
#   UI Scale Mode = "Scale With Screen Size", Reference Resolution = 1920x1080,
#   Match = 0.5 (blend width/height) — pick 1.0 if your HUD is height-critical.
# Unity 6.3 LTS — UI Toolkit: the same three settings live on the PanelSettings asset
#   (Scale Mode = Scale With Screen Size, Reference Resolution, Screen Match Mode/Match).
```

### 3. Safe-area inset for notches / overscan

```gdscript
# Godot 4.7. Inset a MarginContainer to the OS safe rect. Only Android and iOS report a real
# safe area; elsewhere Godot returns the screen's usable rect, so desktop margins are ~0.
func _apply_safe_area() -> void:
    var safe := Rect2(DisplayServer.get_display_safe_area())           # screen pixels
    var win := Rect2(Rect2i(DisplayServer.window_get_position(), DisplayServer.window_get_size()))
    var inner := safe.intersection(win)
    var to_ui := get_viewport_rect().size / win.size    # window pixels -> UI units under stretch
    $Margin.add_theme_constant_override("margin_left", int((inner.position.x - win.position.x) * to_ui.x))
    $Margin.add_theme_constant_override("margin_top", int((inner.position.y - win.position.y) * to_ui.y))
    $Margin.add_theme_constant_override("margin_right", int((win.end.x - inner.end.x) * to_ui.x))
    $Margin.add_theme_constant_override("margin_bottom", int((win.end.y - inner.end.y) * to_ui.y))
# Unity 6.3 LTS: read Screen.safeArea (Rect in pixels) and set a panel's anchorMin/anchorMax to
# safeArea.position / (position+size) normalized by Screen.width/height.
```

### 4. Gamepad/keyboard focus (UI is unusable on a controller without it)

```gdscript
# Godot 4.7. Give each screen a default focus; Godot guesses neighbors from layout, so set
# them only where its guess is wrong (grids, wrap-around, skipping a disabled row).
func _on_screen_shown() -> void:
    $PlayButton.grab_focus()                               # always focus SOMETHING on open
    $PlayButton.focus_neighbor_bottom = $SettingsButton.get_path()
    $SettingsButton.focus_neighbor_top = $PlayButton.get_path()
# Unity 6.3 LTS uGUI: EventSystem.SetSelectedGameObject(playButton) on enable; set each Selectable's
# Navigation (Explicit or Automatic). With the Input System package, the EventSystem needs an
# InputSystemUIInputModule, not the old StandaloneInputModule. UI Toolkit: call Focus() on the
# first focusable element. RIGHT: a control is focused on open. WRONG: nothing
# selected → the gamepad does nothing and the player is stuck.
```

### 5. Event-driven HUD (decouple UI from game logic)

```gdscript
# RIGHT: HUD reacts to a signal; it updates only when health actually changes.
func _ready() -> void:
    player.health_changed.connect(_on_health_changed)     # emitted by gameplay
func _on_health_changed(current: int, max_health: int) -> void:
    $HealthBar.value = float(current) / max_health
# WRONG: func _process(dt): $HealthBar.value = player.hp / player.max_hp  # polls every frame,
# couples UI to the player's internals, and runs work even when nothing changed.
```

## Pitfalls

- **Absolute pixel positions / a single design resolution.** Looks right on your monitor, broken
  everywhere else. Anchor to edges/center and flow with containers.
- **No aspect-ratio policy.** 16:9-only layouts crop or letterbox badly on ultrawide and phones.
  Decide expand vs letterbox and anchor HUD to corners that move outward.
- **Ignoring the safe area.** HUD under a notch or lost to TV overscan. Inset critical elements.
- **No initial focus / no focus neighbors.** The game is unplayable on a gamepad; players land
  on a menu with nothing selected. Always focus one control and define navigation.
- **Polling game state in `_process`/`Update`.** Couples UI to internals and wastes work. Push
  updates via signals/events.
- **Tiny fixed font sizes.** Unreadable on a TV-at-distance or a small phone. Scale text with the
  UI and offer a text-size option. Xbox Accessibility Guideline 101 sets floors of 26 px at 1080p
  on console/TV and 18 px at 1080p on PC, and asks for scaling up to 200% without losing content.
- **Menu flow as boolean flags** (`isPaused`, `inSettings`, …) becomes unmanageable. Use a
  screen stack with push/pop.
- **Hardcoded English strings baked into layout.** Translations overflow buttons. Externalize
  strings and let containers size to content (see `references/`).
- **Mouse-only or focus-only.** Support both; switching input device should not strand the user.
- **Unity uGUI menu ignores the gamepad or throws on start** after switching Active Input
  Handling to the Input System: the scene still has a `StandaloneInputModule`. Replace it with
  `InputSystemUIInputModule` (the Inspector offers a one-click swap). UI Toolkit in Unity 6 reads
  the project-wide UI actions directly and needs no module.
- **A corner-anchored uGUI element grows off-screen** when its size changes (longer translated
  text, a bigger text-size setting): its pivot was left at (0.5, 0.5), so it grows in every
  direction. Set the pivot to the anchored corner or edge as well.

## References

- For stretch/scale modes per engine, the safe-area math, a complete focus-navigation and
  screen-stack pattern, diegetic vs non-diegetic UI, accessibility (text size, contrast,
  colorblind-safe state), and localization-ready layout, read `references/layout-and-flow.md`.

## Related skills

- `godot-ui-control`, Unity UI (UGUI/UI Toolkit) — the concrete widgets, themes, and styling.
- `game-feel` — button pops, transitions, and HUD juice that ride on top of this layout.
- `dialogue-systems` — conversation/choice UI that lives inside this UI shell.
- `input-systems` — device switching, rebinding screens, and accessible controls.
- `rpg`, `card-game`, `tower-defense`, `visual-novel` — UI-heavy genres that compose this skill.

© gamedev-skills · Apache-2.0 · gamedev-skills/awesome-gamedev-agent-skills

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой