layout-inspecting

Installation
SKILL.md

Layout Inspecting

Runs a headless Playwright browser against a URL and walks the DOM to produce a compact JSON tree that mirrors what the human eye sees as distinct visual "boxes" — regions differentiated by background or border color changes.

How It Works

  • Document is the root node; its color is the page canvas background.
  • A child node is included if its background-color or visible border-*-color differs from its parent's effective background.
  • Nodes that are not visually distinct are skipped; their interesting descendants bubble up.
  • Each node includes: label, tag, rect (x/y/width/height in px), background, optional border, optional text snippet, and nested children.

Usage

Run inspect_layout.js using the skill's absolute path. No manual install needed — playwright and Chromium are downloaded automatically into the skill's own directory on first run.

node <path-to-skill>/scripts/inspect_layout.js <url> [options]
Related skills
Installs
1
First Seen
Mar 2, 2026