re-frame2-xray¶
A read-only tour of Xray, the re-frame2 in-app devtools panel. Answers two questions and only two: how do I launch Xray? and which tab — across its Dynamic and Static modes — shows X?
What it does¶
The re-frame2-xray skill is a tour guide for Xray, the human-facing devtools panel that ships with re-frame2. Xray is preloaded into dev builds via shadow-cljs :preloads and renders true-inline on the right side of the host app; production builds elide it entirely through the interop/debug-enabled? gate.
The skill answers two questions:
- How do I launch Xray? — the inline panel, the pop-out (
(xray/popout!)), the programmatic(xray/init! opts)path, the wired hotkeys, and the Dynamic ↔ Static mode toggle. - Which tab shows X? — a one-line purpose for each tab, across both modes.
Two modes¶
Xray runs in one of two modes, flipped by the L1 mode pill or Cmd/Ctrl+Shift+M:
- Dynamic — the event-coupled spine (4-layer chrome). Every tab is a lens on the one focused event. 7 tabs: Event · App DB · View · Trace · Machines · Routing · Issues (mnemonics
e a v t m r i). - Static — event-INDEPENDENT registry browse (3-layer chrome, no spine). Every tab is a catalogue of what's registered in the picked frame. 5 tabs: Machines · Routes · Schemas · Flows · Interceptors.
When the user wants to inspect a single dispatch, that's Dynamic; when they want to browse the whole registry, that's Static.
Wired hotkeys¶
Four hotkey families have keydown listeners installed:
| Key | Scope | Action |
|---|---|---|
Ctrl+Shift+C |
global | Toggle the Xray shell. |
Cmd/Ctrl+Shift+M |
global | Toggle mode — Dynamic ↔ Static. |
Cmd/Ctrl+K |
global | Open the command palette. |
Space L j k G ,/s Esc |
focus-gated | Spine + chrome shortcuts (only inside the shell, off editable fields). |
When to reach for it¶
Load this skill when the user wants to read the Xray panel — "open Xray", "where is X in Xray", "which Xray tab shows…", "Xray Static mode", "browse registered machines/routes/schemas in Xray", "Ctrl+Shift+C", "Xray popout", "Xray machine inspector".
Do not use this skill for:
- Driving Xray from a live runtime (dispatch, mutate
app-db, hot-swap, time-travel) → use re-frame2-pair. Xray owns the seeing; re-frame2-pair owns the driving. - Writing new application code → use re-frame2.
- Implementing Xray itself → the spec under
tools/xray/spec/is the source of truth (no implementor skill yet).
Where the skill lives¶
- Source:
skills/re-frame2-xray/ SKILL.md:skills/re-frame2-xray/SKILL.md- Reference leaves:
skills/re-frame2-xray/references/—launch-modes.md(launch decision tree + hotkeys) andpanels.md(the full tab tour across both modes). - Xray source + spec:
tools/xray/. - Human-facing Xray guide: Xray.
- Live-runtime companion skill:
re-frame2-pair.