Skip to content

aiskillstore/marketplace / skills/0xbigboss/playwright-best-practices

playwright-best-practices

Verified

Use when writing or modifying Playwright tests (.spec.ts, .test.ts with @playwright/test imports).

FileKindSize
SKILL.mdskill md2.7 KB
playwright-patterns.mdmarkdown11.6 KB
skill-report.jsonconfig58.5 KB

skill-report.json

View on GitHub
{
  "schema_version": "2.0",
  "meta": {
    "generated_at": "2026-07-06T13:48:34.189Z",
    "slug": "0xbigboss-playwright-best-practices",
    "source_url": "https://github.com/0xBigBoss/claude-code/tree/main/.claude/skills/playwright-best-practices",
    "source_ref": "main",
    "model": "codex",
    "analysis_version": "3.0.0",
    "source_type": "community",
    "content_hash": "87d117ee9a597db083f4ea8c0d4ef70275f8f9f2b6a6dd7b89b3d9a3217fd04e",
    "tree_hash": "b69132d21610580b01b5c56df02fa7bf452b962231a58d459f2f07e7f41491b3",
    "provenance": {
      "model_effective": "codex",
      "fallback_chain": [
        {
          "agent": "codex",
          "outcome": "success"
        }
      ],
      "analysis_version": "3.0.0"
    }
  },
  "skill": {
    "name": "playwright-best-practices",
    "description": "Use when writing or improving Playwright tests with reliable locators, web-first assertions, fixtures, auth reuse, network mocking, and lean CLI reporter settings.",
    "summary": "Guides reliable Playwright tests with resilient locators, fixtures, auth reuse, network mocks, and compact reporter settings.",
    "icon": "📦",
    "version": "1.0.1",
    "author": "0xBigBoss",
    "license": "MIT",
    "tags": [
      "playwright",
      "testing",
      "e2e",
      "browser-automation",
      "test-reliability"
    ],
    "supported_tools": [
      "claude",
      "codex",
      "claude-code"
    ],
    "risk_factors": [
      "external_commands",
      "network",
      "filesystem",
      "env_access"
    ],
    "category": "coding"
  },
  "security_audit": {
    "risk_level": "safe",
    "is_blocked": false,
    "safe_to_publish": true,
    "analysis_status": "ok",
    "summary": "The skill is documentation-only and contains Playwright examples rather than executable automation. Static detections were false positives from Markdown code spans, TypeScript template literals, relative imports, local test URLs, and standard Playwright environment variables. No evidence found of prompt injection, credential exfiltration, or malicious system access.",
    "remediation": [],
    "risk_factor_evidence": [
      {
        "factor": "external_commands",
        "evidence": [
          {
            "file": "playwright-patterns.md",
            "line_start": 73,
            "line_end": 90
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 194,
            "line_end": 198
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 297,
            "line_end": 303
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 303,
            "line_end": 306
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 397,
            "line_end": 405
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 405,
            "line_end": 410
          },
          {
            "file": "SKILL.md",
            "line_start": 12,
            "line_end": 12
          },
          {
            "file": "SKILL.md",
            "line_start": 18,
            "line_end": 18
          },
          {
            "file": "SKILL.md",
            "line_start": 19,
            "line_end": 19
          },
          {
            "file": "SKILL.md",
            "line_start": 20,
            "line_end": 20
          },
          {
            "file": "SKILL.md",
            "line_start": 21,
            "line_end": 21
          },
          {
            "file": "SKILL.md",
            "line_start": 22,
            "line_end": 22
          },
          {
            "file": "SKILL.md",
            "line_start": 23,
            "line_end": 23
          },
          {
            "file": "SKILL.md",
            "line_start": 24,
            "line_end": 24
          },
          {
            "file": "SKILL.md",
            "line_start": 29,
            "line_end": 29
          },
          {
            "file": "SKILL.md",
            "line_start": 31,
            "line_end": 31
          },
          {
            "file": "SKILL.md",
            "line_start": 36,
            "line_end": 36
          },
          {
            "file": "SKILL.md",
            "line_start": 37,
            "line_end": 37
          },
          {
            "file": "SKILL.md",
            "line_start": 43,
            "line_end": 43
          },
          {
            "file": "SKILL.md",
            "line_start": 48,
            "line_end": 48
          },
          {
            "file": "SKILL.md",
            "line_start": 50,
            "line_end": 50
          },
          {
            "file": "SKILL.md",
            "line_start": 56,
            "line_end": 56
          },
          {
            "file": "SKILL.md",
            "line_start": 58,
            "line_end": 58
          }
        ]
      },
      {
        "factor": "network",
        "evidence": [
          {
            "file": "playwright-patterns.md",
            "line_start": 268,
            "line_end": 268
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 253,
            "line_end": 253
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 326,
            "line_end": 326
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 353,
            "line_end": 353
          }
        ]
      },
      {
        "factor": "filesystem",
        "evidence": [
          {
            "file": "playwright-patterns.md",
            "line_start": 139,
            "line_end": 139
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 140,
            "line_end": 140
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 208,
            "line_end": 208
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 229,
            "line_end": 229
          }
        ]
      },
      {
        "factor": "env_access",
        "evidence": [
          {
            "file": "playwright-patterns.md",
            "line_start": 212,
            "line_end": 212
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 213,
            "line_end": 213
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 244,
            "line_end": 244
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 317,
            "line_end": 317
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 318,
            "line_end": 318
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 319,
            "line_end": 319
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 321,
            "line_end": 321
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 326,
            "line_end": 326
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 354,
            "line_end": 354
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 212,
            "line_end": 212
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 213,
            "line_end": 213
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 244,
            "line_end": 244
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 317,
            "line_end": 317
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 318,
            "line_end": 318
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 319,
            "line_end": 319
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 321,
            "line_end": 321
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 326,
            "line_end": 326
          },
          {
            "file": "playwright-patterns.md",
            "line_start": 354,
            "line_end": 354
          }
        ]
      }
    ],
    "static_findings": [
      {
        "id": "external_commands:playwright-patterns.md:73:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "playwright-patterns.md",
        "line_start": 73,
        "line_end": 90,
        "snippet": "this.log = debug(`test:page:${this.constructor.name}`);"
      },
      {
        "id": "external_commands:playwright-patterns.md:194:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "playwright-patterns.md",
        "line_start": 194,
        "line_end": 198,
        "snippet": "page.on('console', msg => console.log(`[browser] ${msg.text()}`));"
      },
      {
        "id": "external_commands:playwright-patterns.md:297:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "playwright-patterns.md",
        "line_start": 297,
        "line_end": 303,
        "snippet": "await request.delete(`/api/users/${userId}`); // Breaks if run alone"
      },
      {
        "id": "external_commands:playwright-patterns.md:303:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "playwright-patterns.md",
        "line_start": 303,
        "line_end": 306,
        "snippet": "const deleteResponse = await request.delete(`/api/users/${id}`);"
      },
      {
        "id": "external_commands:playwright-patterns.md:397:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "playwright-patterns.md",
        "line_start": 397,
        "line_end": 405,
        "snippet": "await this.page.request.delete(`/api/users/${id}`);"
      },
      {
        "id": "external_commands:playwright-patterns.md:405:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "playwright-patterns.md",
        "line_start": 405,
        "line_end": 410,
        "snippet": "email: `test-${Date.now()}@example.com`,"
      },
      {
        "id": "network:playwright-patterns.md:268:fetch-api-call",
        "category": "network",
        "severity": "low",
        "pattern": "Fetch API call",
        "file": "playwright-patterns.md",
        "line_start": 268,
        "line_end": 268,
        "snippet": "const response = await route.fetch();"
      },
      {
        "id": "network:playwright-patterns.md:253:python-http-libraries",
        "category": "network",
        "severity": "low",
        "pattern": "Python HTTP libraries",
        "file": "playwright-patterns.md",
        "line_start": 253,
        "line_end": 253,
        "snippet": "Always set up routes before navigation — routes must be registered before the page makes requests."
      },
      {
        "id": "network:playwright-patterns.md:326:hardcoded-url",
        "category": "network",
        "severity": "low",
        "pattern": "Hardcoded URL",
        "file": "playwright-patterns.md",
        "line_start": 326,
        "line_end": 326,
        "snippet": "baseURL: process.env.BASE_URL ?? 'http://localhost:3000',"
      },
      {
        "id": "network:playwright-patterns.md:353:hardcoded-url",
        "category": "network",
        "severity": "low",
        "pattern": "Hardcoded URL",
        "file": "playwright-patterns.md",
        "line_start": 353,
        "line_end": 353,
        "snippet": "url: 'http://localhost:3000',"
      },
      {
        "id": "filesystem:playwright-patterns.md:139:path-traversal-sequence",
        "category": "filesystem",
        "severity": "high",
        "pattern": "Path traversal sequence",
        "file": "playwright-patterns.md",
        "line_start": 139,
        "line_end": 139,
        "snippet": "import { LoginPage } from '../pages/login.page';"
      },
      {
        "id": "filesystem:playwright-patterns.md:140:path-traversal-sequence",
        "category": "filesystem",
        "severity": "high",
        "pattern": "Path traversal sequence",
        "file": "playwright-patterns.md",
        "line_start": 140,
        "line_end": 140,
        "snippet": "import { DashboardPage } from '../pages/dashboard.page';"
      },
      {
        "id": "filesystem:playwright-patterns.md:208:hidden-file-access",
        "category": "filesystem",
        "severity": "medium",
        "pattern": "Hidden file access",
        "file": "playwright-patterns.md",
        "line_start": 208,
        "line_end": 208,
        "snippet": "const authFile = 'playwright/.auth/user.json';"
      },
      {
        "id": "filesystem:playwright-patterns.md:229:hidden-file-access",
        "category": "filesystem",
        "severity": "medium",
        "pattern": "Hidden file access",
        "file": "playwright-patterns.md",
        "line_start": 229,
        "line_end": 229,
        "snippet": "storageState: 'playwright/.auth/user.json',"
      },
      {
        "id": "env_access:playwright-patterns.md:212:environment-variable-access-dot-notation",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable access (dot notation)",
        "file": "playwright-patterns.md",
        "line_start": 212,
        "line_end": 212,
        "snippet": "await page.getByLabel('Email').fill(process.env.TEST_USER_EMAIL!);"
      },
      {
        "id": "env_access:playwright-patterns.md:213:environment-variable-access-dot-notation",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable access (dot notation)",
        "file": "playwright-patterns.md",
        "line_start": 213,
        "line_end": 213,
        "snippet": "await page.getByLabel('Password').fill(process.env.TEST_USER_PASSWORD!);"
      },
      {
        "id": "env_access:playwright-patterns.md:244:environment-variable-access-dot-notation",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable access (dot notation)",
        "file": "playwright-patterns.md",
        "line_start": 244,
        "line_end": 244,
        "snippet": "data: { email: process.env.TEST_USER_EMAIL, password: process.env.TEST_USER_PASSWORD },"
      },
      {
        "id": "env_access:playwright-patterns.md:317:environment-variable-access-dot-notation",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable access (dot notation)",
        "file": "playwright-patterns.md",
        "line_start": 317,
        "line_end": 317,
        "snippet": "forbidOnly: !!process.env.CI,"
      },
      {
        "id": "env_access:playwright-patterns.md:318:environment-variable-access-dot-notation",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable access (dot notation)",
        "file": "playwright-patterns.md",
        "line_start": 318,
        "line_end": 318,
        "snippet": "retries: process.env.CI ? 2 : 0,"
      },
      {
        "id": "env_access:playwright-patterns.md:319:environment-variable-access-dot-notation",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable access (dot notation)",
        "file": "playwright-patterns.md",
        "line_start": 319,
        "line_end": 319,
        "snippet": "workers: process.env.CI ? 1 : undefined,"
      },
      {
        "id": "env_access:playwright-patterns.md:321:environment-variable-access-dot-notation",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable access (dot notation)",
        "file": "playwright-patterns.md",
        "line_start": 321,
        "line_end": 321,
        "snippet": "reporter: process.env.CI || process.env.CLAUDE"
      },
      {
        "id": "env_access:playwright-patterns.md:326:environment-variable-access-dot-notation",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable access (dot notation)",
        "file": "playwright-patterns.md",
        "line_start": 326,
        "line_end": 326,
        "snippet": "baseURL: process.env.BASE_URL ?? 'http://localhost:3000',"
      },
      {
        "id": "env_access:playwright-patterns.md:354:environment-variable-access-dot-notation",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable access (dot notation)",
        "file": "playwright-patterns.md",
        "line_start": 354,
        "line_end": 354,
        "snippet": "reuseExistingServer: !process.env.CI,"
      },
      {
        "id": "env_access:playwright-patterns.md:212:environment-variable-object",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable object",
        "file": "playwright-patterns.md",
        "line_start": 212,
        "line_end": 212,
        "snippet": "await page.getByLabel('Email').fill(process.env.TEST_USER_EMAIL!);"
      },
      {
        "id": "env_access:playwright-patterns.md:213:environment-variable-object",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable object",
        "file": "playwright-patterns.md",
        "line_start": 213,
        "line_end": 213,
        "snippet": "await page.getByLabel('Password').fill(process.env.TEST_USER_PASSWORD!);"
      },
      {
        "id": "env_access:playwright-patterns.md:244:environment-variable-object",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable object",
        "file": "playwright-patterns.md",
        "line_start": 244,
        "line_end": 244,
        "snippet": "data: { email: process.env.TEST_USER_EMAIL, password: process.env.TEST_USER_PASSWORD },"
      },
      {
        "id": "env_access:playwright-patterns.md:317:environment-variable-object",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable object",
        "file": "playwright-patterns.md",
        "line_start": 317,
        "line_end": 317,
        "snippet": "forbidOnly: !!process.env.CI,"
      },
      {
        "id": "env_access:playwright-patterns.md:318:environment-variable-object",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable object",
        "file": "playwright-patterns.md",
        "line_start": 318,
        "line_end": 318,
        "snippet": "retries: process.env.CI ? 2 : 0,"
      },
      {
        "id": "env_access:playwright-patterns.md:319:environment-variable-object",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable object",
        "file": "playwright-patterns.md",
        "line_start": 319,
        "line_end": 319,
        "snippet": "workers: process.env.CI ? 1 : undefined,"
      },
      {
        "id": "env_access:playwright-patterns.md:321:environment-variable-object",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable object",
        "file": "playwright-patterns.md",
        "line_start": 321,
        "line_end": 321,
        "snippet": "reporter: process.env.CI || process.env.CLAUDE"
      },
      {
        "id": "env_access:playwright-patterns.md:326:environment-variable-object",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable object",
        "file": "playwright-patterns.md",
        "line_start": 326,
        "line_end": 326,
        "snippet": "baseURL: process.env.BASE_URL ?? 'http://localhost:3000',"
      },
      {
        "id": "env_access:playwright-patterns.md:354:environment-variable-object",
        "category": "env_access",
        "severity": "low",
        "pattern": "Environment variable object",
        "file": "playwright-patterns.md",
        "line_start": 354,
        "line_end": 354,
        "snippet": "reuseExistingServer: !process.env.CI,"
      },
      {
        "id": "sensitive:playwright-patterns.md:212:environment-file-access",
        "category": "sensitive",
        "severity": "high",
        "pattern": "Environment file access",
        "file": "playwright-patterns.md",
        "line_start": 212,
        "line_end": 212,
        "snippet": "await page.getByLabel('Email').fill(process.env.TEST_USER_EMAIL!);"
      },
      {
        "id": "sensitive:playwright-patterns.md:213:environment-file-access",
        "category": "sensitive",
        "severity": "high",
        "pattern": "Environment file access",
        "file": "playwright-patterns.md",
        "line_start": 213,
        "line_end": 213,
        "snippet": "await page.getByLabel('Password').fill(process.env.TEST_USER_PASSWORD!);"
      },
      {
        "id": "sensitive:playwright-patterns.md:244:environment-file-access",
        "category": "sensitive",
        "severity": "high",
        "pattern": "Environment file access",
        "file": "playwright-patterns.md",
        "line_start": 244,
        "line_end": 244,
        "snippet": "data: { email: process.env.TEST_USER_EMAIL, password: process.env.TEST_USER_PASSWORD },"
      },
      {
        "id": "sensitive:playwright-patterns.md:317:environment-file-access",
        "category": "sensitive",
        "severity": "high",
        "pattern": "Environment file access",
        "file": "playwright-patterns.md",
        "line_start": 317,
        "line_end": 317,
        "snippet": "forbidOnly: !!process.env.CI,"
      },
      {
        "id": "sensitive:playwright-patterns.md:318:environment-file-access",
        "category": "sensitive",
        "severity": "high",
        "pattern": "Environment file access",
        "file": "playwright-patterns.md",
        "line_start": 318,
        "line_end": 318,
        "snippet": "retries: process.env.CI ? 2 : 0,"
      },
      {
        "id": "sensitive:playwright-patterns.md:319:environment-file-access",
        "category": "sensitive",
        "severity": "high",
        "pattern": "Environment file access",
        "file": "playwright-patterns.md",
        "line_start": 319,
        "line_end": 319,
        "snippet": "workers: process.env.CI ? 1 : undefined,"
      },
      {
        "id": "sensitive:playwright-patterns.md:321:environment-file-access",
        "category": "sensitive",
        "severity": "high",
        "pattern": "Environment file access",
        "file": "playwright-patterns.md",
        "line_start": 321,
        "line_end": 321,
        "snippet": "reporter: process.env.CI || process.env.CLAUDE"
      },
      {
        "id": "sensitive:playwright-patterns.md:326:environment-file-access",
        "category": "sensitive",
        "severity": "high",
        "pattern": "Environment file access",
        "file": "playwright-patterns.md",
        "line_start": 326,
        "line_end": 326,
        "snippet": "baseURL: process.env.BASE_URL ?? 'http://localhost:3000',"
      },
      {
        "id": "sensitive:playwright-patterns.md:354:environment-file-access",
        "category": "sensitive",
        "severity": "high",
        "pattern": "Environment file access",
        "file": "playwright-patterns.md",
        "line_start": 354,
        "line_end": 354,
        "snippet": "reuseExistingServer: !process.env.CI,"
      },
      {
        "id": "blocker:playwright-patterns.md:179:system-reconnaissance",
        "category": "blocker",
        "severity": "low",
        "pattern": "System reconnaissance",
        "file": "playwright-patterns.md",
        "line_start": 179,
        "line_end": 179,
        "snippet": "await use({ token, userId: user.id });"
      },
      {
        "id": "blocker:playwright-patterns.md:192:system-reconnaissance",
        "category": "blocker",
        "severity": "low",
        "pattern": "System reconnaissance",
        "file": "playwright-patterns.md",
        "line_start": 192,
        "line_end": 192,
        "snippet": "export const test = base.extend<{ autoLog: void }>({"
      },
      {
        "id": "blocker:playwright-patterns.md:302:system-reconnaissance",
        "category": "blocker",
        "severity": "low",
        "pattern": "System reconnaissance",
        "file": "playwright-patterns.md",
        "line_start": 302,
        "line_end": 302,
        "snippet": "const { id } = await (await request.post('/api/users', { data: { name: 'Test' } })).json();"
      },
      {
        "id": "external_commands:SKILL.md:12:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 12,
        "line_end": 12,
        "snippet": "**Use `--reporter=line` or `--reporter=dot` for CLI test runs.** Configure `playwright.config.ts` to"
      },
      {
        "id": "external_commands:SKILL.md:18:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 18,
        "line_end": 18,
        "snippet": "1. `page.getByRole('button', { name: 'Submit' })` — accessibility roles"
      },
      {
        "id": "external_commands:SKILL.md:19:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 19,
        "line_end": 19,
        "snippet": "2. `page.getByLabel('Email')` — form control labels"
      },
      {
        "id": "external_commands:SKILL.md:20:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 20,
        "line_end": 20,
        "snippet": "3. `page.getByPlaceholder('Search...')` — input placeholders"
      },
      {
        "id": "external_commands:SKILL.md:21:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 21,
        "line_end": 21,
        "snippet": "4. `page.getByText('Welcome')` — visible text (non-interactive)"
      },
      {
        "id": "external_commands:SKILL.md:22:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 22,
        "line_end": 22,
        "snippet": "5. `page.getByAltText('Logo')` — image alt text"
      },
      {
        "id": "external_commands:SKILL.md:23:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 23,
        "line_end": 23,
        "snippet": "6. `page.getByTitle('Settings')` — title attributes"
      },
      {
        "id": "external_commands:SKILL.md:24:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 24,
        "line_end": 24,
        "snippet": "7. `page.getByTestId('submit-btn')` — explicit test contracts"
      },
      {
        "id": "external_commands:SKILL.md:29:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 29,
        "line_end": 29,
        "snippet": "- **Web-first assertions**: always `await expect(locator).toBeVisible()`, never `expect(await locato"
      },
      {
        "id": "external_commands:SKILL.md:31:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 31,
        "line_end": 31,
        "snippet": "- **Auth state reuse**: save authenticated state via setup project + `storageState`; never log in vi"
      },
      {
        "id": "external_commands:SKILL.md:36:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 36,
        "line_end": 36,
        "snippet": "- `page.waitForTimeout(ms)` — use auto-waiting locators instead"
      },
      {
        "id": "external_commands:SKILL.md:37:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 37,
        "line_end": 37,
        "snippet": "- `page.locator('.class')` — use role/label/testid"
      },
      {
        "id": "external_commands:SKILL.md:43:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 43,
        "line_end": 43,
        "snippet": "- Default reporter in CI/agent — use `--reporter=line` or `--reporter=dot`"
      },
      {
        "id": "external_commands:SKILL.md:48:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 48,
        "line_end": 48,
        "snippet": "- [ ] All assertions use `await expect()` web-first matchers"
      },
      {
        "id": "external_commands:SKILL.md:50:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 50,
        "line_end": 50,
        "snippet": "- [ ] No `page.waitForTimeout()` — use auto-waiting"
      },
      {
        "id": "external_commands:SKILL.md:56:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 56,
        "line_end": 56,
        "snippet": "- [ ] Minimal reporter (`line`/`dot`) used in CI/agent contexts"
      },
      {
        "id": "external_commands:SKILL.md:58:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 58,
        "line_end": 58,
        "snippet": "See `playwright-patterns.md` for Page Object Model, fixtures, network mocking, and configuration exa"
      },
      {
        "id": "blocker:SKILL.md:25:system-reconnaissance",
        "category": "blocker",
        "severity": "low",
        "pattern": "System reconnaissance",
        "file": "SKILL.md",
        "line_start": 25,
        "line_end": 27,
        "snippet": "8. CSS/XPath — last resort, avoid"
      },
      {
        "id": "blocker:SKILL.md:37:system-reconnaissance",
        "category": "blocker",
        "severity": "low",
        "pattern": "System reconnaissance",
        "file": "SKILL.md",
        "line_start": 37,
        "line_end": 38,
        "snippet": "- `page.locator('.class')` — use role/label/testid"
      }
    ],
    "finding_verdicts": [
      {
        "id": "external_commands:playwright-patterns.md:73:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "Line 73 is a TypeScript template literal used to create a debug namespace. It is not shell execution and does not execute user input."
      },
      {
        "id": "external_commands:playwright-patterns.md:194:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "The template literal formats browser console output in an example fixture. It does not invoke a command interpreter."
      },
      {
        "id": "external_commands:playwright-patterns.md:297:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The flagged backticks are TypeScript template literals for application-relative API paths in Playwright examples. No shell command or subprocess is created."
      },
      {
        "id": "external_commands:playwright-patterns.md:303:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The flagged backticks are TypeScript template literals for application-relative API paths in Playwright examples. No shell command or subprocess is created."
      },
      {
        "id": "external_commands:playwright-patterns.md:397:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The flagged backticks are TypeScript template literals for application-relative API paths in Playwright examples. No shell command or subprocess is created."
      },
      {
        "id": "external_commands:playwright-patterns.md:405:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The template literal creates a test email address in a data factory example. It is not shell execution and contains no command string."
      },
      {
        "id": "network:playwright-patterns.md:268:fetch-api-call",
        "verdict": "false_positive",
        "confidence": 0.91,
        "reason": "route.fetch() is a Playwright testing API used to retrieve and modify the original mocked response. It does not send secrets to an external endpoint."
      },
      {
        "id": "network:playwright-patterns.md:253:python-http-libraries",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The flagged line is prose about registering Playwright routes before navigation. It contains no Python HTTP library call or network code."
      },
      {
        "id": "network:playwright-patterns.md:326:hardcoded-url",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The hardcoded URL is localhost in a Playwright configuration example. It targets a local development server, not an external service."
      },
      {
        "id": "network:playwright-patterns.md:353:hardcoded-url",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The hardcoded URL is localhost in a Playwright configuration example. It targets a local development server, not an external service."
      },
      {
        "id": "filesystem:playwright-patterns.md:139:path-traversal-sequence",
        "verdict": "false_positive",
        "confidence": 0.98,
        "reason": "The sequence appears in static TypeScript import paths for local page objects. There is no user-controlled path construction or file access behavior."
      },
      {
        "id": "filesystem:playwright-patterns.md:140:path-traversal-sequence",
        "verdict": "false_positive",
        "confidence": 0.98,
        "reason": "The sequence appears in static TypeScript import paths for local page objects. There is no user-controlled path construction or file access behavior."
      },
      {
        "id": "filesystem:playwright-patterns.md:208:hidden-file-access",
        "verdict": "false_positive",
        "confidence": 0.84,
        "reason": "The path is Playwright storageState auth data used by test setup and documented as auth state storage. It is a normal test pattern, not hidden file probing."
      },
      {
        "id": "filesystem:playwright-patterns.md:229:hidden-file-access",
        "verdict": "false_positive",
        "confidence": 0.84,
        "reason": "The path is Playwright storageState auth data used by test setup and documented as auth state storage. It is a normal test pattern, not hidden file probing."
      },
      {
        "id": "env_access:playwright-patterns.md:212:environment-variable-access-dot-notation",
        "verdict": "false_positive",
        "confidence": 0.86,
        "reason": "The example reads named test credentials for application login in a Playwright setup flow. It does not dump environment variables or transmit them elsewhere."
      },
      {
        "id": "env_access:playwright-patterns.md:213:environment-variable-access-dot-notation",
        "verdict": "false_positive",
        "confidence": 0.86,
        "reason": "The example reads named test credentials for application login in a Playwright setup flow. It does not dump environment variables or transmit them elsewhere."
      },
      {
        "id": "env_access:playwright-patterns.md:244:environment-variable-access-dot-notation",
        "verdict": "false_positive",
        "confidence": 0.86,
        "reason": "The example reads named test credentials for application login in a Playwright setup flow. It does not dump environment variables or transmit them elsewhere."
      },
      {
        "id": "env_access:playwright-patterns.md:317:environment-variable-access-dot-notation",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The environment variables are CI or agent flags used to adjust Playwright configuration. They are not secrets and are not disclosed."
      },
      {
        "id": "env_access:playwright-patterns.md:318:environment-variable-access-dot-notation",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The environment variables are CI or agent flags used to adjust Playwright configuration. They are not secrets and are not disclosed."
      },
      {
        "id": "env_access:playwright-patterns.md:319:environment-variable-access-dot-notation",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The environment variables are CI or agent flags used to adjust Playwright configuration. They are not secrets and are not disclosed."
      },
      {
        "id": "env_access:playwright-patterns.md:321:environment-variable-access-dot-notation",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The environment variables are CI or agent flags used to adjust Playwright configuration. They are not secrets and are not disclosed."
      },
      {
        "id": "env_access:playwright-patterns.md:326:environment-variable-access-dot-notation",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "BASE_URL selects the local or configured application target for tests. This is standard Playwright configuration and does not expose sensitive data."
      },
      {
        "id": "env_access:playwright-patterns.md:354:environment-variable-access-dot-notation",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The environment variables are CI or agent flags used to adjust Playwright configuration. They are not secrets and are not disclosed."
      },
      {
        "id": "env_access:playwright-patterns.md:212:environment-variable-object",
        "verdict": "false_positive",
        "confidence": 0.86,
        "reason": "The example reads named test credentials for application login in a Playwright setup flow. It does not dump environment variables or transmit them elsewhere."
      },
      {
        "id": "env_access:playwright-patterns.md:213:environment-variable-object",
        "verdict": "false_positive",
        "confidence": 0.86,
        "reason": "The example reads named test credentials for application login in a Playwright setup flow. It does not dump environment variables or transmit them elsewhere."
      },
      {
        "id": "env_access:playwright-patterns.md:244:environment-variable-object",
        "verdict": "false_positive",
        "confidence": 0.86,
        "reason": "The example reads named test credentials for application login in a Playwright setup flow. It does not dump environment variables or transmit them elsewhere."
      },
      {
        "id": "env_access:playwright-patterns.md:317:environment-variable-object",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The environment variables are CI or agent flags used to adjust Playwright configuration. They are not secrets and are not disclosed."
      },
      {
        "id": "env_access:playwright-patterns.md:318:environment-variable-object",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The environment variables are CI or agent flags used to adjust Playwright configuration. They are not secrets and are not disclosed."
      },
      {
        "id": "env_access:playwright-patterns.md:319:environment-variable-object",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The environment variables are CI or agent flags used to adjust Playwright configuration. They are not secrets and are not disclosed."
      },
      {
        "id": "env_access:playwright-patterns.md:321:environment-variable-object",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The environment variables are CI or agent flags used to adjust Playwright configuration. They are not secrets and are not disclosed."
      },
      {
        "id": "env_access:playwright-patterns.md:326:environment-variable-object",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "BASE_URL selects the local or configured application target for tests. This is standard Playwright configuration and does not expose sensitive data."
      },
      {
        "id": "env_access:playwright-patterns.md:354:environment-variable-object",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The environment variables are CI or agent flags used to adjust Playwright configuration. They are not secrets and are not disclosed."
      },
      {
        "id": "sensitive:playwright-patterns.md:212:environment-file-access",
        "verdict": "false_positive",
        "confidence": 0.82,
        "reason": "The credential variables are used only for test authentication against the app under test. No evidence shows logging, broad environment collection, or exfiltration."
      },
      {
        "id": "sensitive:playwright-patterns.md:213:environment-file-access",
        "verdict": "false_positive",
        "confidence": 0.82,
        "reason": "The credential variables are used only for test authentication against the app under test. No evidence shows logging, broad environment collection, or exfiltration."
      },
      {
        "id": "sensitive:playwright-patterns.md:244:environment-file-access",
        "verdict": "false_positive",
        "confidence": 0.82,
        "reason": "The credential variables are used only for test authentication against the app under test. No evidence shows logging, broad environment collection, or exfiltration."
      },
      {
        "id": "sensitive:playwright-patterns.md:317:environment-file-access",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The environment variables are CI or agent flags used to adjust Playwright configuration. They are not secrets and are not disclosed."
      },
      {
        "id": "sensitive:playwright-patterns.md:318:environment-file-access",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The environment variables are CI or agent flags used to adjust Playwright configuration. They are not secrets and are not disclosed."
      },
      {
        "id": "sensitive:playwright-patterns.md:319:environment-file-access",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The environment variables are CI or agent flags used to adjust Playwright configuration. They are not secrets and are not disclosed."
      },
      {
        "id": "sensitive:playwright-patterns.md:321:environment-file-access",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The environment variables are CI or agent flags used to adjust Playwright configuration. They are not secrets and are not disclosed."
      },
      {
        "id": "sensitive:playwright-patterns.md:326:environment-file-access",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "BASE_URL selects the local or configured application target for tests. This is standard Playwright configuration and does not expose sensitive data."
      },
      {
        "id": "sensitive:playwright-patterns.md:354:environment-file-access",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The environment variables are CI or agent flags used to adjust Playwright configuration. They are not secrets and are not disclosed."
      },
      {
        "id": "blocker:playwright-patterns.md:179:system-reconnaissance",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The line passes a test token and user ID into a fixture callback. It does not inspect the host system or perform reconnaissance."
      },
      {
        "id": "blocker:playwright-patterns.md:192:system-reconnaissance",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The line declares an automatic Playwright fixture type. It contains no system discovery, process inspection, or host enumeration."
      },
      {
        "id": "blocker:playwright-patterns.md:302:system-reconnaissance",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "The line creates test data through an application-relative API route. It does not collect host information or enumerate the environment."
      },
      {
        "id": "external_commands:SKILL.md:12:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:18:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:19:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:20:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:21:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:22:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:23:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:24:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:29:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:31:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:36:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:37:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:43:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:48:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:50:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:56:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "external_commands:SKILL.md:58:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The flagged text is a Markdown inline code example or checklist item in documentation. It does not invoke a shell or execute user-controlled commands."
      },
      {
        "id": "blocker:SKILL.md:25:system-reconnaissance",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The flagged text discusses selector choices such as CSS and XPath. It is testing guidance and not system reconnaissance."
      },
      {
        "id": "blocker:SKILL.md:37:system-reconnaissance",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The flagged text discusses selector choices such as CSS and XPath. It is testing guidance and not system reconnaissance."
      }
    ],
    "semantic_findings": [],
    "critical_findings": [],
    "high_findings": [],
    "medium_findings": [],
    "low_findings": [],
    "dangerous_patterns": [],
    "files_scanned": 2,
    "total_lines": 482,
    "audit_model": "codex",
    "audited_at": "2026-07-06T13:48:34.189Z",
    "agent_auto_install_policy": "allowed",
    "manual_install_policy": "allowed"
  },
  "content": {
    "user_title": "Improve Playwright Test Reliability",
    "value_statement": "Playwright tests often become flaky, slow, and noisy in agent workflows. This skill provides concise patterns for locators, assertions, fixtures, auth reuse, network mocks, and compact reporters.",
    "seo_keywords": [
      "Playwright best practices",
      "Playwright testing",
      "Claude",
      "Codex",
      "Claude Code",
      "end-to-end testing",
      "Playwright locators",
      "test fixtures",
      "CI reporters",
      "browser automation"
    ],
    "actual_capabilities": [
      "Prioritizes resilient Playwright locators such as roles, labels, text, alt text, titles, and test IDs.",
      "Recommends web-first assertions that auto-wait and reduce flaky timing checks.",
      "Shows Page Object Model and fixture patterns for reusable test setup.",
      "Explains auth state reuse, API login setup, and per-test data isolation.",
      "Covers network mocking, Playwright configuration, compact reporters, and common debugging commands."
    ],
    "limitations": [
      "It does not run Playwright tests or inspect application behavior by itself.",
      "Examples require adaptation to each application, route structure, and authentication model.",
      "It does not replace a security review of test credentials or stored auth state.",
      "It focuses on Playwright with TypeScript and may not cover every framework integration."
    ],
    "use_cases": [
      {
        "title": "Stabilize End-to-End Tests",
        "target_user": "Frontend engineer",
        "description": "Improve flaky Playwright tests by replacing brittle selectors, hard waits, and manual assertions with stable test patterns."
      },
      {
        "title": "Design Reusable Test Architecture",
        "target_user": "QA automation lead",
        "description": "Structure page objects, fixtures, helpers, and authentication setup so large suites stay maintainable."
      },
      {
        "title": "Tune Agent Test Runs",
        "target_user": "AI coding agent user",
        "description": "Use compact reporters and scoped debugging commands so Claude, Codex, and Claude Code can work with clearer test output."
      }
    ],
    "prompt_templates": [
      {
        "title": "Review a Playwright Test",
        "scenario": "Beginner review of one test file",
        "prompt": "Review this Playwright test for flaky selectors, hard waits, and missing web-first assertions. Suggest direct improvements without changing test intent."
      },
      {
        "title": "Refactor Locators",
        "scenario": "Improve selector reliability",
        "prompt": "Refactor these Playwright selectors to prefer roles, labels, text, alt text, titles, or test IDs. Explain any selector that must stay CSS-based."
      },
      {
        "title": "Build Test Fixtures",
        "scenario": "Create reusable setup",
        "prompt": "Design Playwright fixtures and page objects for this user flow. Include setup, teardown, and isolated test data responsibilities."
      },
      {
        "title": "Optimize a CI Suite",
        "scenario": "Advanced suite and agent workflow tuning",
        "prompt": "Audit this Playwright configuration for CI and AI agent use. Improve reporters, retries, workers, auth state reuse, traces, and network mocks."
      }
    ],
    "output_examples": [
      {
        "input": "A test uses CSS selectors, fixed delays, and a shared user record.",
        "output": "The response identifies brittle selectors, removes fixed waits, and recommends per-test data setup with web-first assertions."
      },
      {
        "input": "A team logs in through the UI before every Playwright test.",
        "output": "The response proposes a setup project that saves authenticated state and reuses it across browser projects."
      },
      {
        "input": "An agent receives too much Playwright output during repeated test runs.",
        "output": "The response recommends compact reporters, focused test commands, and trace capture only when failures need deeper inspection."
      }
    ],
    "best_practices": [
      "Prefer user-facing locators before CSS or XPath selectors.",
      "Use web-first assertions so Playwright handles waiting and retry behavior.",
      "Keep each test isolated with its own data and explicit cleanup."
    ],
    "anti_patterns": [
      "Avoid fixed timeouts when a locator or assertion can wait for the expected state.",
      "Avoid shared mutable state between tests because order dependence hides failures.",
      "Avoid verbose default reporters in CI or agent sessions when compact output is enough."
    ],
    "faq": [
      {
        "question": "What does this skill help with?",
        "answer": "It helps create and review Playwright tests that are stable, readable, and practical for CI or agent workflows."
      },
      {
        "question": "Does it execute Playwright tests?",
        "answer": "No. It provides guidance and examples. A user or agent must run the tests in the target project."
      },
      {
        "question": "Which Playwright patterns does it cover?",
        "answer": "It covers locators, web-first assertions, page objects, fixtures, auth state reuse, network mocking, configuration, and debugging."
      },
      {
        "question": "Can it help with flaky tests?",
        "answer": "Yes. It focuses on common causes of flakiness, including brittle selectors, hard waits, shared state, and repeated UI login."
      },
      {
        "question": "Is it limited to TypeScript?",
        "answer": "The examples use TypeScript with Playwright Test, but many principles apply to other Playwright languages."
      },
      {
        "question": "How should stored auth state be handled?",
        "answer": "Store it only for test use, keep it out of source control, and rotate test credentials when needed."
      }
    ]
  },
  "file_structure": [
    {
      "name": "playwright-patterns.md",
      "type": "file",
      "path": "playwright-patterns.md",
      "lines": 423
    },
    {
      "name": "SKILL.md",
      "type": "file",
      "path": "SKILL.md",
      "lines": 59
    }
  ]
}
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