playwright-browser-snapshot

To capture an accessibility snapshot of the current page, take a structured snapshot for UI inspection.

⭐6stars🔀3forks📁View on GitHub🕐Updated Jan 7, 2026⬇️1downloads

When & Why to Use This Skill

This Claude skill leverages Playwright to capture structured accessibility snapshots of web pages, offering a more data-rich alternative to standard screenshots for UI inspection. By extracting the accessibility tree, it provides agents with a precise, machine-readable representation of the page structure, which is essential for identifying UI elements, debugging layout issues, and ensuring web accessibility compliance.

Use Cases

  • Accessibility Auditing: Automatically capture and analyze the accessibility tree of a website to identify missing ARIA labels, improper heading structures, or navigation obstacles.
  • UI Inspection and Debugging: Use structured snapshots to troubleshoot complex web layouts where visual screenshots fail to reveal the underlying DOM or accessibility properties of specific elements.
  • Automated QA Testing: Integrate structured page snapshots into automated testing workflows to verify that UI components are correctly exposed to assistive technologies and functioning as intended.
nameplaywright-browser-snapshot
description"To capture an accessibility snapshot of the current page, take a structured snapshot for UI inspection."

Usage

Use the MCP tool dev-swarm.request to send the payload as a JSON string:

{"server_id":"playwright","tool_name":"browser_snapshot","arguments":{}}

Tool Description

Capture accessibility snapshot of the current page, this is better than screenshot

Arguments Schema

The schema below describes the arguments object in the request payload.

{
  "type": "object",
  "properties": {
    "filename": {
      "type": "string",
      "description": "Save snapshot to markdown file instead of returning it in the response."
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Background Tasks

If the tool returns a task id, poll the task status via the MCP request tool:

{"server_id":"playwright","method":"tasks/status","params":{"task_id":"<task_id>"}}