home / skills / ehtbanton / claudeskillsrepo / playwright-config-generator
This skill generates a complete Playwright configuration file for multi-browser end-to-end testing, including browser projects and test settings.
npx playbooks add skill ehtbanton/claudeskillsrepo --skill playwright-config-generatorReview the files below or copy the command above to add this skill to your agents.
---
name: playwright-config-generator
description: Generate Playwright configuration files for cross-browser E2E testing. Triggers on "create playwright config", "generate playwright configuration", "playwright setup", "browser testing config".
---
# Playwright Config Generator
Generate Playwright configuration files for comprehensive cross-browser E2E testing.
## Output Requirements
**File Output:** `playwright.config.ts`
**Format:** Valid Playwright configuration
**Standards:** Playwright 1.40+
## When Invoked
Immediately generate a complete Playwright configuration with browser projects and test settings.
## Configuration Template
```typescript
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests',
use: {
baseURL: 'http://localhost:3000',
},
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
],
});
```
## Example Invocations
**Prompt:** "Create playwright config for multi-browser testing"
**Output:** Complete `playwright.config.ts` with Chrome, Firefox, Safari projects.
This skill generates a complete TypeScript Playwright configuration file (playwright.config.ts) tailored for cross-browser end-to-end testing. It produces Playwright 1.40+ compatible configs including multiple browser projects, shared test settings, and common CI-friendly options. The output is ready to drop into a repository and run with Playwright test.
When triggered, the skill assembles a valid defineConfig object with sensible defaults: test directory, baseURL, retries, timeouts, reporters, and device presets for Chromium, Firefox, and WebKit. It can include optional sections for webServer startup, screenshots, traces, and video capture. The generated TypeScript uses the official devices import and follows Playwright 1.40+ syntax.
Which Playwright version does the generated config target?
The generated config targets Playwright 1.40+ and uses defineConfig and devices imports compatible with that version.
Can the config start a local server before tests run?
Yes. The skill can include a webServer block to run a dev server and wait for a URL before executing tests.