meticulous-simulate-and-diff
alwaysmeticulous/skills
Run session simulations and detect visual regressions via pixel and HTML diffs.
What is meticulous-simulate-and-diff?
Simulates a recorded Meticulous session against a live URL and compares the visual output to a baseline replay to identify regressions. Use this when you need to verify that code changes haven't introduced unintended visual changes for a specific user session.
- Run a session simulation against a live app URL in headless mode
- Compare pixel-level diffs against a base replay to detect visual changes
- Analyze HTML metadata snapshots to understand structural vs. visual-only changes
- Generate diff images highlighting changed pixels for each screenshot
- Provide direct URLs to the Meticulous UI for visual inspection and comparison
How to install meticulous-simulate-and-diff
npx skills add https://github.com/alwaysmeticulous/skills --skill meticulous-simulate-and-diff- A sessionId from a recorded Meticulous session
- An appUrl (local dev server or original recorded URL)
- Optionally: a baseReplayId from a prior replay to diff against (required for regression detection)
- Meticulous CLI installed and up to date
How to use meticulous-simulate-and-diff
- 1.Run meticulous-cli-update skill to ensure CLI is current
- 2.Execute meticulous simulate with --sessionId, --appUrl, and optionally --baseReplayId in headless mode
- 3.Extract the headReplayId from the simulation URL output
- 4.Locate the local replay directory in ~/.meticulous/replays/
- 5.List diff images in the diffs/ subdirectory to see which screenshots changed
- 6.Read the .metadata.json files for both head and base replays to compare HTML and DOM changes
- 7.Analyze pixel diff counts and HTML diffs to identify what changed and why
- 8.Summarize findings with affected routes, CSS classes, and structural vs. visual changes
Use cases
- Verify a CSS or component change doesn't break the UI for a recorded user session
- Detect unintended visual regressions before merging code
- Compare screenshots across multiple routes to identify shared component issues
- Inspect pixel diffs and HTML changes side-by-side to root-cause visual bugs
- Frontend engineers verifying visual changes
- QA engineers checking for regressions
- Developers using Meticulous for session-based testing
meticulous-simulate-and-diff FAQ
Diff mode (with --baseReplayId) compares against a baseline replay and generates pixel/HTML diffs to detect regressions. Quick-check mode (without --baseReplayId) stores screenshots locally for direct visual inspection but does not perform automated comparison.
Pixel diff images are in ~/.meticulous/replays/<replayDir>/diffs/<baseReplayId>/, and HTML metadata snapshots are in ~/.meticulous/replays/<replayDir>/screenshots/ with .metadata.json extensions.
Download a prior test run using meticulous download test-run, then inspect ~/.meticulous/test-runs/<testRunId>/coverage.json or check the testCases[].replayId fields.
That indicates a purely visual change (e.g., color, spacing, or animation) rather than a structural DOM change.
Yes; re-run meticulous simulate with the same sessionId and appUrl but a different --baseReplayId to compare against a different baseline.
Full instructions (SKILL.md)
Source of truth, from alwaysmeticulous/skills.
name: meticulous-simulate-and-diff description: Run a Meticulous session simulation against a live URL and analyze the visual output — either by inspecting screenshots directly (quick-check mode) or by comparing pixel and HTML diffs against a base replay. Use when checking whether a code change has introduced visual regressions for a specific session. user-invocable: true
Simulate a session and analyze diffs
This skill covers running a single simulation and interpreting the results. For the simulate command's full option reference see the meticulous-cli skill's simulate reference.
Before starting, run the
meticulous-cli-updateskill to ensure the Meticulous CLI and skills are up to date — unless it has already run earlier in this conversation, in which case skip it.
Prerequisites
- A
sessionIdto replay - An
appUrl(local dev server, or leave blank to use the original recorded URL) - Optionally: a
baseReplayId— the ID of a prior replay to diff screenshots against. Without this, screenshots are stored but not compared.
If you don't have a baseReplayId, you can find one from a downloaded test run:
meticulous download test-run
# Then inspect ~/.meticulous/test-runs/<testRunId>/coverage.json
# or check the testCases[].replayId fields
Step 1 — Run the simulation
With a base replay (diff mode)
meticulous simulate \
--sessionId=<sessionId> \
--appUrl=<url> \
--baseReplayId=<baseReplayId> \
--headless
Capture the full stdout. Key things to look for:
# Per-screenshot diff outcomes (one line each):
0.412% pixel mismatch for screenshot screenshot-1234.png (threshold is 0.100%) => FAIL!
0.000% pixel mismatch for screenshot screenshot-5678.png (threshold is 0.100%) => PASS
# Final summary block:
=======
View simulation at: https://app.meticulous.ai/projects/<org>/<project>/simulations/<headReplayId>
View comparison with base: https://app.meticulous.ai/projects/<org>/<project>/simulations/<baseReplayId>/compare-to/<headReplayId>
=======
If there are no FAIL! lines: the session is visually identical to the base — report no regressions, then proceed to Step 6.
Proceed to Steps 2–6 to locate and analyse any diffs, then submit feedback.
Without a base replay (quick-check mode)
If no baseReplayId is available, omit it. Screenshots are still stored locally for direct visual inspection:
meticulous simulate \
--sessionId=<sessionId> \
--appUrl=<url> \
--headless
Then locate the replay directory (Step 2) and open the screenshots in <replayDir>/screenshots/ to verify the UI looks correct. There are no diff images in this mode — inspection is purely visual. Steps 3–5 do not apply; still complete Step 6 after inspection.
Step 2 — Extract the head replay ID and locate the replay directory
From the View simulation at: URL, extract the <headReplayId> (the last path segment).
To find the local replay directory created by this run:
ls -lt ~/.meticulous/replays/ | head -5
The most recently created entry will be the head replay's directory (named with a timestamp, e.g. 2024-01-15T12-30-45.123Z-abc123/). Note this path — it's referred to below as <replayDir>.
Step 3 — Identify which screenshots diffed
ls ~/.meticulous/replays/<replayDir>/diffs/<baseReplayId>/
Each .png file here corresponds to a screenshot where a visual difference was detected. The pixel diff image highlights changed pixels in color. There are also thumb_ prefixed thumbnail versions.
Note the filenames — they match the screenshot identifiers (e.g. screenshot-after-event-42.png).
Step 4 — Analyze the HTML diff for each diffed screenshot
Each screenshot has a corresponding metadata file containing a full HTML snapshot of the page taken just before the screenshot was captured. These files are already on disk:
- Head metadata:
~/.meticulous/replays/<replayDir>/screenshots/<screenshotFilename>.metadata.json - Base metadata:
~/.meticulous/replays/<baseReplayId>/screenshots/<screenshotFilename>.metadata.json
The base metadata is permanently cached when the simulation downloads the base replay, so no additional download is needed.
Read both .metadata.json files. The relevant fields are:
before.dom— full HTML of the page at screenshot time; diff these two strings to understand what changedbefore.routeData.url— which page/route the screenshot was taken on
When diffing the HTML, focus on tag additions/removals, class attribute changes, and text content changes.
The per-screenshot stdout lines also report mismatchFraction (proportion of pixels that changed). If there is a pixel diff but the before.dom strings are identical, the change is purely visual (e.g. a color shift) rather than structural.
Step 5 — Summarize the findings
The key output from this skill is a high-level human-readable description of what visually changed and why. Use the pixel diff counts, route URLs, changed class names, and HTML diffs gathered above to answer: what did the user experience change, and which part of the UI is responsible?
Present this in whatever format fits the current context (conversational answer, structured report, input to a calling workflow, etc.). Useful signals to draw on:
- Which routes were affected
- Which CSS classes appeared in the changed DOM regions (these usually map directly to components)
- Whether changes were structural (DOM additions/removals) or purely visual (pixel shift with no HTML diff)
- Whether the same change appears across multiple screenshots (suggesting a shared component changed) vs. isolated to one screenshot
The comparison URL logged to stdout is always worth surfacing, as it lets a human quickly verify the diff visually:
https://app.meticulous.ai/.../simulations/<baseReplayId>/compare-to/<headReplayId>
Notes
- The pixel diff images at
~/.meticulous/replays/<replayDir>/diffs/<baseReplayId>/can be opened directly for visual inspection. - If
--baseReplayIdis omitted, no diff analysis is possible. Screenshots are still stored locally and can be compared later by re-running with--baseReplayIdset to the head replay ID from the first run. - For the full iterative development workflow (session discovery, per-step commits, and final cloud run), see the
meticulous-iterative-devskill.
Step 6 — Report feedback to Meticulous
As the last step, after summarizing the findings, submit one brief feedback note to the Meticulous team: did the simulation and diffs help you verify the change, was anything confusing, and what information would have made the task easier?
# CLI
meticulous agent submit-feedback --message="<one or two sentences>" --outcome=<helped|neutral|hindered> --skill=meticulous-simulate-and-diff
# MCP
submit_feedback(message="<one or two sentences>", outcome="<helped|neutral|hindered>", skill="meticulous-simulate-and-diff")
Related skills
More from alwaysmeticulous/skills and the wider catalog.

meticulous-test
Run visual regression tests on frontend changes, then classify diffs as intended or unintended.

meticulous-use-session-data
Download and use Meticulous session data—user flows and network mocks—to test code changes locally.

meticulous-zero-diff-task
Implement zero-diff tasks by iterating against Meticulous visual diffs until clean before opening a PR.

meticulous-cli
CLI tool to record user sessions and replay them to detect visual regressions.

Agent Browser
Fast Rust-based headless browser automation for AI agents to navigate, click, type, and extract data from web pages.

context7
Fetch current library documentation via Context7 API to avoid outdated knowledge.