From xonovex-skill-imgui
Use when designing or implementing an immediate-mode GUI (IMGUI): batching the whole UI into one draw call with compact primitive buffers, keying controls by stable IDs, resolving ordering with frame-delayed state, keyboard focus / responder chains / event trickling, drag-and-drop, per-monitor DPI scaling, string localization, and screen-reader accessibility. Triggers on immediate-mode widgets, retained-vs-immediate UI, hover/active/focus IDs, UI draw batching, ImGui-style code, localizing UI strings, accessibility/screen-reader support for an IMGUI, even when the user doesn't say 'IMGUI'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/xonovex-skill-imgui:imgui-guideThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Architecture for an immediate-mode GUI: the UI is re-issued every frame from application data, controls are identified by id rather than retained objects, and the few things that must persist (hover, focus, drag, DPI) live in a small, deliberate state store. For how the resulting vertex/index data reaches the GPU, see **gpu-rendering-guide**.
Architecture for an immediate-mode GUI: the UI is re-issued every frame from application data, controls are identified by id rather than retained objects, and the few things that must persist (hover, focus, drag, DPI) live in a small, deliberate state store. For how the resulting vertex/index data reaches the GPU, see gpu-rendering-guide.
if (button(id, ...))), they are not retained objects.LOCALIZE(...), resolve per frame through a swappable localizer that falls back to the source string, and audit coverage with a pseudo-localization mode, see references/localization.mdnext_hover, promote at frame end) so the topmost/last-drawn control wins.SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE) must run before any window is created, and DPI must be part of the font-atlas cache key or text renders blurry.// A button: stateless to issue, identified by a stable id; state lives in the ui context.
bool button(tm_ui_o *ui, uint64_t id, rect_t r, const char *label) {
if (rect_contains(r, ui->mouse))
ui->next_hover = id; // resolved at frame end (last-drawn wins)
const bool clicked = ui->hover == id && ui->left_mouse_released;
draw_rect(ui->buffer, r, ui->hover == id ? COLOR_HOT : COLOR_NORMAL); // into shared primitive buffer
draw_text(ui->buffer, r, label);
return clicked;
}
Guides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.
npx claudepluginhub xonovex/platform --plugin xonovex-skill-imgui