# lackeyjb/playwright-skill architecture

> Architecture diagram of the GitHub repository lackeyjb/playwright-skill, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lackeyjb/playwright-skill
- Repository: https://github.com/lackeyjb/playwright-skill

## Overview

Playwright Skill equips an agent to author task-specific browser automation, runs that code through a portable Node executor, and returns execution artifacts such as screenshots and console output. Its main runtime is the executor and optional helpers; the skill instructions and API reference guide task authoring. The README documents broader automation scenarios, while source excerpts show executor dispatch and helper behavior. Unsampled skill instructions and API-reference internals are represented only at their documented paths.

Main entry points: [`skills/playwright-skill/run.js`](https://github.com/lackeyjb/playwright-skill/blob/main/skills/playwright-skill/run.js) (Universal executor), [`skills/playwright-skill/lib/helpers.js`](https://github.com/lackeyjb/playwright-skill/blob/main/skills/playwright-skill/lib/helpers.js) (Optional helpers), [`skills/playwright-skill/package.json`](https://github.com/lackeyjb/playwright-skill/blob/main/skills/playwright-skill/package.json) (Playwright API), [`skills/playwright-skill/SKILL.md`](https://github.com/lackeyjb/playwright-skill/blob/main/skills/playwright-skill/SKILL.md) (Skill instructions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Agent authoring"]
  node_skill["Skill instructions<br/>[SKILL.md]"]
  node_api["API reference<br/>[API_REFERENCE.md]"]
  node_custom["Custom automation"]
end

subgraph group_runtime["Automation runtime"]
  node_executor["Universal executor<br/>[run.js]"]
  node_helpers["Optional helpers<br/>[helpers.js]"]
  node_playwright["Playwright API<br/>[package.json]"]
  node_browser["Browser runtime"]
end

subgraph group_artifacts["Outputs and targets"]
  node_devservers["Dev servers"]
  node_site["Target website"]
  node_screenshots["Screenshot files"]
  node_results["Automation results"]
end

node_agent(("Coding agent"))

node_agent -->|"requests automation"| node_skill
node_skill -->|"loads as needed"| node_api
node_agent -->|"writes code"| node_custom
node_custom -->|"runs through"| node_executor
node_executor -->|"resolves modules"| node_playwright
node_executor -->|"loads helpers"| node_helpers
node_helpers -->|"launches browsers"| node_playwright
node_playwright -.->|"controls"| node_browser
node_custom -->|"automates pages"| node_site
node_helpers -->|"probes ports"| node_devservers
node_helpers -->|"writes screenshots"| node_screenshots
node_executor -->|"forwards output"| node_results
node_results -->|"returns results"| node_agent

click node_skill "https://github.com/lackeyjb/playwright-skill/blob/main/skills/playwright-skill/SKILL.md"
click node_api "https://github.com/lackeyjb/playwright-skill/blob/main/skills/playwright-skill/API_REFERENCE.md"
click node_executor "https://github.com/lackeyjb/playwright-skill/blob/main/skills/playwright-skill/run.js"
click node_helpers "https://github.com/lackeyjb/playwright-skill/blob/main/skills/playwright-skill/lib/helpers.js"
click node_playwright "https://github.com/lackeyjb/playwright-skill/blob/main/skills/playwright-skill/package.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_skill,node_api,node_custom toneBlue
class node_executor,node_helpers,node_playwright,node_browser toneAmber
class node_devservers,node_site,node_screenshots,node_results toneMint
class node_agent toneIndigo
```

## Components

### Agent authoring

- [Skill instructions](https://github.com/lackeyjb/playwright-skill/blob/main/skills/playwright-skill/SKILL.md): `skills/playwright-skill/SKILL.md`
- [API reference](https://github.com/lackeyjb/playwright-skill/blob/main/skills/playwright-skill/API_REFERENCE.md): `skills/playwright-skill/API_REFERENCE.md`
- **Custom automation**

### Automation runtime

- [Universal executor](https://github.com/lackeyjb/playwright-skill/blob/main/skills/playwright-skill/run.js): `skills/playwright-skill/run.js`
- [Optional helpers](https://github.com/lackeyjb/playwright-skill/blob/main/skills/playwright-skill/lib/helpers.js): `skills/playwright-skill/lib/helpers.js`
- [Playwright API](https://github.com/lackeyjb/playwright-skill/blob/main/skills/playwright-skill/package.json): `skills/playwright-skill/package.json`
- **Browser runtime**

### Outputs and targets

- **Dev servers**
- **Target website**
- **Screenshot files**
- **Automation results**

### Other components

- **Coding agent**

## Connections

- Coding agent → Skill instructions: requests automation (evidence: `README.md`)
- Skill instructions → API reference: loads as needed (evidence: `README.md`)
- Coding agent → Custom automation: writes code (evidence: `README.md`)
- Custom automation → Universal executor: runs through (evidence: `README.md`)
- Universal executor → Playwright API: resolves modules (evidence: `skills/playwright-skill/run.js`)
- Universal executor → Optional helpers: loads helpers (evidence: `skills/playwright-skill/run.js`)
- Optional helpers → Playwright API: launches browsers (evidence: `skills/playwright-skill/lib/helpers.js`)
- Playwright API → Browser runtime: controls
- Custom automation → Target website: automates pages (evidence: `README.md`)
- Optional helpers → Dev servers: probes ports (evidence: `skills/playwright-skill/lib/helpers.js`)
- Optional helpers → Screenshot files: writes screenshots (evidence: `skills/playwright-skill/lib/helpers.js`)
- Universal executor → Automation results: forwards output (evidence: `skills/playwright-skill/run.js`)
- Automation results → Coding agent: returns results (evidence: `README.md`)
