Skip to content

secondsky/claude-skills / plugins/playwright/skills/playwright

playwright

Verified

Browser automation and E2E testing with Playwright. Auto-detects dev servers, writes clean test scripts. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use for cross-browser testing, visual regression, API testing, component testing in TypeScript/JavaScript and Python projects.

FileKindSize
SKILL.mdskill md14.4 KB
examples/form-test.jsscript876 B
examples/link-checker.jsscript1.8 KB
examples/responsive-test.jsscript1.1 KB
lib/helpers.jsscript13.2 KB
package.jsonmanifest1.0 KB
references/API_REFERENCE.mdmarkdown14.6 KB
run.jsscript7.1 KB

examples/responsive-test.js

View on GitHub
// Example: Test responsive design across multiple viewports
const { chromium } = require('playwright');

const TARGET_URL = 'http://localhost:3000'; // Change as needed

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

  const viewports = [
    { name: 'Desktop', width: 1920, height: 1080 },
    { name: 'Tablet', width: 768, height: 1024 },
    { name: 'Mobile', width: 375, height: 667 },
  ];

  for (const viewport of viewports) {
    console.log(`\nTesting ${viewport.name} (${viewport.width}x${viewport.height})`);

    await page.setViewportSize({
      width: viewport.width,
      height: viewport.height,
    });

    await page.goto(TARGET_URL);
    // Wait for network to be idle before taking screenshot
    await page.waitForLoadState('networkidle');

    await page.screenshot({
      path: `/tmp/${viewport.name.toLowerCase()}.png`,
      fullPage: true,
    });

    console.log(`✅ Screenshot saved: /tmp/${viewport.name.toLowerCase()}.png`);
  }

  console.log('\n✅ All viewports tested');
  await browser.close();
})();
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall