/jstack:eng-interactionfrom jstack
Use when a change touches scrolling, overlays and modals, mobile viewport, keyboard and focus, layout shift, hydration, URL or state races, or click and tap targets. Write the state machine, test on a real phone width.
Ships in jstack. 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.
Read when SKILL.md points to them.
Interaction bugs live between states: the keyboard opens, a second modal stacks, a list grows above the reader, the server and client render differently. Name the states and transitions before code (who owns scroll, what Esc closes, what the URL holds) and verify on a phone-sized viewport with the dynamic viewport units, not on a desktop window.
/preflight): answer the questions for the task's tier (S: MUST, M: + SHOULD, L: all + a pre-mortem). An answer that needs a number gets a number or "unknown, measure first". Copy the budgets that apply into the pre-flight with how each is measured./unslop): the static red flags run in tools/unslop/scan.mjs; the review agent reads the diff for the eyes ones. A red flag is a hypothesis until a confirm recipe produces evidence that a second agent reproduces.checks.json in this folder (triggers, questions, budgets, rules, verify). Projects tune it in .jstack/unslop.json (rule modes, waivers, extra questions and rules).MUST (asked at every tier)
ix.q.one-scroller Which single element scrolls in this view, and on which axis? What happens at its edge? (answer as: text; prevents: nested-scroll)ix.q.error-paths Pre-mortem: this flow broke in production. List the error, cancel, timeout, reload and double-submit paths and the state after each. (answer as: table; prevents: stuck-overlay, lost-progress)SHOULD (tier M and L)
ix.q.ready-state What is the view's ready state, and which transition sets the scroll position? What stops auto-follow? (answer as: diagram; prevents: scroll-before-content)ix.q.viewport What sizes the shell: dvh/svh or vh? What does the keyboard do (interactive-widget)? (answer as: text; prevents: hidden-by-keyboard)ix.q.overlay-stack Which overlays can stack here, who owns the stack, and what does Esc close first? (answer as: list; prevents: wrong-layer)ix.q.source-of-truth For each state item: where is its one source of truth (URL, server or local)? What happens if two requests overlap? (answer as: table; prevents: state-race)ix.q.subscriptions Which effects subscribe, append, poll or start timers, and what cleans each up on unmount and on a double mount? (answer as: table; prevents: runaway-loop, leak)DEEP (tier L, with the pre-mortem)
ix.q.affordance For each interactive element: its signifier (cursor, hover, focus), its target size and its placement relative to the pointer. (answer as: table; prevents: poor-affordance)ix.q.layout-shift Does anything appear, disappear or change size when async data arrives? Where is its space reserved? (answer as: text; prevents: layout-shift)ix.q.hydration What reads device or time values, and does the first client render equal the server render? (answer as: list; prevents: hydration-mismatch)ix.q.devices Which device and viewport matrix will prove it, and which part can only be checked on a real device? (answer as: list; prevents: unverified-on-device)Defaults with their source. The project file .jstack/budgets.json wins; null means the project sets it the first time a task touches it (pre-flight turns that into a measure-first task).
| key | default | unit | how measured | source |
|---|---|---|---|---|
perf.cls | 0.1 | score | sum of layout-shift entries without hadRecentInput during load and status changes | web.dev CLS |
a11y.target_px | 24 | CSS px | DOM target-size scan; 44 for primary touch actions | WCAG 2.2 SC 2.5.8 |
ix.scrollers_per_view | 1 | count | DOM audit of overflowing auto/scroll elements per view | CSS Overscroll Behavior L1 |
A red flag is a hypothesis. /unslop turns it into a finding only with evidence (see Confirm recipes).
| id | what it looks like | why it is slop | detector | severity |
|---|---|---|---|---|
ix.vh-shell | 100vh / h-screen sizing (sits under mobile toolbars and keyboards) | vh equals the large viewport, so the bottom of the shell hides under browser toolbars and the keyboard. | static ix.vh-shell (regex) | medium |
ix.magic-z-index | Magic z-index number (3+ digits) | z-index arms races put modals behind other layers; there is no stack owner. | static ix.magic-z-index (regex) | low |
ix.scroll-on-mount | scrollIntoView in a mount-only effect (runs before the content is there) | It runs while the skeleton shows, so the view never lands on the latest item. | static ix.scroll-on-mount (regex) | medium |
ix.nested-scroll | overflow:auto inside another scroll container | Three scrollbars, a list that will not scroll, jumps on status change. | review agent (eyes) | medium |
ix.div-onclick | onClick on a div/span with no role, tabIndex, cursor or keyboard support | No signifier, no keyboard access, often a tiny target. | review agent (eyes) | medium |
ix.late-primary-action | Primary action rendered only when data arrives ({data && }) | The button appears late and shifts the layout. | review agent (eyes) | low |
ix.overlay-no-finally | Overlay opened with no close in catch/finally | A failed call leaves an overlay over the whole UI. | review agent (eyes) | high |
ix.device-read-in-render | window/localStorage/matchMedia/Date read in render | Server and client render differ: hydration errors and flicker. | review agent (eyes) | medium |
ix.unaborted-fetch-effect | fetch in an effect without abort or stale guard | A slow old response overwrites the newer selection. | review agent (eyes) | medium |
ix.effect-append-loop | Effect that appends to state or the DOM with no cleanup, or with the appended state in its own dependencies | Each render or remount adds another copy: elements multiply and the page slows down. | review agent (eyes) | high |
ix.menu-wrong-container | Menu or popover placed with pointer coordinates against a scrolled or transformed ancestor | The menu opens far from the pointer as soon as the container scrolls or moves. | review agent (eyes) | medium |
ix.url-write-before-ready | URL or route written from an effect before the data it depends on (session, permissions) has loaded | The early write is read back as a new request and the deep link bounces somewhere else. | review agent (eyes) | medium |
ix.index-selection-async-list | Highlighted or selected item kept as an index into a list assembled from more than one async source | When one source loads late the list shifts and Enter picks a different item than the one shown highlighted. | review agent (eyes) | medium |
ix.vh-shell: render: Pixel/iPhone emulation, focus the input, assert its bottom <= visualViewport.height Fix direction: dvh/svh (h-dvh, min-h-svh) and an explicit interactive-widget choice.ix.magic-z-index: failing-test: open A then B; elementFromPoint at B's centre is B; Esc closes B only Fix direction: the top layer (.showModal) or a token scale owned by one overlay manager.ix.scroll-on-mount: failing-test: delay the data 1.5 s; after the skeleton goes, assert distance to bottom < 2 px Fix direction: scroll on the transition to ready, re-assert while height settles, stop at the first user scroll.ix.nested-scroll: render: DOM audit counts > 1 overflowing scroller per viewix.div-onclick: render: cursor and target-size scan; axeix.late-primary-action: measurement: CLS during load over budgetix.overlay-no-finally: failing-test: abort the call; assert no [aria-modal=true] left and the page is interactiveix.device-read-in-render: render: built app route crawl with a non-UTC timezone; console has hydration errorsix.unaborted-fetch-effect: failing-test: A delayed 1500 ms, B 100 ms; B stays shownix.effect-append-loop: failing-test: mount, wait 2 s, remount twice; the element count stays constantix.menu-wrong-container: render: open it at 4 pointer positions inside a scrolled container; the distance from the pointer is over 8 px Fix direction: position against the viewport or with a positioning library (virtual element at the pointer).ix.url-write-before-ready: failing-test: delay that data 1.5 s and open a deep link; the final URL equals the deep linkix.index-selection-async-list: failing-test: highlight an item, resolve the second source so items are prepended, press Enter; the chosen item differs Fix direction: keep the selection as the item's key and re-derive the index on render.Run in this order after the change; each line is a pass criterion.
ix.v.built run on the production build; dev-mode hydration and CLS differ (render; build + start)ix.v.matrix Pixel 7, iPhone 13, iPad, desktop 1440; non-UTC timezone and a second locale; light and dark (render; Playwright devices)ix.v.per-route per route: console clean, scrollers <= 1, no horizontal overflow, target-size and cursor scans, with the longest real content and with an empty state (render; DOM audit snippets)ix.v.per-flow per flow: race test, error-path matrix (abort and 500), reload-resume, overlay stack (Esc order, focus return) (test; Playwright page.route)ix.v.cls interaction CLS <= 0.1 (measure; PerformanceObserver layout-shift)ix.v.device real-device spot check of anything the keyboard touches, or say 'not verified on device' (render; real device)Loaded by tools/unslop/classify.mjs when the task says "scroll", "mobile", "phone", "keyboard", "modal", "dialog", "overlay", "menu", "dropdown", "click", "tap", "layout", or touches **/components/**, **/*.css, **/*.scss, **/hooks/**, **/app/**/*.tsx, **/*.vue, **/*.svelte.
| tool | how to run it | what number to read | valid only when | trap |
|---|---|---|---|---|
| Playwright device emulation | phone profile, hasTouch, keyboard open via focus on an input | element boxes vs visual viewport; nothing covered | built app; real fonts | desktop window resized is not a phone |
| CLS / layout-shift entries | PerformanceObserver layout-shift without hadRecentInput | sum <= budget during load and after data arrives | same data volume as production | empty states shift nothing; real data does |
| hydration warnings | browser console during first load of the built app | zero hydration mismatch errors | production build (dev warns differently) | suppressHydrationWarning hides one level only |
| target-size scan | DOM scan of interactive boxes | all >= 24x24 CSS px (WCAG 2.2 2.5.8); 44 for primary touch actions | phone viewport | icon buttons with padding outside the hit box |
| symptom | measure | cause | fix |
|---|---|---|---|
| Bottom of the screen hidden on phones | emulate a phone with toolbars | 100vh / h-screen shell | use dvh/svh units |
| Esc closes everything | open two overlays, press Esc | no stacking order for overlays | one overlay stack; Esc closes only the top |
| Scroll jumps while reading | append items above the viewport in a test | scroll forced on mount or on every update | scroll only on the user's own new item; scroll anchoring |
Dated sources with their verification tags are in SOURCES.md. Claims tagged unverified there are not stated as fact here.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub jayjayholic/jstack --plugin jstack31 skills in this plugin
/domain-modelingBuild and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR./eng-agent-disciplineUse for every coding-agent task, and when writing briefs, reports, READY messages, docs or handoffs. Quote the ask, stay in owned files, cite sources for claims, verify yourself before claiming done, report with evidence./eng-ci-gitUse when a change touches CI, build, typecheck, merges and rebases, branches and worktrees, release trains, exported signatures or renames. Gate the merged tree, find every caller, resolve conflicts by reading them.