# Playwright

> Headless browser automation that returns structured data. Scrape pages, extract content, interact with web interfaces. Clean JSON over screenshots.

**Skill · v1.0 · Updated 2026-06-10**

Playwright is browser automation that reads the web and hands back clean JSON. Scrape a page, extract a pricing table, pull a changelog, check what a URL contains. It returns structured data rather than screenshots, which keeps each read light and precise.

## Install

### Claude Code (CLI / WSL / Git Bash)

```
/plugin marketplace add https://www.infinitegameos.io/marketplace.json
/plugin install playwright@igos-library
```

### Claude Code (VS Code)

[Install in VS Code](vscode://anthropic.claude-code/install-plugin?plugin=playwright&marketplace=https%3A%2F%2Fwww.infinitegameos.io%2Fmarketplace.json)

Opens the Claude Code plugins dialog with the marketplace and skill prefilled. Requires the Claude Code VS Code extension installed and signed in. Or paste the snippet below into `.claude/settings.json` for VS Code, JetBrains or any setup that prefers manual config:

```json
{
  "extraKnownMarketplaces": {
    "igos-library": {
      "source": {
        "source": "url",
        "url": "https://www.infinitegameos.io/marketplace.json"
      }
    }
  },
  "enabledPlugins": {
    "playwright@igos-library": true
  }
}
```

### Direct markdown URL

```
curl https://www.infinitegameos.io/markdown/skills/playwright
```

Or send `Accept: text/markdown` to https://www.infinitegameos.io/skills/playwright

_This URL returns the narrative concept page. The plugin install path above delivers the operational SKILL.md instruction file._

### Cursor

```
curl -O https://www.infinitegameos.io/install/cursor/playwright.mdc
```

### Aider, Cline, any agent with --read

```
curl -O https://www.infinitegameos.io/markdown/skills/playwright
aider --read playwright.md
```

## Definition

Playwright is a browser automation skill built on headless Chromium. It scrapes pages, extracts structured data and interacts with web interfaces, returning clean JSON rather than screenshots. A single script takes a URL and returns the page title, the cleaned body text and the links, ready to read or pass downstream. The read-before-act posture is the discipline: it retrieves, cleans and returns before anything acts on the result. The browser always closes in a finally block, so no external state lingers. It also ships inside the Sovereign Ecosystem Foundation, where it covers structured page reads and watch checks.

## A URL in, clean JSON out

The script takes a URL and returns a structured object: the page title, the cleaned body text and the links with their text and href. You tell your AI what you need in plain language, it runs the read and hands back the data. A changelog, a pricing table, an article body, the contents of a page that may or may not load. Each one comes back as data you can work with directly.

Structured output is the reason this stays light. A screenshot-based read costs many thousands of tokens and returns pixels you still have to interpret. A structured read returns the text and the links already cleaned. The skill asserts data quality too: a blocked or failed scrape surfaces as a clear failure rather than returning corrupted output dressed as a result.

## Use Cases

**Watching a repo for what shipped**

A tech-watch list tracks several repositories. Playwright reads the changelog and release notes, returns the structured text and your AI summarizes what changed since the last check. No manual page visits, no screenshots to squint at.

**Pulling a pricing table as data**

A competitor publishes pricing on a live page. Playwright extracts the table as a JSON array, ready to compare or store. The read is precise and the output drops straight into the next step.

**Confirming a URL loads and what it holds**

A link needs verifying before it ships. Playwright loads the page, returns the title and the body text and confirms the content is what you expect. A quick, structured check instead of a manual visit.

## FAQ

**Why JSON instead of screenshots?**

A structured read returns cleaned text and links you can work with directly. A screenshot returns pixels you still have to interpret, at many times the token cost. JSON keeps each page read light, precise and ready for the next step.

**What happens when a site blocks the scrape?**

It surfaces as a clear failure rather than returning corrupted output. For sites behind a bot wall, a stealth layer can be added. The discipline is to assert data quality, so a blocked read reads as blocked, not as an empty success.

**Does Playwright write to the pages it reads?**

No. It reads. The posture is retrieve, clean and return before anything acts on the result. The browser always closes in a finally block, so no external state lingers after a run.

## Related

- [Source Harvest](https://www.infinitegameos.io/skills/source-harvest)
- [Researcher](https://www.infinitegameos.io/skills/researcher)
- [Systematic Debugging](https://www.infinitegameos.io/skills/systematic-debugging)

---

Playwright is the read tool. Source Harvest is the discipline for turning what you read into integrated patterns. Both ship inside the Sovereign Ecosystem Foundation, a starting workspace you can adopt and make your own. The wider system that puts structured reads to work is The Sovereign Life Playbook.

[See the Sovereign Life Playbook](https://www.sidequesthq.co/products/sovereign-life-playbook)

---

_Provenance: This skill ships in both homes, the Sovereign Ecosystem Foundation and this library. Template repo: https://github.com/infinitegameplayer/sovereign-ecosystem_

---
*[Infinite Game OS](https://www.infinitegameos.io) · [Skills](https://www.infinitegameos.io/skills) · [Playwright](https://www.infinitegameos.io/skills/playwright)*
