PromptUGUI skill

PromptUGUI gives agents a concise XML language for Unity interfaces and a set of skills so they build uGUI from text.

  • 93 ★ on the repository
  • Last commit
  • Apache-2.0
Skill

Extended access

Why this level

  • The agent creates and edits interface files, sprites and C# code in a Unity project.
  • Installation pulls packages from git and NuGet, and auto translation sends text to an external model.
All reasons and checks

heerozh/promptugui

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/promptugui

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The agent creates and edits interface files, sprites and C# code in a Unity project.
  • Installation pulls packages from git and NuGet, and auto translation sends text to an external model.

This is third-party code. Review the repository files before installing.

What it does

PromptUGUI is a UI framework for Unity 2022.3 and newer, including Unity 6, built for code agents. Interfaces are described in `.ui.xml` files, sprites in a `.pxl` text format in the spirit of X PixMap and GIMP, and a runtime parser turns them into a uGUI hierarchy. Edits apply at once, with no restart. The `.claude/skills/` folder holds skills for the agent: `authoring-promptugui-xml` for layout, `authoring-promptugui-pxl` for drawing sprites, `scripting-promptugui-csharp` for C# code and `using-promptugui-addressables` for loading resources. With them the agent builds buttons, lists, tabs, carousels and Markdown text, offset animations and localization without an image generator.

Who it is for. Unity developers who hand interface layout to Claude Code or Codex and want a finished result with no asset slicing.

Good fit when

  • An agent should build a menu with tabs, a list and cards and the result must show at once.
  • Pixel-style icons and borders must be drawn as text without an image model.
  • The interface should adapt to screen size and work with a gamepad.
  • Interface strings and code strings must be translated automatically with context.

Not a fit when

  • The project uses UI Toolkit: PromptUGUI builds a uGUI hierarchy.
  • The Unity version is below 2022.3.
  • You need a framework outside Unity.

Example request

Build a main menu in PromptUGUI with Play, Settings and Shop tabs and save it as main.ui.xml.

Limitations

Unity 2022.3 or newer, the DotNet SDK 10, NuGetForUnity, R3 and LitMotion are required, plus UniTask on Unity 2022.3. The package installs from a git URL through Package Manager, and the skill folders are copied into the agent skills directory by hand. Automatic string translation sends text to an OpenAI-compatible model. The agent finds icons from public sets better when names are consistent, for example with a Font Awesome folder as a SpriteSet Folder. The docs promise hot reload of edits, but the interface still has to be checked visually in the Unity editor.

How to disable. Remove the package through Package Manager and the `authoring-promptugui-*`, `scripting-promptugui-csharp` and `using-promptugui-addressables` folders from the skills directory.

FAQ

How do I install PromptUGUI through Claude Code?

Ask the agent to fetch `install_for_claude.md` from the repository with `curl` and follow its steps in the Unity project.

How do I install it manually?

Add the package in Package Manager from `https://github.com/heerozh/PromptUGUI.git`, install the dependencies and copy the skill folders from `.claude/skills/` into the project skills directory.

Where do skills go for Codex?

In `<project root>/.agents/skills/`. The files follow the open Agent Skills specification and suit other platforms too.

Is an image model needed?

No. Sprites are described as text in the `.pxl` format and the agent draws them itself.

How does localization work?

The framework extracts interface text and strings from `UI.Tr()`, sends them with context to an OpenAI-compatible model and takes the author notes on inaccurate translations into account.

Discussion

No questions or reviews yet.

Skills

A plugin for building game UI in the browser without an engine: layout, TypeScript code and export to Unity.

PluginExtended access131Repository stars

A skill and CLI for agents: UI without the templated look, 25 commands, rule-based anti-slop checks and a 0 to 100 quality score

SkillExtended access452Repository stars

A prompt-as-code design system for Codex, Cursor and Claude Code: style catalogs, layouts, blocks and personal UI rules.

SkillExtended access230Repository stars
Official

An MCP server and plugin to build UI with the agent: curated design systems, UI prompts and layout variations

MCP serverExtended access2.2KRepository stars

Game UI Design Workflow skills give Cursor rules for approving game screens and handing their graphics over to an engine.

SkillExtended access430Repository stars

The building-ui skill opens an editable UI mock: you change it directly, then the agent implements it with TDD.

PluginExtended access82Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialRepository starsMain difference
PromptUGUI (this card)no93
Unity Skillsno1,244official Unity skills; PromptUGUI adds its own UI description language and parser
UnitySkillsno1,936a skill set for the Unity editor; PromptUGUI focuses on laying out uGUI from text

README in short

The repository has a WebGL demo whose interface was built entirely by a code agent, including borders and icons. Package upgrade and installation are described in the Install / Upgrade section.

README badge

Original SKILL.md

---
name: authoring-promptugui-xml
description: Use when authoring or editing PromptUGUI `.ui.xml` files (XML-driven uGUI for Unity 6+) —
If a task involves any XML-to-UI related content, it is highly likely to be based on this Skill.
---

# Authoring PromptUGUI `.ui.xml`

