html-to-ugui

html-to-ugui is a skill for Codex from Alex-Rachel/TEngine. It costs 75 tokens per session (768 once invoked), scanned A, original, MIT.

A pipeline for turning HTML interface prototypes into Unity UGUI Prefabs, which are reusable Unity interface objects. It uses browser-rendered layout data to preserve positions, images, text, controls, and device-adaptation intentions.

In plain words
What is it for?
Use it to generate Unity interfaces from natural-language requirements or HTML, bake layouts into JSON, import images as Sprites, and create interfaces that adapt to PC, mobile, and tablet screens.
Why use it?
It connects web-style prototypes with maintainable Unity UI instead of leaving the design as a static screenshot. It also records layout information for different screen sizes.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions Codex.

Good fit Use it to generate Unity interfaces from natural-language requirements or HTML, bake layouts into JSON, import images as Sprites, and create interfaces that adapt to PC, mobile, and tablet screens.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alex-rachel/tengine/html-to-ugui
About the project

TEngine is a Unity framework for building games, providing modules for asynchronous work, hot updates, asset management, configuration tables, and user interfaces. It is for Unity developers and teams making commercial projects across desktop, mobile, web, and WeChat Mini Game targets, with catalogue skills supporting its AI-assisted development workflow.

Alex-Rachel/TEngine · 2,387 stars · on GitHub

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.

Any agent
npx skills add Alex-Rachel/TEngine --skill html-to-ugui
Clone the repo
git clone --depth 1 https://github.com/Alex-Rachel/TEngine

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for html-to-ugui

