replay-playwright

Set up and run Playwright tests with Replay Browser to record test executions for debugging and performance analysis.

6 stars

Best use case

replay-playwright is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Set up and run Playwright tests with Replay Browser to record test executions for debugging and performance analysis.

Teams using replay-playwright should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/replay-playwright/SKILL.md --create-dirs "https://raw.githubusercontent.com/replayio/docs/main/.agents/skills/replay-playwright/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/replay-playwright/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How replay-playwright Compares

Feature / Agentreplay-playwrightStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Set up and run Playwright tests with Replay Browser to record test executions for debugging and performance analysis.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

## replay-playwright

**Description:** Use when the user wants to set up Replay for Playwright tests, configure the Replay Playwright plugin, or run Playwright tests with the Replay Browser. Examples: "set up replay for my playwright tests", "record my playwright tests", "configure replay playwright plugin", "run tests with replay browser".

**Instructions:**

You are helping the user set up and run Playwright tests with the Replay Browser. Here is the complete reference:

### Installation

#### 1. Install the Replay Playwright plugin

```sh
npm install --save-dev @replayio/playwright
# or
yarn add --dev @replayio/playwright
# or
pnpm add --save-dev @replayio/playwright
# or
bun add --dev @replayio/playwright
```

#### 2. Install the Replay Browser

```sh
npx replayio install
```

### Authentication

Create a Test Suite Team at https://app.replay.io/team/new/tests to generate an API key.

Store the API key using one of these methods:

- **`.env` file** (recommended): Add `REPLAY_API_KEY=<your_api_key>` to your `.env` file and use the [dotenv](https://www.npmjs.com/package/dotenv) package to load it.
- **macOS/Linux**: `export REPLAY_API_KEY=<your_api_key>`
- **Windows**: `set REPLAY_API_KEY=<your_api_key>`

### Configuration

Update `playwright.config.ts` to use the Replay reporter and Replay Chromium browser:

```typescript
import { replayReporter, devices as replayDevices } from '@replayio/playwright'

const config: PlaywrightTestConfig = {
  reporter: [
    replayReporter({
      apiKey: process.env.REPLAY_API_KEY,
      upload: true,
    }),
    ['line'],
  ],
  projects: [
    {
      name: 'replay-chromium',
      use: { ...replayDevices['Replay Chromium'] },
    },
  ],
}
```

Key configuration details:

- `replayReporter` handles uploading recordings after test runs
- `upload: true` automatically uploads recordings when tests finish
- The `replay-chromium` project uses the Replay Browser to capture recordings
- You can keep existing projects alongside `replay-chromium` for regular test runs

### Running Tests

Run Playwright tests with the Replay Browser:

```sh
npx playwright test --project replay-chromium
```

Recordings are automatically uploaded when `upload: true` is set in the reporter config.

## Core Workflow

**Set up Replay for an existing Playwright project:**

1. Install the plugin: `npm install --save-dev @replayio/playwright`
2. Install the browser: `npx replayio install`
3. Update `playwright.config.ts` with the Replay reporter and project
4. Set the `REPLAY_API_KEY` environment variable
5. Run tests: `npx playwright test --project replay-chromium`

**When modifying the user's `playwright.config.ts`:**

- Preserve existing projects and reporters — add the Replay project and reporter alongside them
- Import `replayReporter` and `devices as replayDevices` from `@replayio/playwright`
- If the config uses `defineConfig`, add the Replay project to the existing `projects` array
- If the config already has reporters, append `replayReporter` to the existing array

### Debugging your recorded application

**Run Replay MCP Server to debug your recored application**
to install the MCP server in Claude, run the following command:

```
claude --mcp-config "{
    "mcpServers": {
      "replay": {
        "type": "http",
        "url": "https://dispatch.replay.io/nut/mcp",
        "headers": {
          "Authorization": "${REPLAY_API_KEY}"
        }
      }
    }
  }"
```

Related Skills

replay-mcp

6
from replayio/docs

Use Replay MCP to inspect the contents of https://replay.io recordings.

replay-cypress

6
from replayio/docs

Set up and configure Replay for recording Cypress tests with time-travel debugging.

replay-cli

6
from replayio/docs

Record your application to gather performance data and debug issues. It enables users to install Replay ClI, record a session, upload and manage them.

swe-developing-e2e-test-with-playwright

9
from wahidyankf/open-sharia-enterprise

Playwright E2E testing standards from authoritative docs/explanation/software-engineering/automation-testing/tools/playwright/ documentation

install-playwright-mcp

9
from jpoutrin/product-forge

Install Playwright MCP server for browser automation in Claude Code

playwright-tests

9
from andrelandgraf/fullstackrecipes

End-to-end browser testing with Playwright. Test user interactions, form validation, navigation, and visual feedback with full browser automation.

render-daily-replay

9
from cartridge-gg/nums

Auto-render a Remotion video replay of a Nums game on Mainnet. Resolves the target `gameId` from Torii (best reward of the day OR best score of the day, OR a specific gameId the user provides), silently auto-fetches the current NUMS price from Ekubo, then runs `pnpm remotion:render:game` with the right props. Use when the user asks to render today's top game, the daily winner, the biggest reward, the highest score, or any specific gameId, without having to assemble the render command by hand.

nums-remotion-replay

9
from cartridge-gg/nums

Project-specific skill for the Nums Remotion package that generates game replay videos by reusing the existing client React components. Covers the cross-package webpack setup, client-component overrides, Torii data fetching, font loading, render flow quirks, and hosting. Use when working on `remotion/` or the `SlidingNumber` component, adding new compositions, debugging font/animation issues, or setting up hosting for the Remotion Studio. Pairs with the generic `remotion-best-practices` skill.

playwright-cli

8
from goondocks-co/open-agent-kit

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

Playwright Test Builder

8
from Notysoty/openagentskills

Generates robust Playwright end-to-end tests for web pages and user flows.

posthog-replay-analysis

8
from stevengonsalvez/agents-in-a-box

Decode and analyse PostHog session replay recordings programmatically via the API. Use when investigating a user-reported incident (crash, infinite loop, unexpected navigation) where a PostHog session replay exists, and you want to extract the URL sequence, network request timeline, console logs, or DOM state WITHOUT opening the replay UI. Especially valuable when diagnosing iOS Safari/WebKit crashes ("A problem repeatedly occurred"), request storms, or any bug where the replay UI can't be scripted. Bypasses the broken `rrvideo` npm packages with a direct decode-and-chart approach.

playwright-scraper-skill-1-2-0

7
from Demerzels-lab/elsamultiskillagent

Playwright-based web scraping OpenClaw Skill with anti-bot protection.