element-screenshot

Installation
SKILL.md

Element Screenshot

Capture a screenshot of a single DOM element via CDP. Clips output to the element's bounding rectangle.

For Chrome setup and tab ID resolution, see the chrome-cdp skill.

Script

cd .comate/skills/element-screenshot && npm install  # first time only

node screenshot-element.mjs \
  --tab <tabId> \
  --selector <css> \
  --output <path.png> \
  [--cdp localhost:9222] \
  [--no-isolate]

Modes

Default (isolate) — hides every element outside the target's ancestry, clips to the element rect, then restores visibility. The #__vet_overlay__ element (if present) is always preserved. Use this for clean "original" screenshots.

--no-isolate — clips only, no hiding. Use after injecting a visual overlay (e.g. VET) so the overlay stays visible in the crop.

Related skills
Installs
1
First Seen
3 days ago