/uitoolkit
Build Unity UI Toolkit (UITK) UIs. 构建 Unity UI Toolkit(UITK)界面。
$ npx -y skills add Besty0728/Unity-Skills --skill uitoolkit --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/uitoolkit
Context preview
The summary Claude sees to decide when to auto-load this skill.
Build Unity UI Toolkit (UITK) UIs. 构建 Unity UI Toolkit(UITK)界面。
SKILL.md
uitoolkit.SKILL.mdname: unity-uitoolkit
description: Build Unity UI Toolkit (UITK) UIs. 构建 Unity UI Toolkit(UITK)界面。
Triggers
- Authoring runtime or editor UI with UI Toolkit
- Writing USS/UXML
- Wiring a UIDocument
- Binding UI to data
- Building world-space UI
- 用 UI Toolkit 编写运行时或编辑器 UI、编写 USS/UXML、接入 UIDocument、把 UI 绑定到数据源、做世界空间 UI
Unity UI Toolkit Skills
Use this module for Unity UI Toolkit only: `UXML` for structure, `USS` for styling, `UIDocument` for scene attachment, and `PanelSettings` for runtime rendering.
> **Requires Unity 2022.3+**. Do not mix this module with `ui_*` UGUI/Canvas skills. > **Localization**: Match visible UI text to the user's language. Chinese conversation -> Chinese labels/placeholders/button text. USS class names and CSS variables stay English.
Operating Mode
- **Approval**:查询类 skill(`uitk_read_file` / `uitk_find_files` / `uitk_get_panel_settings` / `uitk_list_documents` / `uitk_inspect_uxml` / `uitk_list_uss_variables` / `uitk_inspect_document` / `uitk_runtime_binding_list` / `uitk_worldspace_panel_get` / `uitk_element_reference_get`,源码标 `SkillMode.SemiAuto`)直接执行;其余文件/场景写入类(`uitk_create_*` / `uitk_write_file` / `uitk_add_*` / `uitk_modify_element` / `uitk_runtime_binding_add` / `uitk_uxml_upgrade` / `uitk_worldspace_panel_create` 等,标 `SkillMode.FullAuto`)需用户 grant,grant 后服务端一步执行返结果。
- **Auto / Bypass**:未被禁列表拦截的 skill 直接执行。
- 本模块**含 Delete 类 skill**:`uitk_delete_file`、`uitk_remove_element`、`uitk_remove_uss_rule` 标记为 `SkillOperation.Delete`,被 `IsForbiddenInSemi` 静态拦截 —— 仅 **Bypass** 模式或加入 **Allowlist** 才能调用。
- **Asset 重导行为**:所有写文件/删文件 skill 通过 `AssetDatabase.ImportAsset(path)` 对单个 USS/UXML 资产单独触发导入,**不会**调 `AssetDatabase.Refresh()` 触发全项目扫描;批量创建依次单独 Import。但 USS/UXML 是 ScriptedImporter 类型,Import 仍会重建依赖此资产的 PanelSettings/UIDocument 引用,触发 IMGUI 检查器刷新与场景视图重绘。
**DO NOT** (common hallucinations):
- `uitoolkit_create_button` / `uitoolkit_create_label` do not exist -> use `uitk_add_element`
- `uitoolkit_set_style` does not exist -> use `uitk_add_uss_rule`, `uitk_remove_uss_rule`, or `uitk_modify_element`
- `uitoolkit_create_canvas` does not exist -> UI Toolkit uses `UIDocument`, not Canvas
- `uitk_*` and `ui_*` are different systems. Do not mix UI Toolkit structure/styling assumptions into UGUI workflows
- USS is **not full CSS**. `display:grid`, `box-shadow`, `calc()`, `@media`, `::before`, `z-index`, and gradients are unsupported
- `binding-path` (on `uitk_add_element` / `uitk_modify_element`) is the **old SerializedObject** editor binding. It is not runtime data binding -> use `uitk_runtime_binding_add` for that
- Do not add a `PanelRenderer` through `component_add`; it needs world-space setup -> use `uitk_worldspace_panel_create`
**Routing**:
- For UGUI Canvas/Button/Text/Image -> use the `ui` module
- For XR world-space Canvas conversion -> use `xr_setup_ui_canvas`
- For generated starter layouts -> use `uitk_create_from_template`
- For attaching an existing UXML to a scene object -> use `uitk_create_document` or `uitk_set_document`
Skills
File Skills
| Skill | Use | Key parameters | |-------|-----|----------------| | `uitk_create_uss` | Create USS file | `savePath`, `content?` | | `uitk_create_uxml` | Create UXML file | `savePath`, `content?`, `ussPath?` | | `uitk_read_file` | Read USS/UXML content | `filePath` | | `uitk_write_file` | Overwrite file content | `filePath`, `content` | | `uitk_delete_file` | Delete USS/UXML file | `filePath` | | `uitk_find_files` | Search files by name/path | `type?`, `folder?`, `filter?`, `limit?` | | `uitk_create_batch` | Create 2+ files in one call | `items` |
Scene Skills
| Skill | Use | Key parameters | |-------|-----|----------------| | `uitk_create_document` | Create `UIDocument` GameObject | `name`, `uxmlPath?`, `panelSettingsPath?`, `sortOrder?`, `parentName?`/`parentInstanceId?`/`parentPath?` | | `uitk_set_document` | Change UIDocument asset bindings | `name`/`instanceId`, `uxmlPath?`, `panelSettingsPath?` | | `uitk_create_panel_settings` | Create PanelSettings asset | `savePath`, `scaleMode`, `referenceResolutionX/Y`, Unity 6 world-space options | | `uitk_get_panel_settings` | Read PanelSettings values | `assetPath` | | `uitk_set_panel_settings` | Update PanelSettings selectively | `assetPath`, changed fields only | | `uitk_list_documents` | List scene UIDocuments | none | | `uitk_inspect_document` | Inspect live VisualElement tree | `name`/`instanceId`/`path`, `depth` |
UXML Structure Skills
| Skill | Use | Key parameters | |-------|-----|----------------| | `uitk_add_element` | Add a child element | `filePath`, `elementType`, `parentName?`, `elementName?`, `text?`, `classes?` | | `uitk_remove_element` | Remove by `name` | `filePath`, `elementName` | | `uitk_modify_element` | Change attributes/classes/text | `filePath`, `elementName`, `text?`, `classes?`, `style?`, `newName?`, `bindingPath?`, custom attribute fields | | `uitk_clone_element` | Duplicate an element subtree | `filePath`, `elementName`, `newName?` | | `uitk_inspect_uxml` | Parse UXML hierarchy | `filePath`, `depth?` |
USS Style Skills
| Skill | Use | Key parameters | |-------|-----|----------------| | `uitk_add_uss_rule` | Add or replace selector rule | `filePath`, `selector`, `properties` | | `uitk_remove_uss_rule` | Remove selector rule | `filePath`, `selector` | | `uitk_list_uss_variables` | Inspect design tokens / `var()` usage | `filePath` |
Template and CodeGen Skills
| Skill | Use | Key parameters | |-------|-----|----------------| | `uitk_create_from_template` | Generate paired UXML+USS | `template`, `savePath`, `name?` | | `uitk_create_editor_window` | Generate EditorWindow script | `savePath`, `className`, `uxmlPath?`, `ussPath?`, `menuPath?` | | `uitk_create_runtime_ui` | Generate runtime MonoBehaviour query scaffold | `savePath`, `className`, `elementQueries?` |
Supported starter templates include `menu`, `hud`, `dialog`, `settings`, `inventory`, `list`, `tab-view`, `toolbar`, `card`, and `notificatio
Read more
name: unity-uitoolkit description: Build Unity UI Toolkit (UITK) UIs. 构建 Unity UI Toolkit(UITK)界面。
Triggers
- Authoring runtime or editor UI with UI Toolkit
- Writing USS/UXML
- Wiring a UIDocument
- Binding UI to data
- Building world-space UI
- 用 UI Toolkit 编写运行时或编辑器 UI、编写 USS/UXML、接入 UIDocument、把 UI 绑定到数据源、做世界空间 UI
Unity UI Toolkit Skills
Use this module for Unity UI Toolkit only: `UXML` for structure, `USS` for styling, `UIDocument` for scene attachment, and `PanelSettings` for runtime rendering.
> **Requires Unity 2022.3+**. Do not mix this module with `ui_*` UGUI/Canvas skills. > **Localization**: Match visible UI text to the user's language. Chinese conversation -> Chinese labels/placeholders/button text. USS class names and CSS variables stay English.
Operating Mode
- **Approval**:查询类 skill(`uitk_read_file` / `uitk_find_files` / `uitk_get_panel_settings` / `uitk_list_documents` / `uitk_inspect_uxml` / `uitk_list_uss_variables` / `uitk_inspect_document` / `uitk_runtime_binding_list` / `uitk_worldspace_panel_get` / `uitk_element_reference_get`,源码标 `SkillMode.SemiAuto`)直接执行;其余文件/场景写入类(`uitk_create_*` / `uitk_write_file` / `uitk_add_*` / `uitk_modify_element` / `uitk_runtime_binding_add` / `uitk_uxml_upgrade` / `uitk_worldspace_panel_create` 等,标 `SkillMode.FullAuto`)需用户 grant,grant 后服务端一步执行返结果。
- **Auto / Bypass**:未被禁列表拦截的 skill 直接执行。
- 本模块**含 Delete 类 skill**:`uitk_delete_file`、`uitk_remove_element`、`uitk_remove_uss_rule` 标记为 `SkillOperation.Delete`,被 `IsForbiddenInSemi` 静态拦截 —— 仅 **Bypass** 模式或加入 **Allowlist** 才能调用。
- **Asset 重导行为**:所有写文件/删文件 skill 通过 `AssetDatabase.ImportAsset(path)` 对单个 USS/UXML 资产单独触发导入,**不会**调 `AssetDatabase.Refresh()` 触发全项目扫描;批量创建依次单独 Import。但 USS/UXML 是 ScriptedImporter 类型,Import 仍会重建依赖此资产的 PanelSettings/UIDocument 引用,触发 IMGUI 检查器刷新与场景视图重绘。
**DO NOT** (common hallucinations):
- `uitoolkit_create_button` / `uitoolkit_create_label` do not exist -> use `uitk_add_element`
- `uitoolkit_set_style` does not exist -> use `uitk_add_uss_rule`, `uitk_remove_uss_rule`, or `uitk_modify_element`
- `uitoolkit_create_canvas` does not exist -> UI Toolkit uses `UIDocument`, not Canvas
- `uitk_*` and `ui_*` are different systems. Do not mix UI Toolkit structure/styling assumptions into UGUI workflows
- USS is **not full CSS**. `display:grid`, `box-shadow`, `calc()`, `@media`, `::before`, `z-index`, and gradients are unsupported
- `binding-path` (on `uitk_add_element` / `uitk_modify_element`) is the **old SerializedObject** editor binding. It is not runtime data binding -> use `uitk_runtime_binding_add` for that
- Do not add a `PanelRenderer` through `component_add`; it needs world-space setup -> use `uitk_worldspace_panel_create`
**Routing**:
- For UGUI Canvas/Button/Text/Image -> use the `ui` module
- For XR world-space Canvas conversion -> use `xr_setup_ui_canvas`
- For generated starter layouts -> use `uitk_create_from_template`
- For attaching an existing UXML to a scene object -> use `uitk_create_document` or `uitk_set_document`
Skills
File Skills
| Skill | Use | Key parameters | |-------|-----|----------------| | `uitk_create_uss` | Create USS file | `savePath`, `content?` | | `uitk_create_uxml` | Create UXML file | `savePath`, `content?`, `ussPath?` | | `uitk_read_file` | Read USS/UXML content | `filePath` | | `uitk_write_file` | Overwrite file content | `filePath`, `content` | | `uitk_delete_file` | Delete USS/UXML file | `filePath` | | `uitk_find_files` | Search files by name/path | `type?`, `folder?`, `filter?`, `limit?` | | `uitk_create_batch` | Create 2+ files in one call | `items` |
Scene Skills
| Skill | Use | Key parameters | |-------|-----|----------------| | `uitk_create_document` | Create `UIDocument` GameObject | `name`, `uxmlPath?`, `panelSettingsPath?`, `sortOrder?`, `parentName?`/`parentInstanceId?`/`parentPath?` | | `uitk_set_document` | Change UIDocument asset bindings | `name`/`instanceId`, `uxmlPath?`, `panelSettingsPath?` | | `uitk_create_panel_settings` | Create PanelSettings asset | `savePath`, `scaleMode`, `referenceResolutionX/Y`, Unity 6 world-space options | | `uitk_get_panel_settings` | Read PanelSettings values | `assetPath` | | `uitk_set_panel_settings` | Update PanelSettings selectively | `assetPath`, changed fields only | | `uitk_list_documents` | List scene UIDocuments | none | | `uitk_inspect_document` | Inspect live VisualElement tree | `name`/`instanceId`/`path`, `depth` |
UXML Structure Skills
| Skill | Use | Key parameters | |-------|-----|----------------| | `uitk_add_element` | Add a child element | `filePath`, `elementType`, `parentName?`, `elementName?`, `text?`, `classes?` | | `uitk_remove_element` | Remove by `name` | `filePath`, `elementName` | | `uitk_modify_element` | Change attributes/classes/text | `filePath`, `elementName`, `text?`, `classes?`, `style?`, `newName?`, `bindingPath?`, custom attribute fields | | `uitk_clone_element` | Duplicate an element subtree | `filePath`, `elementName`, `newName?` | | `uitk_inspect_uxml` | Parse UXML hierarchy | `filePath`, `depth?` |
USS Style Skills
| Skill | Use | Key parameters | |-------|-----|----------------| | `uitk_add_uss_rule` | Add or replace selector rule | `filePath`, `selector`, `properties` | | `uitk_remove_uss_rule` | Remove selector rule | `filePath`, `selector` | | `uitk_list_uss_variables` | Inspect design tokens / `var()` usage | `filePath` |
Template and CodeGen Skills
| Skill | Use | Key parameters | |-------|-----|----------------| | `uitk_create_from_template` | Generate paired UXML+USS | `template`, `savePath`, `name?` | | `uitk_create_editor_window` | Generate EditorWindow script | `savePath`, `className`, `uxmlPath?`, `ussPath?`, `menuPath?` | | `uitk_create_runtime_ui` | Generate runtime MonoBehaviour query scaffold | `savePath`, `className`, `elementQueries?` |
Supported starter templates include `menu`, `hud`, `dialog`, `settings`, `inventory`, `list`, `tab-view`, `toolbar`, `card`, and `notificatio
REST API-based AI-driven Unity Editor Automation Engine Let AI control Unity scenes directly through Skills 🎉 We are now indexed by DeepWiki! Got questions? Check out the AI-generated docs → The current official maintenance baseline is Unity 2022.3+.
Other skills on unity-skills.
- /addressables-design
Source-anchored design rules for Unity Addressables 1.22.3/2.9.1. 为 Unity Addressables 1.22.3/2.9.1 提供源码锚定的设计规则。
Open skill - /adr
Record Unity architecture decisions (ADR) with rationale. 记录 Unity 架构决策(ADR)与理由。
Open skill - /animator
Edit Unity Animator Controllers and drive runtime parameters. 编辑 Unity Animator Controller 并驱动运行时参数。
Open skill - /architecture
Advise on Unity gameplay and system architecture. 为 Unity 游戏与系统架构提供建议。
Open skill - /asmdef
Advise on Unity assembly definitions (asmdef). 为 Unity 程序集定义(asmdef)提供建议。
Open skill - /asset
Manage Unity AssetDatabase operations. 管理 Unity AssetDatabase 操作。
Open skill

