What is Playwright CLI?
Playwright CLI is a free, open-source tool from Microsoft that lets your AI drive a browser from the terminal. It opens pages, clicks, types, takes screenshots and reads the errors your site prints in the browser console.
It's the check you'd do by hand after every change, done by your AI. The browser runs hidden, so no window pops up unless you ask for one.
Step 1: Install it
You need Node.js 18 or newer. Install the tool once for your whole computer:
npm install -g @playwright/cli@latestThen, inside your project folder, add its skill so Claude Code knows the commands:
playwright-cli install --skillsThis adds one skill to .claude/skills/playwright-cli in that project.
Step 2: Ask your AI to check your site
Open your project in Claude Code or Codex and paste one of these, with your own address:
Use playwright-cli to open https://yoursite.com and list every console error.Use playwright-cli to open my homepage at 390 by 844, a phone-sized screen, and take a screenshot.Use playwright-cli to click every link in my menu and tell me which ones lead to a missing page.Screenshots and page notes are saved in a .playwright-cli folder in your project. Add --headed to the open command when you want to watch the browser.
What should you watch out for?
Your AI clicks what you tell it to. On your live site, a test form it sends or a test order it places is real, so say "don't submit anything" or test on a copy of your site.
It sees what a visitor sees, so it won't find problems on your server, like a slow database.
