MR
Mayur Rathi
@mayurrathi
⭐ 40.7k GitHub stars

Playwright Skill

Playwright Skill is an design AI skill with a core value of Complete browser automation with Playwright. It helps developers solve real-world problems in the design domain, boosting efficiency, automating repetitive tasks, and optimizing workflows.

Complete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login ...

Last verified on: 2026-07-07

Quick Facts

Category design
Works With Claude
Source sickn33/antigravity-awesome-skills
Stars ⭐ 40.7k
Last Verified 2026-07-07
Risk Level High
mkdir -p ./skills/playwright-skill && curl -sfL https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/skills/playwright-skill/SKILL.md -o ./skills/playwright-skill/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

**IMPORTANT - Path Resolution:**

This skill can be installed in different locations (plugin system, manual installation, global, or project-specific). Before executing any commands, determine the skill directory based on where you loaded this SKILL.md file, and use that path in all commands below. Replace `$SKILL_DIR` with the actual discovered path.


Common installation paths:


- Plugin system: `~/.claude/plugins/marketplaces/playwright-skill/skills/playwright-skill`

- Manual global: `~/.claude/skills/playwright-skill`

- Project-specific: `<project>/.claude/skills/playwright-skill`


# Playwright Browser Automation


General-purpose browser automation skill. I'll write custom Playwright code for any automation task you request and execute it via the universal executor.


**CRITICAL WORKFLOW - Follow these steps in order:**


1. **Auto-detect dev servers** - For localhost testing, ALWAYS run server detection FIRST:


```bash

cd $SKILL_DIR && node -e "require('./lib/helpers').detectDevServers().then(servers => console.log(JSON.stringify(servers)))"

```


- If **1 server found**: Use it automatically, inform user

- If **multiple servers found**: Ask user which one to test

- If **no servers found**: Ask for URL or offer to help start dev server


2. **Write scripts to /tmp** - NEVER write test files to skill directory; always use `/tmp/playwright-test-*.js`


3. **Use visible browser by default** - Always use `headless: false` unless user specifically requests headless mode


4. **Parameterize URLs** - Always make URLs configurable via environment variable or constant at top of script


How It Works


1. You describe what you want to test/automate

2. I auto-detect running dev servers (or ask for URL if testing external site)

3. I write custom Playwright code in `/tmp/playwright-test-*.js` (won't clutter your project)

4. I execute it via: `cd $SKILL_DIR && node run.js /tmp/playwright-test-*.js`

5. Results displayed in real-time, browser window visible for debugging

6. Test files auto-cleaned from /tmp by your OS


Setup (First Time)


bash
cd $SKILL_DIR
npm run setup

This installs Playwright and Chromium browser. Only needed once.


Execution Pattern


**Step 1: Detect dev servers (for localhost testing)**


bash
cd $SKILL_DIR && node -e "require('./lib/helpers').detectDevServers().then(s => console.log(JSON.stringify(s)))"

**Step 2: Write test script to /tmp with URL parameter**


javascript
// /tmp/playwright-test-page.js
const { chromium } = require('playwright');

// Parameterized URL (detected or user-provided)
const TARGET_URL = 'http://localhost:3001'; // <-- Auto-detected or from user

(async () => {
  const browser = await chromium.launch({ headless: false });
  const page = await browser.newPage();

  await page.goto(TARGET_URL);
  console.log('Page loaded:', await page.title());

  await page.screenshot({ path: '/tmp/screenshot.png', fullPage: true });
  console.log('📸 Screenshot saved to /tmp/screenshot.png');

  await browser.close();
})();

**Step 3: Execute from skill directory**


bash
cd $SKILL_DIR && node run.js /tmp/playwright-test-page.js

Common Patterns


Test a Page (Multiple Viewports)


javascript
// /tmp/playwright-test-responsive.js
const { chromium } = require('playwright');

const TARGET_URL = 'http://localhost:3001'; // Auto-detected

(async () => {
  const browser = await chromium.launch({ headless: false, slowMo: 100 });
  const page = await browser.newPage();

  // Desktop test
  await page.setViewportSize({ width: 1920, height: 1080 });
  await page.goto(TARGET_URL);
  console.log('Desktop - Title:', await page.title());
  await page.screenshot({ path: '/tmp/desktop.png', fullPage: true });

  // Mobile test
  await page.setViewportSize({ width: 375, height: 667 });
  await page.screenshot({ path: '/tmp/mobile.png', fullPage: true });

  await browser.close();
})();

Test Login Flow


javascript
// /tmp/playwright-test-login.js
const { chrom

🎯 Best For

  • QA engineers
  • Developers writing unit tests
  • UX researchers
  • Product managers
  • Claude users

💡 Use Cases

  • Generating test cases for edge conditions
  • Writing integration test suites
  • Mapping user journeys
  • Identifying friction points

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Playwright Skill to Your Work

    Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.

  4. 4

    Review and Refine

    Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.

❓ Frequently Asked Questions

Does this generate test mocks?

Many testing skills include mock generation. Check the install command and skill content for details.

Can this analyze user behavior data?

UX research skills work best when you provide session recordings, heatmaps, and analytics data.

Does Playwright Skill generate production-ready design specs?

It generates detailed specifications that developers can use directly. Review and adjust for your specific design system.

How do I install Playwright Skill?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/playwright-skill/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Not testing edge cases

AI tends to generate happy-path tests. Manually review for boundary conditions.

Over-relying on AI insights

UX decisions should combine AI analysis with direct user feedback and research.

Not reading the full skill

Skills contain important context and edge cases beyond the quick start.

🔗 Related Skills