# Playwright Agent Skills

> Playwright skills for writing, reviewing, and debugging reliable end-to-end tests.

- **Type:** MCP server
- **Install:** `agentstack add mcp-hzijad-playwright-agent-skills`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [hzijad](https://agentstack.voostack.com/s/hzijad)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [hzijad](https://github.com/hzijad)
- **Source:** https://github.com/hzijad/playwright-agent-skills

## Install

```sh
agentstack add mcp-hzijad-playwright-agent-skills
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Playwright Agent Skills

[](./LICENSE)
[](https://skills.sh/hzijad/playwright-agent-skills)

**Playwright test patterns that avoid the mistakes agents make by default.**

Playwright Agent Skills is a small, opinionated set of reusable prompts for writing and reviewing Playwright tests. Each skill stays focused on one job so agents can apply the right standard without loading unrelated guidance.

## Before / After

Left unguided, agents tend to reach for brittle selectors and hard waits. `playwright-core` steers them toward the pattern Playwright's own docs recommend.

**Before**

```ts
test('user can log in', async ({ page }) => {
  await page.goto('/login');
  await page.click('.btn-login-submit');
  await page.waitForTimeout(2000);
  expect(await page.locator('.welcome-msg').textContent()).toContain('Welcome');
});
```

**After**

```ts
test('shows a welcome message after login', async ({ page }) => {
  await page.goto('/login');
  await page.getByRole('button', { name: 'Log in' }).click();
  await expect(page.getByRole('heading', { name: /welcome/i })).toBeVisible();
});
```

Role-based locator instead of a CSS class, no hard wait, and an auto-retrying assertion instead of manual timing.

## Why not a general browser automation skill?

Most Playwright skills optimize for one-off checks: write a disposable
script, run it, get a screenshot, done. They're built to answer "does this
page look right" once — not to produce code that belongs in your repo, so
they lean on `page.waitForTimeout` and raw CSS selectors without cost.

Playwright Agent Skills assumes the opposite: every pattern here is meant
to be committed and run in CI. Locators are accessible-first, waits are
assertion-driven, and structure follows what a Playwright maintainer would
sign off on — because it's not a one-off script, it's your test suite.

## Install

Works with any agent supported by the Agent Skills CLI — GitHub Copilot, Codex, Cline, Gemini CLI, and 70+ more.

```bash
npx skills add hzijad/playwright-agent-skills
```

After installation, point agents at the skill that matches the task. The docs inside each skill explain the recommended patterns and the cases where they should not be used.

## Skills

- [playwright-core](./skills/playwright-core/SKILL.md): everyday Playwright authoring and review. Focuses on accessible locators, web-first assertions, isolation, and readable test structure.
- [playwright-auth-state](./skills/playwright-auth-state/SKILL.md): starting tests from a known authenticated session with `storageState` and setup projects.
- [playwright-network-mocking](./skills/playwright-network-mocking/SKILL.md): replacing unstable third-party responses with deterministic `page.route()` mocks.
- [playwright-debugging](./skills/playwright-debugging/SKILL.md): diagnosing and repairing flaky or failing tests with traces, repeat runs, and state isolation.

## When To Use

Use `playwright-core` for normal test authoring and review. Use `playwright-auth-state` when a test should begin logged in. Use `playwright-network-mocking` when external services should be controlled from the test. Use `playwright-debugging` when a test is already failing or flaky and the failure needs to be understood first.

## Structure

```
skills/
	playwright-core/
	playwright-auth-state/
	playwright-network-mocking/
	playwright-debugging/
```

Keep the skills narrow. If a new topic does not fit one of the existing folders, add a new skill instead of broadening an existing one.

## License

MIT — see [LICENSE](./LICENSE).

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [hzijad](https://github.com/hzijad)
- **Source:** [hzijad/playwright-agent-skills](https://github.com/hzijad/playwright-agent-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-hzijad-playwright-agent-skills
- Seller: https://agentstack.voostack.com/s/hzijad
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
