Playwright Test Builder — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Playwright Test Builder (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill directs the agent to write well-structured Playwright end-to-end tests for a given user flow or page. It produces tests with proper locator strategies (preferring accessible selectors over brittle CSS), meaningful assertions at every step, correct async/await handling, and solid setup/teardown. The output is ready to drop into a tests/ folder and run immediately.
Use this when you want reliable E2E coverage for critical user journeys — login, checkout, form submission, navigation flows — without writing boilerplate from scratch.
Copy this file to .agents/skills/playwright-test-builder/SKILL.md in your project root.
Then describe the flow you want tested and ask:
Provide the page URL (or a description of the UI), the steps in the flow, and any known selectors or data-testid values if you have them.
Add the "Prompt / Instructions" section below to your .cursorrules file. Then describe the flow to test in the chat.
Paste the relevant HTML or React component code alongside the flow description and the instructions below. Seeing the actual markup helps Codex pick the most stable locators.
When asked to write Playwright tests, follow these steps:
getByRole() with accessible name — best for buttons, links, inputs, headingsgetByLabel() — for form fields with associated labelsgetByText() — for elements identified by their visible textgetByPlaceholder() — for inputs with placeholder textgetByTestId() — when data-testid attributes are presentexpect(locator).toBeVisible(), toHaveText(), toHaveURL(), toBeEnabled(), etc.test.describe to group related teststest.beforeEach for shared setup (navigation, login)test.afterEach or test.afterAll for cleanup if neededtest() a descriptive name starting with a verb: "shows...", "allows...", "prevents..."page.click, page.fill, page.goto, and expect must be awaited. Never use setTimeout for waiting — use page.waitForSelector, page.waitForURL, or rely on Playwright's auto-waiting.expect(locator).toBeVisible({ timeout: 5000 })page.waitForResponse() or mock the network with page.route()page.waitForTimeout() sleeps — use condition-based waitspages/ subfolder.Input to Agent:
"Use the Playwright Test Builder skill to write tests for our sign-up flow. The user goes to/register, fills in their name, email, and password, clicks 'Create Account', and should land on/dashboardwith a welcome message."
Output from Agent:
```typescript import { test, expect } from '@playwright/test';
>
/* Tests for the user registration flow. Covers: form validation, successful account creation, post-signup redirect. /
>
test.describe('Registration flow', () => { test.beforeEach(async ({ page }) => { await page.goto('/register'); await expect(page).toHaveURL('/register'); });
>
test('shows the registration form', async ({ page }) => { await expect(page.getByRole('heading', { name: 'Create your account' })).toBeVisible(); await expect(page.getByLabel('Full name')).toBeVisible(); await expect(page.getByLabel('Email')).toBeVisible(); await expect(page.getByLabel('Password')).toBeVisible(); await expect(page.getByRole('button', { name: 'Create Account' })).toBeEnabled(); });
>
test('allows a new user to register and redirects to dashboard', async ({ page }) => { await page.getByLabel('Full name').fill('Jane Smith'); await page.getByLabel('Email').fill('[email protected]'); await page.getByLabel('Password').fill('SecurePass123!');
>
await page.getByRole('button', { name: 'Create Account' }).click();
>
await expect(page).toHaveURL('/dashboard'); await expect(page.getByText('Welcome, Jane')).toBeVisible(); });
>
test('shows a validation error when email is already taken', async ({ page }) => { await page.getByLabel('Full name').fill('Existing User'); await page.getByLabel('Email').fill('[email protected]'); await page.getByLabel('Password').fill('SecurePass123!');
>
await page.getByRole('button', { name: 'Create Account' }).click();
>
await expect(page.getByRole('alert')).toContainText('already in use'); await expect(page).toHaveURL('/register'); });
>
test('prevents submission when required fields are empty', async ({ page }) => { await page.getByRole('button', { name: 'Create Account' }).click();
>
// Form should not navigate away await expect(page).toHaveURL('/register'); await expect(page.getByLabel('Email')).toBeFocused(); }); }); ```
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.