PromptUGUI is a Unity 6+ package that turns compact XML files into runtime uGUI hierarchies. The description file is **pure structure + named handles** — no logic, no data binding expressions. All event/data wiring happens C#-side via `Get<T>(id)` and R3 `Observable<T>`; see the **scripting-promptugui-csharp** skill for that side.

This skill covers everything you need to write or edit a `.ui.xml` correctly. Read top-to-bottom once; afterwards the **Quick Reference** at the end is enough.

## Validation & feedback loop (run after every write)

Every `.ui.xml` write MUST be verified before reporting the work done. Three steps, in order — each catches a different layer of mistake:

### 1. Full validate CLI for every `.ui.xml` (catches semantic mistakes XSD can't express)

```
dotnet run --project Library/PackageCache/com.promptugui.core@<hash>/.lint/UIXmlLint -- <path/to/your.ui.xml>
dotnet run --project Library/PackageCache/com.promptugui.core@<hash>/.lint/UIXmlLint -- Assets/   # 整个目录递归
```

- **Local / embedded packages have no `PackageCache` copy.** The `Library/PackageCache/com.promptugui.core@<hash>/…` path only exists when
  PromptUGUI is resolved from a registry. If `Packages/manifest.json` pins itwith a `file:` path (local / embedded package — common in symlinked or
  monorepo checkouts), there is no PackageCache copy; the `.lint/UIXmlLint` project (and the `Runtime/Core/Lint/` rule source) live at that `file:`
  source instead. Resolve the real base from the manifest: grep com.promptugui.core Packages/manifest.json # e.g. "file:../../PromptUGUI"
  dotnet run --project /.lint/UIXmlLint -- <path/to/your.ui.xml>
- No Unity required — pure .NET, runs anywhere `dotnet` is installed.
- **Inside Unity, the same lint is a menu: `Tools › PromptUGUI › Lint All UI XML`** (via MCP: `execute_menu_item("Tools/PromptUGUI/Lint All UI XML")`, then `read_console`). It lints every `.ui.xml` under `Assets/`, one Console line per finding (same `file:line: [CODE] …` spelling, the asset as context), warnings for rule findings and errors for what `UI.Open()` would throw on. Prefer it when a Unity instance is open: it resolves `<Import src>` through the **Addressables** settings and reads the **common libraries** straight from `PromptUGUISettings`, so it reaches the expanded pass where the CLI would need `--src-root`.
- The CLI merges the common libraries too — it finds the `PromptUGUISettings` asset under `Assets/` by itself (or takes `--settings <file.asset>` / `--commons <src>[@<as>]`), and `--src-root <dir>` tells it the folder short Addressables addresses / `UseResourcesResolver(root)` keys are relative to. A src it cannot resolve skips that file's expanded pass with a note (never a false `PUI-EXPAND`); the summary counts how many files that was.
- Surfaces context-dependent rules that XSD can't easily express, e.g. **`anchor` / `margin` on a direct child of `<VStack>` / `<HStack>` / `<Grid>`** (`PUI-LAYOUT-ANCHOR` / `PUI-LAYOUT-MARGIN`), or a bare `state-*` trigger with no `<Btn>` / `<Tab>` / `<Toggle>` ancestor (`PUI-STATE-NO-SOURCE`). Unity logs these as warnings (so `UI.Open()` doesn't break), but the CLI promotes them to errors with non-zero exit code so they don't slip through.
- Exit 0 = clean. Exit 1 = at least one parse error or rule violation; STOP and fix before reporting done.
- Rule code lives in `Library/PackageCache/com.promptugui.core@<hash>/Runtime/Core/Lint/` and is shared with `ScreenInstantiator`'s warning path — same logic, one source of truth.
- **Runtime warnings / errors point back at the markup too.** Anything Unity logs about a node — a lint rule at `UI.Open()`, a sprite that failed to resolve, an `FxImage` blur / glow kernel warning, a hard `ParseException` — ends with a second line `  at <Tag id='x'> src:line (via src:line)`, the same `src:line` spelling the CLI prints (`src` is the resolver key / `LoadDocument` label, not a filesystem path; a node inside a Template body names the template's declaration line, `via` the invocation). Read it from `read_console` to find what to edit; clicking the Console entry pings the GameObject in the Hierarchy.

### 3. Unity MCP live feedback

XSD catches structural errors and a couple of identity constraints — element/attribute names, attribute patterns (`<Icon name>`), and **duplicate `id=` within the same Screen / Template body** (via `xs:unique`). Unity still catches the rest — parser semantic errors (anchor/size conflicts, missing `ref=`, Template namespace clashes), runtime hot-reload errors.

After every `.ui.xml` write:

```
mcp__UnityMCP__refresh_unity(compile="request", mode="force")
mcp__UnityMCP__read_console(action="get", types=["error","warning"])
# Notice: this is a CoplayDev/unity-mcp, user may use official unity mcp.
```

**If MCP for Unity is unavailable** (call fails / no Unity instance): Note that the Unity MCP connection is prone to disconnection; therefore, we must first take the following steps:

Report a problem