webui-dev

webui-dev is a skill for Claude Code, Codex from Cooperzheng/ue-dev-playbook. It costs 86 tokens per session (1,339 once invoked), scanned A, original, MIT.

A skill for building HTML game interfaces that run inside Unreal Engine 5’s embedded browser. It defines how the page receives game data and sends player actions back to the engine.

In plain words
What is it for?
Creating, editing, or reviewing HTML files in Content/WebUI/, such as shops or other in-game screens that communicate with Unreal Engine.
Why use it?
It prevents mismatched message names, file layouts, and data formats between JavaScript and Unreal Engine. It also supports browser testing with temporary mock data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Creating, editing, or reviewing HTML files in Content/WebUI/, such as shops or other in-game screens that communicate with Unreal Engine.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cooperzheng/ue-dev-playbook/webui-dev
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 Cooperzheng/ue-dev-playbook --skill webui-dev
Clone the repo
git clone --depth 1 https://github.com/Cooperzheng/ue-dev-playbook

Made for: Claude Code, 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 webui-dev

README.md
[![agentmods](https://agentmods.dev/badge/skills/cooperzheng/ue-dev-playbook/webui-dev.svg)](https://agentmods.dev/skills/cooperzheng/ue-dev-playbook/webui-dev)
Your own site
<a href="https://agentmods.dev/skills/cooperzheng/ue-dev-playbook/webui-dev"><img src="https://agentmods.dev/badge/skills/cooperzheng/ue-dev-playbook/webui-dev.svg" alt="Measured on agentmods" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,339 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.
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.00086 $0.01339
Opus 5 $0.00043 $0.00669
Sonnet 5 $0.00017 $0.00268
Haiku 4.5 $0.00009 $0.00134

Measured 7d ago against content hash 5fb5b824f8f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

webui-dev 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 7d ago.

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.

skills/webui-dev/SKILL.md · 161 lines

How it starts

The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WebUI Development

本项目的游戏内 UI 运行在 UE5 内嵌 CEF 浏览器中,通过 JSON 与游戏引擎双向通信。

通信模式

UE → JS(游戏推数据到页面):

window.onXxx = function(jsonStr) {
    var data = JSON.parse(jsonStr);
    // 渲染界面
};

JS → UE(页面发操作给游戏):

// 每个页面顶部必须定义此函数
function sendToUE(action, data) {
    if (window.ue && window.ue.bridge) {
        window.ue.bridge.postmessage(action, JSON.stringify(data || {}));
    }
}

// 使用
sendToUE("shop.buyItem", { itemId: "rope", count: 1 });

注意:CEF 将 UObject 方法绑定到 JS 时,方法名会转为全小写。C++ 侧是 PostMessage,JS 侧必须写 postmessage。写成 PostMessage 会静默失败(不报错,但消息不会到达 C++)。

规则

  1. 每个界面是独立的单 HTML 文件,内联 CSS 和 JS,不依赖外部框架或其他页面
  2. 数据接收用 window.onXxx(jsonStr),操作发送用 sendToUE(action, data)
  3. 动作名加页面前缀:"页面名.动作"(如 shop.buyItempharmacy.purchase
  4. 关闭界面统一用 sendToUE("close"),所有页面一样
  5. UE 未实现的数据用 MOCK 占位,让页面能在浏览器中独立运行:
    // MOCK:独立调试用,UE接入后删除
    window.onXxx(JSON.stringify({ mock data here }));
    
    MOCK 清理规则:功能接入 UE 并验收通过后,必须删除所有 MOCK 代码(尤其是 setTimeout 触发的 MOCK 回调)。残留的 MOCK 会在运行时产生虚假行为,且难以排查——因为日志中不会有对应的 C++ 调用记录。
  6. 文件放在 Content/WebUI/ 下按功能分目录,命名用小写中划线
  7. C++ 侧函数名是 PostMessage,但绑定到 JS 后调用名会映射为小写;因此 JS 必须使用 window.ue.bridge.postmessage(...)(全小写),禁止写 PostMessage

接口清单

每个页面代码末尾必须输出 @INTERFACE_LIST HTML 注释,格式:

<!--
@INTERFACE_LIST
页面文件:目录/xxx.html
页面说明:一句话描述

[打开方式]
- 游戏内触发条件:{什么时候打开}
- 打开时传入数据:window.onXxx(jsonStr),格式:{ 字段: 类型 }
- 关闭方式:sendToUE("close")

[UE → JS]
- window.onXxx(jsonStr)
  触发时机:{何时调用}
  数据格式:{ 字段: 类型 }

[JS → UE]
- sendToUE("页面名.动作", { 字段: 类型 })
  触发时机:{用户做了什么}
  期望UE响应:{UE做什么,完成后调哪个 window.onXxx}
-->

C++ 桥接层架构

UE5 WebUI 桥接层的标准实现:

C++ 侧(发送数据到 JS):

// 在 WebUIWidget 子类中
void UMyWidget::SendDataToPage(const FMyData& Data)
{
    FString JsonStr = /* 序列化 Data 为 JSON */;
    SendToJS(TEXT("onDataReceived"), JsonStr);
}

C++ 侧(接收 JS 消息):

void UMyWidget::OnWebAction(const FString& Action, const FString& JsonData)
{
    if (Action == TEXT("shop.buyItem"))
    {
        // 解析 JsonData,执行游戏逻辑
    }
}

Read the full file on GitHub · 161 lines

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. 7d ago First seen · 161 lines · 86 tokens per session scan A 5fb5b824f8f2

Subscribe to this mod's changes

webui-dev is a skill published in the GitHub repository Cooperzheng/ue-dev-playbook (4 stars, last pushed 5mo ago), licensed MIT. It adds 86 tokens to every session and 1,339 once invoked, about $0.0004 per session on Opus 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-31.

Related

Other skills, from other repositories

worker-visualizer

A real-time data/particle/simulation visualizer whose heavy compute runs in a Web Worker (off the main thread), optionally sharing memory with the UI via SharedArrayBuffer, and renders to a canvas at 60fps. Produced as a single self-contained index.html. Use when the brief asks for a "web worker", "simulation"…

nexu-io/open-design · 123 tokens

react-three-fiber

React Three Fiber 3D renderer for json-render. Use when working with @json-render/react-three-fiber, building 3D scenes from JSON specs, rendering meshes/lights/models/environments, or integrating Three.js with json-render catalogs.

vercel-labs/json-render · 54 tokens

matterjs

Use when implementing 2D physics interactions with Matter.js, including Engine/World setup, Render/Runner configuration, adding bodies and constraints, and scroll/interaction-friendly canvas scenes.

MengTo/Skills · 39 tokens

vgpu

Build, debug, test, and optimize WebGPU projects using vgpu, its CLI, or @vgpu packages. Use for vgpu API questions, WGSL workflows, browser or Node rendering, integrations, testing, and performance work.

vercel-labs/vgpu · 51 tokens

threejs-game-director

Entrypoint for building, upgrading, and finishing Three.js browser games. Routes work across the sibling threejs- skills for gameplay, graphics, UI, 3D/image/audio asset generation, debugging, and release. Use for build-a-game, upgrade, polish, premium, AAA, high-fidelity, showcase, from-scratch, endless runner…

majidmanzarpour/threejs-game-skills · 86 tokens

build-game-map-editor

Build, extend, or audit production-linked browser map editors for Three.js and isometric games. Use when Codex needs to create a private director view, derive a versioned editor document from authored placements, add outliner, layer, selection, drag, snap, inspector, or camera controls, expose enemy aggro, leash, or…

MengTo/Skills · 111 tokens