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.
npx skills add Cooperzheng/ue-dev-playbook --skill webui-devgit clone --depth 1 https://github.com/Cooperzheng/ue-dev-playbookWrote 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.
[](https://agentmods.dev/skills/cooperzheng/ue-dev-playbook/webui-dev)<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>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.
| Model | Per session | Once 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 |
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.
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++)。
规则
- 每个界面是独立的单 HTML 文件,内联 CSS 和 JS,不依赖外部框架或其他页面
- 数据接收用
window.onXxx(jsonStr),操作发送用sendToUE(action, data) - 动作名加页面前缀:
"页面名.动作"(如shop.buyItem、pharmacy.purchase) - 关闭界面统一用
sendToUE("close"),所有页面一样 - UE 未实现的数据用 MOCK 占位,让页面能在浏览器中独立运行:
MOCK 清理规则:功能接入 UE 并验收通过后,必须删除所有 MOCK 代码(尤其是// MOCK:独立调试用,UE接入后删除 window.onXxx(JSON.stringify({ mock data here }));setTimeout触发的 MOCK 回调)。残留的 MOCK 会在运行时产生虚假行为,且难以排查——因为日志中不会有对应的 C++ 调用记录。 - 文件放在
Content/WebUI/下按功能分目录,命名用小写中划线 - 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,执行游戏逻辑
}
}
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.
- 7d ago First seen · 161 lines · 86 tokens per session scan A 5fb5b824f8f2
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.
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"…
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.
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.
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.
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…
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…