hud-interface

hud-interface is a skill for Claude Code, Codex from majiayu000/spellbook. It costs 241 tokens per session (2,075 once invoked), scanned A, original, MIT.

A reusable visual style and code kit for game-like dashboard interfaces, called HUDs. It provides paper-and-ink layouts, large counters, lists, labels, a moving marble-like background, and an optional glass effect for browser panels.

In plain words
What is it for?
Use it for robot controls, parts lists, task consoles, mechanical interfaces, and other pages that need a dashboard feel. It includes HTML, CSS, JavaScript, a demo, and checks for supported browser modes.
Why use it?
It gives a page a consistent instrument-panel appearance without requiring image assets. The design also includes a fallback for browsers that do not support the optional experimental glass feature.

Skill for Claude CodeCodex

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

Good fit Use it for robot controls, parts lists, task consoles, mechanical interfaces, and other pages that need a dashboard feel. It includes HTML, CSS, JavaScript, a demo, and checks for supported browser modes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/majiayu000/spellbook/hud-interface
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 majiayu000/spellbook --skill hud-interface
Clone the repo
git clone --depth 1 https://github.com/majiayu000/spellbook

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 hud-interface

README.md
[![agentmods](https://agentmods.dev/badge/skills/majiayu000/spellbook/hud-interface/github.svg)](https://agentmods.dev/skills/majiayu000/spellbook/hud-interface)
Your own site
<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.

agentmods 80×15 button for hud-interface

Your own site · 80×15
<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>
Per session 241 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,075 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.00241 $0.02075
Opus 5.5 $0.00096 $0.00830
Sonnet 5.5 $0.00048 $0.00415
Haiku 4.5 $0.00024 $0.00208

Measured 10d ago against content hash 426ba6adc1ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 3 executable files (assets/hud.js, scripts/check.mjs, scripts/lib/env.mjs), 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.

skills/hud-interface/SKILL.md · 72 lines

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)。

步骤

  1. 定内容,再套壳。先列清楚页面真正要显示什么:分区、清单、计数、正在进行的那一项。HUD 只是外壳,内容必须是真实的结构,不要为了填满版面去造装饰数据。
  2. 复制 hud.css 和 hud.js,引入字体(Barlow Condensed、JetBrains Mono、Noto Sans SC,Google Fonts;离线会退到系统字体)。从 demo.html 搬需要的块。
  3. 选一个面板做玻璃,最多一两个,一般选主清单:Hud.glass(panel)。整页都做成玻璃会糊,也会很慢。
  4. 背景:放一个 <canvas class="hud-backdrop">,调用 Hud.backdrop(canvas)。颜色从 CSS 变量读,改 --hud-tint 就能换强调色。
  5. 噪音档位:在 <html data-hud-level> 上设置,默认 quiet。loud 会让色散、扫光、背景墨线都变强,带 .hud-loud-only 的装饰也只在非 quiet 档出现。
  6. 验收: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 链接、次像素抗锯齿都不会被画进去。

Read the full file on GitHub · 72 lines

Files

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.

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. 10d ago Changed 426ba6adc1ca
  2. 27d ago First seen · 72 lines · 241 tokens per session scan A 9e623588788d

Subscribe to this mod's changes

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.

Related

hud-interface compared with skills from other repositories

hud-interface next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hud-interfacemajiayu000/spellbookSkill3017d agoMITA241Claude Code, Codex
Webdesigndanielmiessler/LifeOSSkill20k11d agoMITA108Claude Code, Codex
lov-maintain-partnerslovstudio/skillsSkill723d agoMITA294Claude Code
web-design-expertfrankxai/claude-skills-librarySkill51todayMITA48Claude Code
design-asset-intakefrankxai/claude-skills-librarySkill51todayMITA80Claude Code
liquid-glassfrankxai/claude-skills-librarySkill51todayMITA122Claude Code, Codex
shader-backdropfrankxai/claude-skills-librarySkill51todayMITA98Claude Code, Codex