name: ui-toolkit-architect
description: "Generates UI Toolkit assets (UXML, USS) and C# Controllers following MVVM. Use when creating "menus", "HUDs", or "interface panels"."
version: 2.0.0
tags: []
argument-hint: panel_name='MainMenu' namespace='Game.UI'
disable-model-invocation: false
user-invocable: true
allowed-tools:
- run_command
- list_dir
- write_to_file
requirements:
unity_version: ">=6.0"
render_pipeline: "Any"
dependencies: []
context_discovery:
check_unity_version: true
check_render_pipeline: false
scan_manifest_for: []
performance_budget:
gc_alloc_per_frame: "0 bytes target in hot paths"
max_update_cost: "O(n) - profiler-guided"
tdd_first: true # ⚠️ Updated by audit v2.0.1 - needs manual test implementation
UI Toolkit Architect
Overview
Goal
When to Use
Use when defining contracts between systems
Use when implementing dependency injection
Use when creating testable code
Use when menu systems
Use when UI navigation
To create modern, scalable user interfaces using Unity's UI Toolkit. We strictly separate structure (UXML), style (USS), and logic (C# Controller/ViewModel).
Architecture: MVVM (Model-View-ViewModel)
View (UXML/USS): The layout and look.
Controller (MonoBehaviour): Binds the View elements to the ViewModel events.
ViewModel (Pure C#): Holds the state (e.g., Score, Health) and Commands.
Procedure
Generate Assets: Create {Name}.uxml and {Name}.uss in Assets/UI/{Name}/.
Generate Logic: Create {Name}Controller.cs attached to a UIDocument.
Link: Ensure the Controller knows how to find the buttons defined in UXML (Query by name).
Few-Shot Example
User: "Create a Pause Menu."
Agent:
Creates PauseMenu.uxml with "Resume" and "Quit" buttons.
Creates PauseMenu.uss with styling.
Creates PauseMenuController.cs that binds root.Q<Button>("Resume") to Time.timeScale = 1.
Best Practices
Follow the patterns and constraints documented in this skill.
Always run @context-discovery-agent before applying this skill to verify environment compatibility.
Apply TDD where applicable: write the interface contract first, then implement.
Zero GC in hot paths: cache references, avoid LINQ and
ew allocations in Update loops.
TDD Contract
⚠️ Legacy Skill — Refactor Pending
Este skill NO tiene tests automatizados aún. El siguiente boilerplate es un punto de partida.
// Escribe estos tests ANTES de implementar:
// Test 1: should [expected behavior] when [condition]
[Test]
public void UiToolkitArchitectLegacy_Should{ExpectedBehavior}_When{Condition}()
{{
// Arrange
// TODO: Setup test fixtures
// Act
// TODO: Execute system under test
// Assert
Assert.Fail("Not implemented — write test first");
}}
// Test 2: should handle [edge case]
[Test]
public void UiToolkitArchitectLegacy_ShouldHandle{EdgeCase}()
{{
// Arrange
// TODO: Setup edge case scenario
// Act
// TODO: Execute
// Assert
Assert.Fail("Not implemented");
}}
// Test 3: should throw when [invalid input]
[Test]
public void UiToolkitArchitectLegacy_ShouldThrow_When{InvalidInput}()
{{
// Arrange
var invalidInput = default;
// Act & Assert
Assert.Throws<Exception>(() => {{ /* execute */ }});
}}
Pasos para completar el TDD:
Descomenta los tests above
Implementa la funcionalidad mínima para que compile
Ejecuta los tests — deben fallar (RED)
Implementa la funcionalidad real
Verifica que los tests pasen (GREEN)
Refactorea manteniendo los tests verdes
Nota: Este skill fue marcado como tdd_first: false durante la auditoría v2.0.1. La sección TDD fue agregada automáticamente pero requiere customización manual para reflejar el comportamiento real del skill.
Related Skills
@context-discovery-agent - Verify Unity version and package compatibility before proceeding
@unified-style-guide - Naming and formatting conventions
@automated-unit-testing - TDD scaffolding for this skill's components
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: nlelouche-unity3d-antigravityskills-ui-toolkit-architect-leg3description: ---4---5---6name: ui-toolkit-architect7description: "Generates UI Toolkit assets (UXML, USS) and C# Controllers following MVVM. Use when creating "menus", "HUDs", or "interface panels"."8version: 2.0.09tags: []10argument-hint: panel_name='MainMenu' namespace='Game.UI'11disable-model-invocation: false12user-invocable: true13allowed-tools:14 - run_command15 - list_dir16 - write_to_file17requirements:18 unity_version: ">=6.0"19 render_pipeline: "Any"20 dependencies: []21context_discovery:22 check_unity_version: true23 check_render_pipeline: false24 scan_manifest_for: []25performance_budget:26 gc_alloc_per_frame: "0 bytes target in hot paths"27 max_update_cost: "O(n) - profiler-guided"28tdd_first: true # ⚠️ Updated by audit v2.0.1 - needs manual test implementation29---3031# UI Toolkit Architect3233## Overview3435## Goal3637## When to Use38- Use when defining contracts between systems39- Use when implementing dependency injection40- Use when creating testable code41- Use when menu systems42- Use when UI navigation43To create modern, scalable user interfaces using Unity's **UI Toolkit**. We strictly separate structure (UXML), style (USS), and logic (C# Controller/ViewModel).4445## Architecture: MVVM (Model-View-ViewModel)46- **View (UXML/USS)**: The layout and look.47- **Controller (MonoBehaviour)**: Binds the View elements to the ViewModel events.48- **ViewModel (Pure C#)**: Holds the state (e.g., `Score`, `Health`) and Commands.4950## Procedure511. **Generate Assets**: Create `{Name}.uxml` and `{Name}.uss` in `Assets/UI/{Name}/`.522. **Generate Logic**: Create `{Name}Controller.cs` attached to a `UIDocument`.533. **Link**: Ensure the Controller knows how to find the buttons defined in UXML (Query by name).5455## Few-Shot Example56User: "Create a Pause Menu."57Agent:581. Creates `PauseMenu.uxml` with "Resume" and "Quit" buttons.592. Creates `PauseMenu.uss` with styling.603. Creates `PauseMenuController.cs` that binds `root.Q<Button>("Resume")` to `Time.timeScale = 1`.6162## Best Practices63- Follow the patterns and constraints documented in this skill.64- Always run @context-discovery-agent before applying this skill to verify environment compatibility.65- Apply TDD where applicable: write the interface contract first, then implement.66- Zero GC in hot paths: cache references, avoid LINQ and 67ew allocations in Update loops.686970---7172## TDD Contract7374> ⚠️ **Legacy Skill — Refactor Pending**75> Este skill NO tiene tests automatizados aún. El siguiente boilerplate es un punto de partida.7677```csharp78// Escribe estos tests ANTES de implementar:7980// Test 1: should [expected behavior] when [condition]81[Test]82public void UiToolkitArchitectLegacy_Should{ExpectedBehavior}_When{Condition}()83{{84 // Arrange85 // TODO: Setup test fixtures8687 // Act88 // TODO: Execute system under test8990 // Assert91 Assert.Fail("Not implemented — write test first");92}}9394// Test 2: should handle [edge case]95[Test]96public void UiToolkitArchitectLegacy_ShouldHandle{EdgeCase}()97{{98 // Arrange99 // TODO: Setup edge case scenario100101 // Act102 // TODO: Execute103104 // Assert105 Assert.Fail("Not implemented");106}}107108// Test 3: should throw when [invalid input]109[Test]110public void UiToolkitArchitectLegacy_ShouldThrow_When{InvalidInput}()111{{112 // Arrange113 var invalidInput = default;114115 // Act & Assert116 Assert.Throws<Exception>(() => {{ /* execute */ }});117}}118```119120### Pasos para completar el TDD:1211221. **Descomenta** los tests above1232. **Implementa** la funcionalidad mínima para que compile1243. **Ejecuta** los tests — deben fallar (RED)1254. **Implementa** la funcionalidad real1265. **Verifica** que los tests pasen (GREEN)1276. **Refactorea** manteniendo los tests verdes128129---130131**Nota**: Este skill fue marcado como `tdd_first: false` durante la auditoría v2.0.1. La sección TDD fue agregada automáticamente pero requiere customización manual para reflejar el comportamiento real del skill.132133134## Related Skills135- @context-discovery-agent - Verify Unity version and package compatibility before proceeding136- @unified-style-guide - Naming and formatting conventions137- @automated-unit-testing - TDD scaffolding for this skill's components138139---140> Converted and distributed by [TomeVault](https://tomevault.io/claim/nlelouche) — claim your Tome and manage your conversions.141<!-- tomevault:4.0:skill_md:2026-04-11 -->
Run npx skillmds@latest add tomevault-io/nlelouche-unity3d-antigravityskills-ui-toolkit-architect-leg in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
--- It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.