README.md
[![agentmods](https://agentmods.dev/badge/skills/alex-rachel/tengine/html-to-ugui/github.svg)](https://agentmods.dev/skills/alex-rachel/tengine/html-to-ugui)
Your own site
<a href="https://agentmods.dev/skills/alex-rachel/tengine/html-to-ugui"><img src="https://agentmods.dev/badge/skills/alex-rachel/tengine/html-to-ugui/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for html-to-ugui

Your own site · 80×15
<a href="https://agentmods.dev/skills/alex-rachel/tengine/html-to-ugui"><img src="https://agentmods.dev/badge/skills/alex-rachel/tengine/html-to-ugui.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 768 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00075 $0.00768
Opus 5.5 $0.00030 $0.00307
Sonnet 5.5 $0.00015 $0.00154
Haiku 4.5 $0.00007 $0.00077

Measured 1mo ago against content hash 0b080f546301, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

html-to-ugui 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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/bake_html_to_json.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

UnityProject/.codex/skills/html-to-ugui/SKILL.md · 37 lines

What it actually says

HTML 到 UGUI

输入

确认 UI 目标、设计分辨率、本地 HTML/图片/字体、配置资源和明确的输出 Prefab 路径。 先读 UI-DSL,涉及兼容性再读 JSON 和 控件。 不是任意网页转换器:不执行用户脚本,不联网拉取资源,不把 CSS 字体文件自动变为 TMP 字体。

执行

  1. HTML 只有一个命名根;需要生成的节点声明 type/name。图片只用 image/div,适配意图优先显式。
  2. 从 Unity 项目运行 python .codex/scripts/workflow.py ui bake path/to/input.html --width 1920 --height 1080。
  3. 烘焙等待字体和图片,保存 JSON 与浏览器截图到 runs;缺失必需图片失败。检查零值、层级和文字,不只检查 JSON 存在。
  4. 读取 unity-cli,执行 ui preview --json <ui.json> --config <Assets/...asset> --prefab <Assets/...prefab>。
  5. 展示 Prefab 覆盖、图片复制/importer 变更及输入文件列表。明确确认后 approve(--high-risk)再 ui apply。
  6. 查询 tengine_validate_assets 并运行相关 EditMode/PlayMode 测试。PC/mobile/pad 截图和人工视觉验收分别记录。

CLI tengine_bake_ugui 与窗口共用 HtmlToUGUIBakeService。自动化在 PreviewScene 生成,不保存当前场景。 同路径重跑保存现有 Prefab GUID;这不保证手工修改的内容或任意组件 fileID 会保留,覆盖前必须说明。 预览返回每张图片的内容哈希、覆盖状态及 importer 前后设置。保存的是生成根节点,不包含临时 Canvas; 按返回的 canvasIntegration 配置宿主 CanvasScaler,并验证实际框架 Canvas 下的效果。 窗口交互仍可指定当前 Canvas,不能把窗口操作当作隔离自动化。 v1 保留固定坐标;v2 使用 anchor/layoutHint。safeArea 当前只转为拉伸意图,不生成运行时安全区组件,须在框架运行环境验收。

失败与交付

缺图、无 TMP 默认字体、路径越界、同级重名、输出冲突在预检失败;不生成“看似成功”的残缺 Prefab。 默认文字模式为 TMP;只有用户明确选择 UGUI Text 时才在 ui preview 加 --legacy-text,该选择写入审批,不自动降级。 写入中断先检查已报告路径、GUID 和实际资源,不自动重试或回滚整个工程。 输出包含 HTML/JSON、截图、Prefab 路径/GUID、节点/图片统计、问题列表和验证报告。 浏览器截图不证明 Unity 视觉正确;Editor 不连接时 Prefab、字体匹配和设备适配验收标 blocked。

Files

What ships with it

5 files 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. 1mo ago Changed · -90 lines · -75 tokens per session 0b080f546301
  2. 1mo ago First seen · 127 lines · 150 tokens per session scan A 84dfabe6342d

Subscribe to this mod's changes

html-to-ugui is a skill published in the GitHub repository Alex-Rachel/TEngine (2,387 stars, last pushed 5d ago), licensed MIT. It adds 75 tokens to every session and 768 once invoked, about $0.0003 per session on Opus 5.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

et-code

ET framework C# code authoring and review workflow. Use when creating or modifying Entity, Component, System, Helper, message handlers, package dependencies, assemblies, module analyzer boundaries, C# file placement, .meta handling, ECS layering, or component contract logic in WOW/ET packages.

FlameskyDexive/Legends-Of-Heroes · 61 tokens

fantasy-net

This guide applies to development and code review for Fantasy / Fantasy.Net / Fantasy.Unity written in C#. Use it when a task involves Fantasy server code or Unity client code using Fantasy, ECS entities/components/systems, scenes and subscenes, FTask, network handlers/messages/protocols, Address or Roaming routing…

qq362946/Fantasy · 157 tokens

script-execute

Compiles and runs C# in the Unity Editor (Roslyn): plain statements with the last expression as the result, or a full class with a static method. See the skill body for the modes, usings/include and Unity object parameters.

IvanMurzak/Unity-MCP · 53 tokens

godot-csharp

Use C#/.NET in Godot 4.7: partial classes extending nodes, the PascalCase lifecycle (Ready/Process/PhysicsProcess), [Export] fields, [Signal] delegates as C# events, type-safe node lookup, and calling between C# and GDScript. Use when writing Godot game code in C# (.cs files, .csproj), needing the Godot .NET build…

gamedev-skills/awesome-gamedev-agent-skills · 108 tokens

unity-csharp-scripting

Write Unity 6.3 LTS C# gameplay scripts: the MonoBehaviour lifecycle (Awake/OnEnable/Start/Update/FixedUpdate/LateUpdate), GameObject and component access, coroutines, and Inspector serialization. Use when creating or editing .cs scripts in a Unity project, or when the user mentions MonoBehaviour, Start/Update…

gamedev-skills/awesome-gamedev-agent-skills · 92 tokens

script-delete

Delete one or more .cs script files from disk, refresh the AssetDatabase, and wait for Unity compilation to settle before delivering the final result via the request's requestId. Pair with 'script-read' to inspect files before deletion.

IvanMurzak/Unity-MCP · 52 tokens