/everything-evenhub:glasses-uifrom everything-evenhub
Builds Even Hub G2 glasses display UI with text containers, lists, images, and layout patterns on a 576x288 4-bit greyscale canvas. Use when creating or updating glasses display content.
Ships in everything-evenhub. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The G2 glasses display is a 576x288 px canvas with the following characteristics:
Every page is composed of containers. The following limits apply per page:
isEventCapture: 1 — this container receives user input eventszOrderIndex (SDK 0.0.12+) — all-or-nothing per page: either every list/text/image container sets a unique zOrderIndex (larger = front) or none do; when omitted everywhere, declaration order determines overlap (later declarations render on top)containerID must be unique per page (number)containerName must be unique per page (string, max 16 characters)All container types share these properties:
| Property | Type | Range | Notes |
|---|---|---|---|
xPosition | number | 0–576 | Left edge of container |
yPosition | number | 0–288 | Top edge of container |
width | number | 0–576 | Container width in pixels |
height | number | 0–288 | Container height in pixels |
containerID | number | — | Unique per page |
containerName | string | max 16 chars | Unique per page |
isEventCapture | number | 0 or 1 | Exactly one container must be 1 |
zOrderIndex | number | — | Stacking order, larger = front; all-or-nothing per page, unique values (SDK 0.0.12+) |
Border properties apply to text and list containers only (not image containers):
| Property | Type | Range | Notes |
|---|---|---|---|
borderWidth | number | 0–5 | 0 = no border |
borderColor | number | 0–15 | Greyscale level (0 = black, 15 = white/bright green) |
borderRadius | number | 0–10 | Rounded corner radius |
paddingLength | number | 0–32 | Uniform padding applied to all sides |
Text containers display scrollable or static text content.
| Property | Type | Range | Notes |
|---|---|---|---|
xPosition | number | 0–576 | Left edge |
yPosition | number | 0–288 | Top edge |
width | number | 0–576 | Container width |
height | number | 0–288 | Container height |
containerID | number | — | Unique per page |
containerName | string | max 16 chars | Unique per page |
isEventCapture | number | 0 or 1 | Exactly one must be 1 |
zOrderIndex | number | — | Stacking order, larger = front (SDK 0.0.12+) |
borderWidth | number | 0–5 | 0 = no border |
borderColor | number | 0–15 | Greyscale level |
borderRadius | number | 0–10 | Rounded corners |
paddingLength | number | 0–32 | Uniform padding |
content | string | — | Text to display |
Content limits:
createStartUpPageContainer: max 1000 characterstextContainerUpgrade: max 2000 charactersrebuildPageContainer: max 1000 charactersText behavior:
\n for explicit line breaksList containers display a scrollable list of selectable items managed by the native firmware.
ListItemContainerProperty defines the list items:
| Property | Type | Range | Notes |
|---|---|---|---|
itemCount | number | 1–20 | Number of items in the list |
itemWidth | number | 0–576 | Item width; 0 = auto fill container width |
isItemSelectBorderEn | number | 0 or 1 | Enable selection border highlight |
itemName | string[] | max 20 items, max 64 chars each | Array of item label strings |
List container behavior:
Image containers render 4-bit greyscale bitmap images.
| Property | Type | Range | Notes |
|---|---|---|---|
xPosition | number | 0–576 | Left edge |
yPosition | number | 0–288 | Top edge |
width | number | 20–288 | Container width in pixels |
height | number | 20–144 | Container height in pixels |
containerID | number | — | Unique per page |
containerName | string | max 16 chars | Unique per page |
zOrderIndex | number | — | Stacking order, larger = front (SDK 0.0.12+) |
Image containers do not support isEventCapture. Use a text container as the event-capture layer when combining with images (see Image-Based App Pattern below).
Image data format:
number[] | Uint8Array | ArrayBuffer | base64 stringPreprocessing is optional. You don't need to pre-grayscale or dither before sending — the SDK converts common formats internally and only returns imageToGray4Failed if it can't. Line art, icons, and QR codes usually render fine raw; photos and gradients benefit from a client-side contrast boost + Floyd–Steinberg dither pass on a 16-shade display, but try the naive path first.
Critical behavior:
updateImageRawData is calledupdateImageRawData after creating an image container to display contentcreateStartUpPageContainer(container)Called once at app startup to create the initial page layout.
createStartUpPageContainer(container: CreateStartUpPageContainer): Promise<StartUpPageCreateResult>
Return codes:
0 — success1 — invalid parameters2 — oversize (content too large)3 — out of memoryrebuildPageContainer(container)Fully redraws a page. Use when changing layout structure (adding/removing containers, switching container types).
rebuildPageContainer(container: RebuildPageContainer): Promise<boolean>
true on successtextContainerUpgrade(container)Updates text content in-place without rebuilding the page. Flicker-free.
textContainerUpgrade(container: TextContainerUpgrade): Promise<boolean>
true on successcontainerID and containerName must exactly match the existing containercontentOffset: 0, contentLength: 0 for full content replacementupdateImageRawData({ containerID, containerName, imageData })Sends pixel data to an image container.
updateImageRawData(params: {
containerID: number
containerName: string
imageData: number[] | Uint8Array | ArrayBuffer | string
}): Promise<string>
Return status strings:
'success' — image displayed'imageException' — general image error'imageSizeInvalid' — image dimensions do not match container'imageToGray4Failed' — color conversion failed'sendFailed' — transmission errorDo not call concurrently — wait for the previous call to resolve before sending another image.
shutDownPageContainer(exitMode?)Exits the current page.
shutDownPageContainer(exitMode?: number): Promise<boolean>
exitMode: 0 — immediate exit with no confirmationexitMode: 1 — show exit confirmation dialogtextContainerUpgrade for frequent updates (counters, status lines, live data feeds) — it updates in-place with no flickerrebuildPageContainer when changing layout — adding or removing containers, switching container types, or updating list itemscontainerID and containerName exactly when calling textContainerUpgrade — mismatches silently failupdateImageRawData concurrently — queue updates and await each before sending the nextrebuildPageContainer on scroll eventsawait each before starting the next; concurrent render + storage calls can crash the connectionPromise.race with a few-second capsetLocalStorage shares the same BLE link; debounce on tick/page-turn and flush on exitcreateStartUpPageContainer exactly once — every subsequent render uses rebuildPageContainer or a *Upgrade callPrefix text items with > as a cursor indicator to simulate a button or selection state:
> Start
Settings
Exit
Toggle borderWidth on individual text containers between 0 (unselected) and a nonzero value (selected) to indicate focus. Requires rebuildPageContainer.
Stack multiple text containers vertically. For three equal rows on a 288px canvas:
// Row 1: y=0, height=96
// Row 2: y=96, height=96
// Row 3: y=192, height=96
Use Unicode block characters to draw progress bars within a text container:
const filled = Math.round((progress / 100) * barWidth)
const bar = '━'.repeat(filled) + '─'.repeat(barWidth - filled)
content = `Progress: ${bar} ${progress}%`
Pre-paginate content at ~400–500 character boundaries. On scroll/navigation events, call rebuildPageContainer with the new page slice:
const pages = paginateText(fullText, 450)
let currentPage = 0
async function showPage(index: number) {
currentPage = index
await bridge.rebuildPageContainer({
containerTotalNum: 1,
textObject: [{ ...containerConfig, content: pages[index] }],
})
}
import {
waitForEvenAppBridge,
type TextContainerProperty,
type ImageContainerProperty,
} from '@evenrealities/even_hub_sdk'
const bridge = await waitForEvenAppBridge()
// Create initial page with text and image containers
const textContainer: TextContainerProperty = {
xPosition: 0, yPosition: 0, width: 576, height: 200,
borderWidth: 0, borderColor: 5, paddingLength: 4,
containerID: 1, containerName: 'main',
content: 'Hello from G2!',
isEventCapture: 1,
}
const imageContainer: ImageContainerProperty = {
xPosition: 200, yPosition: 210, width: 100, height: 60,
containerID: 2, containerName: 'icon',
}
const result = await bridge.createStartUpPageContainer({
containerTotalNum: 2,
textObject: [textContainer],
imageObject: [imageContainer],
})
if (result === 0) {
// Update image content after creation
await bridge.updateImageRawData({
containerID: 2,
containerName: 'icon',
imageData: [/* pixel data */],
})
// Flicker-free text update
await bridge.textContainerUpgrade({
containerID: 1,
containerName: 'main',
content: 'Updated text!',
contentOffset: 0,
contentLength: 0,
})
}
When building an image-first app (e.g., rendering a canvas or bitmap as the primary display), use a full-screen text container as the event capture layer behind the image container:
// Full-screen transparent text container — receives events, invisible to user
const eventLayer: TextContainerProperty = {
xPosition: 0, yPosition: 0, width: 576, height: 288,
containerID: 1, containerName: 'eventLayer',
content: ' ', // single space — required, cannot be empty
isEventCapture: 1, // this layer catches all input events
borderWidth: 0, borderColor: 0, paddingLength: 0,
zOrderIndex: 1, // back layer (SDK 0.0.12+; if one container sets zOrderIndex, all must)
}
// Image container renders on top of the event layer
const imageLayer: ImageContainerProperty = {
xPosition: 0, yPosition: 0, width: 200, height: 100,
containerID: 2, containerName: 'display',
zOrderIndex: 2, // front layer — larger = closer to front
// isEventCapture: 0 (default) — image containers do not capture events
}
await bridge.createStartUpPageContainer({
containerTotalNum: 2,
textObject: [eventLayer],
imageObject: [imageLayer],
})
// Always send image data after creation
await bridge.updateImageRawData({
containerID: 2,
containerName: 'display',
imageData: pixelData,
})
The text container receives events; the image container draws on top. On SDKs before 0.0.12, drop both zOrderIndex fields and rely on declaration order (later declarations render on top).
$ARGUMENTS
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub even-realities/everything-evenhub --plugin everything-evenhub13 skills in this plugin
/background-stateImplement background state persistence for Even Hub G2 plugins — automatically analyzes existing plugin code, identifies state that needs to survive background/foreground transitions, and inserts setBackgroundState + onBackgroundRestore calls. Use when a plugin loses state after the phone goes to the background and returns./build-and-deployPackage and deploy an Even Hub G2 app — validate app.json, build, pack into .ehpk, upload it as a build, invite beta testers, and promote it to the beta channel. Use when packaging, deploying, uploading, distributing to testers, putting a build on beta, or submitting an Even Hub app./cli-referenceEven Hub CLI command reference — login, logout, self-check, init, pack, qr, create, upload, update, ls, promote, delist, testers, rm, download. Exit codes, --json output keys, and the checks that run locally before a request is sent. Use when running any CLI command, creating or uploading an app, managing beta testers and channels, or scripting the CLI in CI./design-guidelinesUI/UX design guidelines for Even Hub G2 smart glasses — display constraints, layout patterns, icon design, Unicode characters, and community resources. Use when designing glasses app interfaces or planning layouts./device-featuresUse G2 hardware features in Even Hub apps — microphone audio capture (glasses or phone mic), IMU motion data, location (one-shot and continuous), phone album picker / camera capture, device info, user info, and local storage. Use when working with audio, IMU, location, photos, battery, wearing detection, or persistent storage./font-measurementPixel-accurate font measurement for Even Realities G2 glasses — predict text layout dimensions matching the LVGL rendering engine. Use when sizing text containers precisely.Other plugins' skills for the same job