Skip to content
Back to skills

Playwright

ASecurity

End-to-end and smoke test patterns with Playwright: stable locators, API seeding in fixtures, tagging by acceptance criterion, trimmed output, and the smoke subset. Load when writing E2E or smoke tests.

  • 13 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 6, 2026
developmentgoshellapi

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 6, 2026

npx -y skills add MiladNalbandi/keel-v2 --skill playwright --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Playwright?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Playwright
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/miladnalbandi-playwright/badge)](https://www.skillsdirectory.com/skills/miladnalbandi-playwright)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: playwright
description: "End-to-end and smoke test patterns with Playwright: stable locators, API seeding in fixtures, tagging by acceptance criterion, trimmed output, and the smoke subset. Load when writing E2E or smoke tests."
user-invocable: false
---

# Playwright patterns

## One spec per feature, one test per E2E acceptance criterion

```ts
test('AC-006 saves and lists a bookmark @e2e', async ({ page, api }) => {
  await api.createUser();                 // seed through the API, never the UI
  await page.goto('/bookmarks');
  await page.getByRole('textbox', { name: 'URL' }).fill('https://x.dev');
  await page.getByRole('button', { name: 'Save' }).click();
  await expect(page.getByRole('listitem').filter({ hasText: 'x.dev' })).toBeVisible();
});
```

## Rules

- Locators: roles, labels, text. If a component needs a test id, that is a `[WEB]` AC change, not an E2E-phase edit.
- Seed data through the API in fixtures.
- Start the stack through `webServer` in the config, so local and CI behave the same; reuse a running server locally.
- Use the `line` reporter; report the failing step and the trace path, never paste a whole trace.
- Smoke is a subset: one `@smoke` test that loads the app and walks the single most critical path, under 60 seconds with the shell checks.

## While exploring

Use `playwright-cli` to look at the running app; it keeps snapshots on disk instead of in the conversation. Do not use Playwright MCP for this.

Files in this skill

  • SKILL.md1.4 KB
  • examples/bookmarks.spec.ts2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.