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 majiayu000/spellbook --skill hud-interfacegit clone --depth 1 https://github.com/majiayu000/spellbookWrote 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/majiayu000/spellbook/hud-interface)<a href="https://agentmods.dev/skills/majiayu000/spellbook/hud-interface"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/hud-interface/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.
<a href="https://agentmods.dev/skills/majiayu000/spellbook/hud-interface"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/hud-interface.svg" alt="Reviewed on agentmods" width="80" 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.00241 | $0.02075 |
| Opus 5.5 | $0.00096 | $0.00830 |
| Sonnet 5.5 | $0.00048 | $0.00415 |
| Haiku 4.5 | $0.00024 | $0.00208 |
Grade A, and why
hud-interface 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 10d 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 — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.
HUD 式界面
把一个页面做成游戏 HUD 的样子。分三层,前两层任何浏览器都能用,第三层是可选增强:
| 层 | 内容 | 依赖 |
|---|---|---|
| 版式 | 斜切标签、巨型数字、导航反白块、环形文字、歪卡片、清单表、黑底栏、刻度尺、条形码、等宽小字 | hud.css,纯 CSS 和 SVG |
| 背景 | 液体大理石:域扭曲 fbm,纸底、墨线、边缘积一点强调色 | WebGL2;没有时用 CSS 渐变 |
| 玻璃 | 把一个 DOM 面板画进 WebGL 贴图,边缘折射、色散,指针下有放大镜 | HTML-in-Canvas(Chrome 实验开关);没有时面板保持普通 DOM |
文件
assets/hud.css:颜色变量(--hud-paper--hud-ink--hud-tint--hud-signal)、字体变量和全部组件类。assets/hud.js:window.Hud,包括backdrop(canvas)、glass(panel)、glassSupported()、ring(el, text, {size, font})、barcode(el, seed)、level()。没有依赖。assets/demo.html:一个机械键盘拆解台。左边是分区导航,中间是步骤卡片,右边是日期和零件清单(玻璃面板),底部是计数。右上角切换噪音档位。scripts/check.mjs:无头验收,跑默认 Chrome 和打开实验开关两种情况(截图存进--out)。
步骤
- 定内容,再套壳。先列清楚页面真正要显示什么:分区、清单、计数、正在进行的那一项。HUD 只是外壳,内容必须是真实的结构,不要为了填满版面去造装饰数据。
- 复制
hud.css和hud.js,引入字体(Barlow Condensed、JetBrains Mono、Noto Sans SC,Google Fonts;离线会退到系统字体)。从demo.html搬需要的块。 - 选一个面板做玻璃,最多一两个,一般选主清单:
Hud.glass(panel)。整页都做成玻璃会糊,也会很慢。 - 背景:放一个
<canvas class="hud-backdrop">,调用Hud.backdrop(canvas)。颜色从 CSS 变量读,改--hud-tint就能换强调色。 - 噪音档位:在
<html data-hud-level>上设置,默认quiet。loud会让色散、扫光、背景墨线都变强,带.hud-loud-only的装饰也只在非 quiet 档出现。 - 验收:
node scripts/check.mjs page.html --out dir [--glass-panel "#panel"] [--click "选择器"],全部 ✓ 才算完成,然后自己看截图。
硬规则
- 只学手法:不照搬参考作品的布局、文案、角色和标题字。
- 噪音预算:同屏只有一个强调色。
--hud-signal(红)只给 LIVE、错误、待确认这类需要警示的东西。旋转和闪烁加起来最多一处,默认是环形文字。原作者自己都说"太吵",所以默认 quiet。 - 逻辑在 DOM:玻璃面板里的按钮、焦点、选中状态都是真实元素,着色器只负责画面。不支持 HTML-in-Canvas 时,页面必须照常可用,验收第 1 组专门测这一点。
- 字要能读:玻璃的折射只出现在边缘约 5% 的宽度里,色散在 quiet 档几乎看不出。正文不要放在面板最边上。
- 触控和键盘:导航和清单行最小高度 44px,
:focus-visible有描边,当前项用aria-current或aria-pressed标出。 - 减少动态效果:
prefers-reduced-motion下,背景只画一帧,环形文字停转,过渡全部关掉。 - 手机宽度:390px 下不能横向溢出;环形文字、竖排字和侧栏的次要信息要隐藏。
HTML-in-Canvas 实测要点(Chrome 156,2026-10-27)
接口还在变,官方说明和实际实现不一致。以下以本机实测为准:
- 开启:
chrome://flags/#canvas-draw-element,命令行是--enable-blink-features=CanvasDrawElement。默认不开,普通用户看到的是退回后的 DOM 版本。 - 两种属性拼写都写上:
<canvas content="drawable" layoutsubtree>,子元素加drawable。 - WebGL 只接受不可变存储:先
texStorage2D(TEXTURE_2D, 1, RGBA8, w, h),再texElementSubImage2D(TEXTURE_2D, 0, 0, 0, el, {width, height})。直接用texElementImage2D会报 internalformat 错误;按说明里的参数顺序传,会报 "not of type Element"。尺寸变化时要重新分配贴图。 - 在
paint事件里上传贴图。尺寸变化后调用canvas.requestPaint()。 - 点击要对准:3D 上下文不会自动定位元素,每次 paint 后调用
canvas.updateElementGeometry(el, {canvasTransform: new DOMMatrix()})。这个变换按 CSS 像素算,不要乘 dpr:Chrome 158 会照原样生效,乘了 dpr 的话,dpr 为 2 时点击区域会放大一倍,点行的位置会落到面板外;Chrome 156 忽略这个变换。2026-11-17 在 Chrome 156 和 158 上,dpr 为 1 和 2 都验过(tests/test_hud_interface_glass.py)。 - 画布高度不会跟着子元素变:要观察面板尺寸,把高度同步给 canvas(
hud.js已处理)。 - 跨源图片、系统颜色、拼写标记、visited 链接、次像素抗锯齿都不会被画进去。
What ships with it
6 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.
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.
- 10d ago Changed 426ba6adc1ca
- 27d ago First seen · 72 lines · 241 tokens per session scan A 9e623588788d
hud-interface is a skill published in the GitHub repository majiayu000/spellbook (301 stars, last pushed 7d ago), licensed MIT. It adds 241 tokens to every session and 2,075 once invoked, about $0.0010 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-11-03.
hud-interface compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| hud-interfacemajiayu000/spellbook | Skill | 301 | 7d ago | MIT | A | 241 | Claude Code, Codex |
| Webdesigndanielmiessler/LifeOS | Skill | 20k | 11d ago | MIT | A | 108 | Claude Code, Codex |
| lov-maintain-partnerslovstudio/skills | Skill | 72 | 3d ago | MIT | A | 294 | Claude Code |
| web-design-expertfrankxai/claude-skills-library | Skill | 51 | today | MIT | A | 48 | Claude Code |
| design-asset-intakefrankxai/claude-skills-library | Skill | 51 | today | MIT | A | 80 | Claude Code |
| liquid-glassfrankxai/claude-skills-library | Skill | 51 | today | MIT | A | 122 | Claude Code, Codex |
| shader-backdropfrankxai/claude-skills-library | Skill | 51 | today | MIT | A | 98 | Claude Code, Codex |