Skip to content
Back to skills

Cdp

ASecurity

Visual verification of a running page through Chrome's DevTools Protocol, capturing screenshots and measuring the rendered DOM. Use when a frontend change can only be confirmed once rendered, for layout, spacing, alignment, overflow, or theme tokens.

  • 265 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 7, 2026
ai-agentsexpressgitfrontend

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 7, 2026

npx -y skills add wellwelwel/lagune --skill cdp --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cdp?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cdp
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wellwelwel-cdp/badge)](https://www.skillsdirectory.com/skills/wellwelwel-cdp)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cdp
description: Visual verification of a running page through Chrome's DevTools Protocol, capturing screenshots and measuring the rendered DOM. Use when a frontend change can only be confirmed once rendered, for layout, spacing, alignment, overflow, or theme tokens.
user-invocable: true
metadata:
  author: Weslley Araújo
  version: '1.0.0'
  source: https://github.com/wellwelwel/skills
---

# Rendered result verification

This skill owns the verification of what the browser actually renders. It drives a running page through Chrome's built-in DevTools Protocol (CDP) to inspect the DOM, computed styles, and layout, and to capture screenshots. It works against any URL, whatever app or domain is serving it.

## Measure, never eyeball

For any spacing or alignment claim, measure the rendered DOM and report the numbers. Read geometry off the elements themselves, for example the box between an element and its container's edges, and state the values you found. A screenshot that looks aligned is not evidence.

## When to use it

Reach for it when a change is hard to verify from the source alone: layout, spacing, alignment, overflow, theme tokens, or anything that only shows up once rendered. Skip it for simple, self-evident edits, for example adding a shadow, where the result is obvious from the diff.

## Dependencies

The helper needs `playwright` and `tsx`. Check each with `npm ls <package>`, install whatever is missing as a development dependency with the package manager the root lockfile points to, then fetch the pinned browser with `npx playwright install chromium`.

## Running it

The helper ships with this skill, at [tools/cdp.ts](tools/cdp.ts) next to this file. Run it from the project root under `npx tsx`, pointing at wherever the skill is installed, and write the PNGs to a directory the project ignores in git.

```sh
npx tsx <path-to-this-skill>/tools/cdp.ts --out ./temp/shots --shot 'label|<url>'
```

| Flag                             | Purpose                                                             |
| -------------------------------- | ------------------------------------------------------------------- |
| `--shot 'label\|url'`            | One capture, repeatable. The label names the PNG                    |
| `--measure <expr>`               | Expression evaluated on every shot, its value printed with the shot |
| `--out <dir>`                    | Where the PNGs are written                                          |
| `--attach <port>`                | Reuse a Chromium already exposing a CDP endpoint                    |
| `--width`, `--height`, `--scale` | Viewport and device pixel ratio                                     |
| `--settle <ms>`                  | Wait after load before measuring and capturing                      |

Put any query params the page supports, a forced theme, a route, or a flag, straight in the URL. Take the same shot before and after a change when the point is the difference between them.

Files in this skill

  • SKILL.md2.9 KB
  • tools/cdp.ts6.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.