Community코딩 & 개발github.com

probe-my-page

Verifies that a web UI looks and behaves the same (or as intended) after a change by injecting a small measuring script into the live page and reading numbers from the DOM instead of driving the mouse: layout rects, computed styles, computed transitions/animations, autoplay/hover/pause timing, image weight, per-state snapshots (every slide, tab, accordion item), at several viewports, saved to files and diffed before vs after (golden-master / characterization testing). Use when replacing or migrating a plugin, theme, component library or CMS element and the result must match the old one; when checking a regression in layout, spacing, animation or interaction; when an agent is tempted to use Playwright or the browser tool to click, drag or hover and screenshot; or when the user mentions probe-my-page, parity check, before/after measurement, "measure it" or "compare with the live site". Not for broad design audits of one page (use audit-my-layout).

probe-my-page란 무엇인가요?

probe-my-page is a Claude Code agent skill that verifies that a web UI looks and behaves the same (or as intended) after a change by injecting a small measuring script into the live page and reading numbers from the DOM instead of driving the mouse: layout rects, computed styles, computed transitions/animations, autoplay/hover/pause timing, image weight, per-state snapshots (every slide, tab, accordion item), at several viewports, saved to files and diffed before vs after (golden-master / characterization testing). Use when replacing or migrating a plugin, theme, component library or CMS element and the result must match the old one; when checking a regression in layout, spacing, animation or interaction; when an agent is tempted to use Playwright or the browser tool to click, drag or hover and screenshot; or when the user mentions probe-my-page, parity check, before/after measurement, "measure it" or "compare with the live site". Not for broad design audits of one page (use audit-my-layout).

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/silkyland/probe-my-page/tree/HEAD

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Probe My Page

Read the numbers from the page; do not drive the pointer. Dragging, hovering and screenshot-eyeballing are slow, flaky and cannot tell a 2px or 100ms difference. The DOM already knows: getBoundingClientRect, getComputedStyle, element.getAnimations(), performance.now(), el.click(), dispatchEvent. A script injected into the page (or run through page.evaluate in Playwright, or the browser tool's JavaScript action) returns exact values in one call.

The method (do it in this order)

  1. Baseline BEFORE you change anything. Once the old implementation is gone you cannot measure it. If the change is reversible (migration with rollback, git stash, feature flag) you can restore it later to re-baseline; say so in your plan. Save baselines to files.
  2. Write one adapter per implementation (old and new have different class names). An adapter is just a selector map: root, item, active, content, title, button, dot, arrowNext, img, ... The measured values are semantic (position inside the component, font size, colour, count, duration) so old and new can be compared even though the DOM differs.
  3. Pick the matrix: viewports (default 1440, 1024, 768, 390), languages, and states (every slide / tab / accordion item / open-closed). Measure each state by triggering it from script (el.click()), waiting for it to settle, then snapshotting. Never rely on "whatever is active at load" (autoplay moves it).
  4. Measure three kinds of facts (see scripts/probe.js):
    • static: rect relative to the component root, computed font/colour/padding/ opacity, counts, object-fit, display, z-order;
    • motion: computed transition-* / animation-* of the parts, plus getAnimations(); read the declared timing instead of sampling frames;
    • behaviour: autoplay interval (timestamps of active-index changes), pause on hover (dispatch mouseover/mouseenter, nothing changes for N seconds), keyboard (dispatch keydown), network weight (performance.getEntriesByType('resource')).
  5. Save, don't print. Post results to a tiny local server (scripts/srv.py) so large JSON never enters the conversation; print only a one-line summary.
  6. Diff with a tolerance (scripts/compare.py, 1px by default, aliases such as start = left). Report only differing values, grouped by state and viewport, plus what matched. Explain each difference: bug, deliberate choice, or measuring artefact; then fix CSS/markup and re-measure the same matrix.
  7. State what you did not measure (hover-only CSS, real touch, other browsers, frame-exact easing, production data).

Setup (the pieces)

python3 scripts/srv.py            # serves probe.js and stores POSTed results in ./results/

In the page (browser tool JS action, Playwright page.addScriptTag, or devtools):

await new Promise((res, rej) => { const s = document.createElement('script');
  s.src = 'http://127.0.0.1:8777/probe.js?' + Date.now(); s.onload = res; s.onerror = rej; document.head.appendChild(s); });
__P.adapters.old = { root: '.old-slider', item: '.old-slide', active: '.is-active', dot: '.old-dots button', /* ... */ };
await __P.save('old_1440_static', await __P.snapshot('old'));

Use an HTTP page when the server is HTTP (mixed content blocks http:// scripts on HTTPS pages). Resize the viewport through the tool (resize_window / page.setViewportSize), reload, wait for load, then measure.

Rules that save hours

  • Prefer declared values to sampled frames: a transition's duration, delay and easing come from getComputedStyle; sampling requestAnimationFrame only proves it ran.
  • Hidden or background panes do not render frames: CSS transitions stay at their start value until a frame is produced, so computed styles lag. Call await __P.settle() (several rAF + short sleeps) before every measurement and set an explicit viewport. Details: references/gotchas.md.
  • Pause autoplay before measuring (__P.hover(el, true)), or measure it on purpose with __P.watch.
  • Pseudo-classes (:hover, :focus, :active) cannot be set from script. Read the stylesheet rules for them (references/gotchas.md) or test one real hover with the tool; do not build the whole check on it.
  • Compare the same slide/state on both sides; a different active slide looks like a layout bug.
  • A one-off difference of a few px at one viewport is usually content height or rounding: check the neighbours before "fixing".
  • Keep measuring tools with the project (docs/measurements/<date>-<topic>/) together with the raw results, so the check is repeatable on stage/live.
  • When a result surprises you, inspect the DOM before theorising: list the matching CSS rules for the property, the element's classes, the data it was built from.

Output to the user

A short table: what was compared, matrix, number of differing values, the differences with cause (bug / intentional / artefact), what was fixed, what is not covered. Offer the raw results path.

Files

  • scripts/probe.js generic harness: snapshot, motion, watch, hover, settle, perItem, resources, save.
  • scripts/srv.py static server + POST /save?name=... with CORS.
  • scripts/compare.py flat diff of two result files with tolerance and aliases.
  • references/gotchas.md rendering pitfalls and how to read CSS rules and animations.

관련 스킬