Index of every page on this site: llms.txt
All skills
onmax avatar

/before-after-evidence

@aecfada
by Maxonmax/comark-ui43 stars
3
Run it yourself

Shows a visible change as two comparable screenshots, before and after, with marks measured from the source and checked in the rendered page, and a change in motion as a short recording. Use when a pull request, bug fix, or design change alters what people see or how it moves, or when someone asks for before/after screenshots, a recording, or visual evidence.

Use this Skill: https://skilld.dev/gh/onmax/comark-ui/before-after-evidence

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesmeasuring.md

≈598 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Measuring marks

Every mark is x y w h, each a percentage of the image from 0 to 100. Measure in the same coordinates the image was captured in.

A page you captured

Capture both states with one clip, then read each element's box in the same page, before anything moves:

// Playwright: one clip for both sides, so the same element sits at the same place.
const clip = { x: 56, y: 12, width: 528, height: 312 };
await page.screenshot({ path: "after.png", clip });

const box = await page.$eval("#email", (el, clip) => {
  const r = el.getBoundingClientRect();
  return [
    ((r.x - clip.x) / clip.width) * 100,
    ((r.y - clip.y) / clip.height) * 100,
    (r.width / clip.width) * 100,
    (r.height / clip.height) * 100,
  ].map((v) => +v.toFixed(1));
}, clip);
// box is [x, y, w, h] for the annotation.
  • Without a clip, divide by innerWidth and innerHeight and subtract nothing.
  • For a full-page capture, add scrollX and scrollY to the box and divide by document.documentElement.scrollWidth and scrollHeight.
  • An element that spans its container, such as a block paragraph, measures as wide as the container. Measure the text instead: give it width: fit-content while you capture, or measure a Range around its text.
  • If an element crosses the clip's edge, cut its box at the edge, so every value stays between 0 and 100.

A still you didn't capture

A frame from a screen recording, a design export, or an image attached to an issue has no DOM. Measure in pixels:

  1. Read the image's natural size, such as with magick identify frame.png or file frame.png.

  2. Find the target's rectangle in pixels in an image viewer that shows the pointer's coordinates.

  3. Divide: x = left / width * 100, y = top / height * 100, w = boxWidth / width * 100, h = boxHeight / height * 100.

  4. Crop the image to that rectangle and look at the crop. It should show the target and little else:

    magick frame.png -crop 320x38+44+134 +repage crop.png

    With Python and Pillow, Image.open("frame.png").crop((44, 134, 364, 172)).save("crop.png") does the same.

For a pair of video frames, take both at the same playback size and use the same crop for both, as you would clip two page captures.

In the render

The rendered page is the last check. A mark that misses there has the wrong numbers: measure it again from the source.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning6d3 checks · Risk SAFE
  • Gen Agent Trust Hub6d

    The skill provides a structured workflow for generating visual evidence (screenshots and recordings) of UI changes. It utilizes standard development tools like Playwright and ffmpeg, and installs utility packages authored by the developer from the npm registry. No malicious patterns or security risks were identified.

  • Socket6d

    No alerts

  • Snyk6d

    Risk: MEDIUM · 2 issues

Signed by skilld at aecfada. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last week

README badge

README badge for onmax/comark-ui/before-after-evidence