Modern QA2026The Skill-Based Browser Automation Stack
Log inJoin
1 / 3 · Book 1 · What Are Agent Skills? · drill: interview Q&A⊞ allnext →Get the book →

1.5The Skill-Based Browser Automation Stack

Here is the architecture we build throughout this book:

+-------------------------------------------------------+
|                   Test Definitions                    |
|   (Markdown/YAML plans with natural-language steps)   |
+-------------------------------------------------------+
                          |
                          v
+-------------------------------------------------------+
|        AI Agent Layer (Claude Code, Cursor, ...)      |
|                                                       |
|  +--------------+  +--------------+  +--------------+ |
|  | playwright-  |  | Custom Test  |  | Reporting    | |
|  | cli skill    |  | Skills       |  | Skill        | |
|  +------+-------+  +------+-------+  +------+-------+ |
|         |                 |                 |         |
+---------+-----------------+-----------------+---------+
          |                 |                 |
          v                 v                 v
+-------------------------------------------------------+
|                       Bash Tool                       |
+-------------------------------------------------------+
                          |
                          v
+-------------------------------------------------------+
|            playwright-cli (@playwright/cli)           |
|                                                       |
|  - Disk-first snapshots (.playwright-cli/)            |
|  - Element refs (e8, e14, ...)                        |
|  - Named parallel sessions                            |
|  - Auth state save/load                               |
+-------------------------------------------------------+
                          |
                          v
+-------------------------------------------------------+
|                   Playwright engine                   |
|   (auto-waiting, actionability, browser lifecycle)    |
+-------------------------------------------------------+
                          |
                          v
+-------------------------------------------------------+
|             Chromium / Firefox / WebKit               |
+-------------------------------------------------------+

Each layer has one responsibility:

  1. Test Definitions describe what to test in human-readable form
  2. The AI Agent decides how to test; the skill lives inside this layer and supplies the domain knowledge (the CLI command surface)
  3. The Bash Tool is the execution bridge to the operating system
  4. playwright-cli is the agent-facing command surface -- it writes page snapshots to disk as compact YAML with element refs, so the agent reads state on demand instead of receiving it on every action
  5. The Playwright engine handles browser mechanics: launching, auto-waiting, actionability checks, session management
  6. The browser (Chromium, Firefox, or WebKit) is what gets automated

Notice what this stack does NOT trade away. Underneath the AI layer sits the same battle-tested Playwright engine that runs millions of conventional test suites. The agent gets flexibility; the engine keeps reliability.