AI agents
UI Toolbox is AI Aware: a coding agent in your project can find the right control, read its page and write UXML, USS and C# that follow the toolbox rules. The package has three files for agents, and a menu item that sets them up.
Video tutorial: AI agents. All videos: Video tutorials.
The files
| File | What it does |
|---|---|
Assets/UIToolbox/llms.txt |
The index of the documentation: one line for each page, with what the control does. The docs build writes it, so it is always current. |
Assets/UIToolbox/AGENTS.md |
The rules that one control page does not show: UXML, theme variables, C# in a screen, performance, input and how to check the work. |
Assets/UIToolbox/AI/ui-toolbox/SKILL.md |
A skill for Claude Code. It tells the agent the steps to build one screen: read the rules, pick the controls from the index, read their pages, write the files and check the Console. |
How to set up the agents
- Select Tools > UI Toolbox > Set Up AI Agents.
- If the skill is already in the project and you changed it, a dialog asks whether to replace it. Select Keep to leave your version.
- Read the Console. It lists the files that the menu item wrote.
The menu item writes two things in the folder of your project (the folder that has Assets):
.claude/skills/ui-toolbox/SKILL.md: the skill, with the path of the package in place of the placeholder. The paths are right when you move the package.AGENTS.md: a block between<!-- UI Toolbox -->and<!-- /UI Toolbox -->with two lines that point the agent to theAGENTS.mdandllms.txtof the package. The menu item makes the file when it does not exist, and keeps your text when it does. A second run replaces the block and never adds another.
Commit both files with the project, so every person on the team gets the same agent setup.
Which agent reads which file
| Agent | What it reads |
|---|---|
| Claude Code | The skill in .claude/skills/ui-toolbox. It starts when you ask for UI Toolkit, UXML, a HUD, a menu or a window, or when you name the skill. |
| Codex, Cursor, GitHub Copilot and other agents | AGENTS.md in the project folder, which points to the package's AGENTS.md and llms.txt. |
To use the files without the menu item, tell the agent to read Assets/UIToolbox/AGENTS.md and Assets/UIToolbox/llms.txt.
A sample prompt
Use the ui-toolbox skill. Make a scene SurvivalHud with a survival HUD:
health and stamina StatBars bottom left, a Hotbar with six slots bottom
center, a CompassBar at the top, a Minimap top right, and an
ObjectiveTracker on the right with two quests.
The agent reads the pages of StatBar, Hotbar, CompassBar, Minimap and ObjectiveTracker, writes the UXML, the USS and a controller, adds a UIDocument to the scene, and reads the Console for errors.
How to check the result
- Let Unity compile. The Console must show no errors from the new files.
- Open the scene and press Play.
- Ask the agent to read the Console again after each change. An agent with a Unity MCP or command line tool can do this by itself.