Unity UI Toolkit

A guide for building Unity game interfaces with UI Toolkit, using UXML for structure, USS for appearance, and C# for behavior.

In plain words
What is it for?
Use it when creating Unity editor windows or in-game interfaces with buttons, text fields, lists, layouts, themes, animations, or custom controls.
Why use it?
It helps keep interface layout, styling, and code organized while avoiding common mistakes with controls, events, and data connections.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/dev-gom/claude-code-marketplace/unity-uitoolkit
Any agent
npx skills add Dev-GOM/claude-code-marketplace --skill unity-uitoolkit
Clone the repo
git clone --depth 1 https://github.com/Dev-GOM/claude-code-marketplace

Made for: Claude Code, Codex.

Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 658 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00039 $0.00658
Opus 5 $0.00019 $0.00329
Sonnet 5 $0.00008 $0.00132
Haiku 4.5 $0.00004 $0.00066

Measured 2d ago against content hash 0df613e2f98e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Unity UI Toolkit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/unity-dev-toolkit/skills/unity-uitoolkit/SKILL.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Unity UI Toolkit

Assists with Unity UI Toolkit development including UXML markup, USS styling, C# VisualElement API, and modern UI patterns.

What This Skill Helps With

UXML Structure

  • Proper element hierarchy and naming conventions
  • Common controls: TextField, Button, Toggle, Slider, ObjectField, ListView
  • Layout containers: VisualElement, ScrollView, Foldout, TwoPaneSplitView
  • Data-driven UI with templates and bindings

USS Styling

  • Class-based styling and selectors
  • Flexbox layout (flex-direction, justify-content, align-items)
  • USS variables and dark theme optimization
  • Pseudo-classes (:hover, :active, :disabled)
  • Transitions and animations

C# VisualElement API

  • Query API: rootElement.Q<Button>("my-button")
  • Event handling: .clicked += and .RegisterValueChangedCallback()
  • Dynamic UI creation with constructors
  • Data binding with Bind() and SerializedObject

Best Practices

  • UXML for structure, USS for styling, C# for logic
  • Name elements for Query API access
  • Use classes for styling, not inline styles
  • Cache VisualElement references in fields
  • Proper event cleanup in OnDestroy()

Common Patterns

Editor Window Setup:

public void CreateGUI() {
    var visualTree = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("path/to.uxml");
    visualTree.CloneTree(rootVisualElement);

    var button = rootVisualElement.Q<Button>("my-button");
    button.clicked += OnButtonClick;
}

USS Class Toggle:

element.AddToClassList("active");
element.RemoveFromClassList("active");
element.ToggleInClassList("active");

Data Binding:

var so = new SerializedObject(target);
rootVisualElement.Bind(so);

Unity Version Requirements

  • Unity 2021.2+ for runtime UI Toolkit
  • Unity 2019.4+ for editor-only UI Toolkit (limited features)

See ui-toolkit-reference.md for complete API documentation.

When to Use vs Other Components

Use this Skill when: Building UI Toolkit interfaces, writing UXML/USS, or manipulating VisualElements in C#

Read the full file on GitHub · 87 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 87 lines · 39 tokens per session scan A 0df613e2f98e

Subscribe to this mod's changes

Unity UI Toolkit is a skill published in the GitHub repository Dev-GOM/claude-code-marketplace (97 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 39 tokens to every session and 658 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

loading-assets

Use this skill when loading assets in Phaser 4. Covers the Loader plugin, loading images, spritesheets, atlases, audio, JSON, tilemaps, bitmap fonts, and tracking load progress. Triggers on: preload, this.load, asset loading, spritesheet, atlas, load progress.

phaserjs/phaser · 63 tokens

2d-games

2D game development principles. Sprites, tilemaps, physics, camera.

vudovn/ag-kit · 20 tokens

soundclaw

Control Spotify playback, search music, and return shareable music links.

iamlukethedev/Claw3D · 18 tokens

sprite-gen

Generate clean 2D game sprites and animation atlases with a component-row pipeline: base identity, numeric sprite-request SSoT, per-state layout guides, image-gen row strips, chroma-key alpha cleanup, connected-component frame extraction, cell-based atlas composition, QA reports, and runtime manifest framelayout. Its…

aldegad/sprite-gen · 291 tokens

skeleton

Edit skeleton bone transforms/hierarchy, retargeting modes, curve metadata, blend profiles, bone constraints, and learn constraints from animations (VibeUE SkeletonService). Socket CRUD, bone enumeration, physics-asset, and material/LOD inspection are owned by the engine SkeletalMeshTools. Use when the user asks to…

kevinpbuckley/VibeUE · 99 tokens

animation-montage

Create and manipulate Animation Montages — sections, slots, segments, branching points, notifies, and blend settings (AnimMontageService). Use when the user asks to create a montage (from an animation or empty), add or link montage sections, set up slots/segments, add branching points, or adjust montage blend timing.

kevinpbuckley/VibeUE · 71 tokens