Skip to main content

Playwright Recording Processor

v1.0.0New

Unsigned, install at your own risk

Unverified

This skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.

Install this skill

No account required. Pick your tool, then copy.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install jeffallan-skills-playwright-recording-processor

What this does: Transforms raw Playwright codegen recordings into production-ready E2E tests through trimming, classification, and assertion injection. Use when processing codegen session recordings, trimming recorded browser sessions to a marker URL, classifying recordings as happy-path or bug-repro flows, or injecting diagnostic capture into reproduction tests. Invoke to convert a raw codegen recording into a maintainable test file or to build a bug reproduction test with console/network/state diagnostics.

Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/jeffallan-skills-playwright-recording-processor/SKILL.md

Setup guide →
0Save

Instructions

Playwright Recording Processor

Recording processing specialist that converts raw Playwright codegen output into structured, maintainable E2E tests.

Core Workflow

  1. Trim — Cut the raw recording at the exact marker URL path, discarding pre-feature navigation (via scripts/trim-recording.ts saved from references/trim-recording.md or manual inline steps)
  2. Classify — Determine flow type: happy path (feature coverage) or bug reproduction (diagnostic capture)
  3. Swap fixtures — Replace raw page references with custom fixtures (e.g. authenticatedPage from e2e/fixtures.ts); update imports to load test from the project's fixture file
  4. Harden — Replace brittle selectors with role-based locators (cross-ref playwright-expert)
  5. Assert — Inject assertions appropriate to flow type: checkpoint verification (happy path) or expected-outcome assertion with diagnostic capture in finally and screenshot capture in test.afterEach (bug repro)

Quick-Start Example

Transform raw recorded actions into an assertion-rich test using the auth fixture (assumes baseURL in playwright.config.ts):

// ❌ Raw recording (untrimmed with manual auth, hardcoded URL, no assertions)
// await page.goto('https://app.example.com/login');
// await page.getByLabel('Email').fill('[email protected]');
// await page.getByRole('button', { name: 'Sign in' }).click();
// await page.goto('https://app.example.com/invoices/export');
// await page.getByRole('button', { name: 'Download' }).click();

// ✅ Processed test (trimmed to marker URL, custom fixture, assertions added)
import { test, expect } from './fixtures';

// Source recording: recordings/raw-session-20240315.spec.ts (lines 14-22)
test('Invoice Export @happy-path', async ({ authenticatedPage: page }) => {
  await page.goto('/invoices/export');
  await expect(page.getByRole('heading', { name: 'Export' })).toBeVisible();
  const downloadPromise = page.waitForEvent('download');
  await page.getByRole('button', { name: 'Download' }).click();
  const download = await downloadPromise;
  expect(download.suggestedFilename()).toMatch(/\.csv$/);
});

Inputs Required

  1. Raw recording file — the .spec.ts output from npx playwright codegen
  2. Marker URL — the path where the feature under test begins (e.g. /invoices/export)
  3. Flow type — happy path or bug reproduction
  4. Auth fixture name and import path — e.g. authenticatedPage from ./fixtures for a spec in e2e/; a spec in integration/ needs the path from there to e2e/fixtures.ts
  5. Output target — e2e/ or integration/ depending on scope

If any of these are missing, ask before proceeding.

Flow Classification

Happy Path Flow

Use when:

  • Testing a new feature for the first time
  • Adding coverage for a release
  • Tester followed a structured checklist

Output: A clean spec with the full user journey from marker URL to completion, using the existing auth fixture, with assertions added at key checkpoints.

Bug Reproduction Flow

Use when:

  • A nontechnical user reported "the app broke"
  • You need to capture what they actually did, in what state, on what browser
  • The goal is a reproducible failing test to anchor a fix

Output: A spec that asserts the expected behavior (failing while bug is present) and captures full runtime diagnostic metadata (diagnostic-report) in a finally block (with failure screenshots captured via test.afterEach hook) so timeouts never lose diagnostics.

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Assertion Patternsreferences/assertion-patterns.mdAdding assertions by UI element type
Trim Recordingreferences/trim-recording.mdTrimming raw codegen output, exact marker URL path
Bug Repro Diagnosticsreferences/bug-repro-diagnostics.mdDiagnostic injection, console/network/state capture

Cross-References (from playwright-expert, not duplicated)

  • For locator hardening patterns, see playwright-expert (selectors-locators.md)
  • For Page Object Model and fixture patterns, see playwright-expert (page-object-model.md)
  • For debugging flaky processed tests, see playwright-expert (debugging-flaky.md)

Constraints

MUST DO

  • Always trim to the exact marker URL pathname before processing
  • Classify every recording before adding assertions
  • Use role-based selectors from playwright-expert patterns when hardening
  • In bug repro flows, assert the expected behavior and attach diagnostic-report in a finally block (capturing failure screenshots via test.afterEach)
  • Import test from the project's fixture file when custom fixtures are swapped in
  • Annotate generated tests with source recording comments: // Source recording: recordings/<name>.spec.ts (lines X-Y)
  • Assume baseURL is configured; use relative paths for URLs from marker URL onwards

MUST NOT DO

  • Process untrimmed recordings (pre-feature navigation noise pollutes tests)
  • Add multi-step feature verification assertions to bug repro tests (only assert the single reported failure point)
  • Generate tests without assertion injection (both happy-path and bug-repro tests require assertions)
  • Duplicate locator/POM patterns already covered by playwright-expert
  • Use waitForTimeout() in generated tests (replace with auto-waiting web assertions or waitForURL)

Output File Placement

  • e2e/: Full journeys crossing multiple pages or system boundaries
  • integration/: Scoped to feature area; bug repros usually land here
  • recordings/: Archive only — raw files are never run directly

Checklist Before Handing Off

  • Trimmed to exact marker URL path — no auth or pre-feature navigation
  • Auth fixture swapped in and imported from project fixture file
  • All locators are semantic (role, label, text) not positional
  • Assertions added: checkpoint assertions (happy path) or expected-behavior assertion (bug repro)
  • Diagnostic collection attached in finally block under diagnostic-report (bug repro) and failure screenshots captured via test.afterEach
  • Any waitForTimeout() calls removed and replaced with auto-waiting assertions
  • Source recording comment added at top of test
  • Tagged correctly (@happy-path or @bug-repro)
  • Placed in correct output directory
  • Raw recording archived untouched in recordings/

Documentation

This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
nestjs-expertCreates and configures NestJS modules, controllers, services, DTOs, guards, and interceptors for enterprise-grade TypeScript backend applications. Use when building NestJS REST APIs or GraphQL services, implementing dependency injection, scaffolding modular architecture, adding JWT/Passport authentication, integrating TypeORM or Prisma, or working with .module.ts, .controller.ts, and .service.ts files. Invoke for guards, interceptors, pipes, validation, Swagger documentation, and unit/E2E testing in NestJS projects.2 installsreact-native-expertBuilds, optimizes, and debugs cross-platform mobile applications with React Native and Expo. Implements navigation hierarchies (tabs, stacks, drawers), configures native modules, optimizes FlatList rendering with memo and useCallback, and handles platform-specific code for iOS and Android. Use when building a React Native or Expo mobile app, setting up navigation, integrating native modules, improving scroll performance, handling SafeArea or keyboard input, or configuring Expo SDK projects.2 installsprompt-engineerWrites, refactors, and evaluates prompts for LLMs — generating optimized prompt templates, structured output schemas, evaluation rubrics, and test suites. Use when designing prompts for new LLM applications, refactoring existing prompts for better accuracy or token efficiency, implementing chain-of-thought or few-shot learning, creating system prompts with personas and guardrails, building JSON/function-calling schemas, or developing prompt evaluation frameworks to measure and improve model performance.2 installsphp-proUse when building PHP applications with modern PHP 8.3+ features, Laravel, or Symfony frameworks. Invokes strict typing, PHPStan level 9, async patterns with Swoole, and PSR standards. Creates controllers, configures middleware, generates migrations, writes PHPUnit/Pest tests, defines typed DTOs and value objects, sets up dependency injection, and scaffolds REST/GraphQL APIs. Use when working with Eloquent, Doctrine, Composer, Psalm, ReactPHP, or any PHP API development.2 installsgolang-proImplements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with generics, interfaces, and robust error handling. Use when building Go applications requiring concurrent programming, microservices architecture, or high-performance systems. Invoke for goroutines, channels, Go generics, gRPC integration, CLI tools, benchmarks, or table-driven testing.2 installssecurity-reviewerIdentifies security vulnerabilities, generates structured audit reports with severity ratings, and provides actionable remediation guidance. Use when conducting security audits, reviewing code for vulnerabilities, or analyzing infrastructure security. Invoke for SAST scans, penetration testing, DevSecOps practices, cloud security reviews, dependency audits, secrets scanning, or compliance checks. Produces vulnerability reports, prioritized recommendations, and compliance checklists.2 installs

More from Jeffallan Skills

View source →
cpp-proWrites, optimizes, and debugs C++ applications using modern C++20/23 features, template metaprogramming, and high-performance systems techniques. Use when building or refactoring C++ code requiring concepts, ranges, coroutines, SIMD optimization, or careful memory management — or when addressing performance bottlenecks, concurrency issues, and build system configuration with CMake.8 installsarchitecture-designerUse when designing new high-level system architecture, reviewing existing designs, or making architectural decisions. Invoke to create architecture diagrams, write Architecture Decision Records (ADRs), evaluate technology trade-offs, design component interactions, and plan for scalability. Use for system design, architecture review, microservices structuring, ADR authoring, scalability planning, and infrastructure pattern selection — distinct from code-level design patterns or database-only design tasks.3 installsdjango-expertUse when building Django web applications or REST APIs with Django REST Framework. Invoke when working with settings.py, models.py, manage.py, or any Django project file. Creates Django models with proper indexes, optimizes ORM queries using select_related/prefetch_related, builds DRF serializers and viewsets, and configures JWT authentication. Trigger terms: Django, DRF, Django REST Framework, Django ORM, Django model, serializer, viewset, Python web.3 installsembedded-systemsUse when developing firmware for microcontrollers, implementing RTOS applications, or optimizing power consumption. Invoke for STM32, FreeRTOS, bare-metal, power optimization, real-time systems, configure peripherals, write interrupt handlers, implement DMA transfers, debug timing issues.3 installsangular-architectGenerates Angular 17+ standalone components, configures advanced routing with lazy loading and guards, implements NgRx state management, applies RxJS patterns, and optimizes bundle performance. Use when building Angular 17+ applications with standalone components or signals, setting up NgRx stores, establishing RxJS reactive patterns, performance tuning, or writing Angular tests for enterprise apps.2 installsjavascript-proWrites, debugs, and refactors JavaScript code using modern ES2023+ features, async/await patterns, ESM module systems, and Node.js APIs. Use when building vanilla JavaScript applications, implementing Promise-based async flows, optimising browser or Node.js performance, working with Web Workers or Fetch API, or reviewing .js/.mjs/.cjs files for correctness and best practices.2 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.651 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.551 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.362 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.264 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.183 installsusing-superpowersUse when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions147 installs

Frequently asked questions about playwright-recording-processor

What does the playwright-recording-processor skill do?

Transforms raw Playwright codegen recordings into production-ready E2E tests through trimming, classification, and assertion injection. Use when processing codegen session recordings, trimming recorded browser sessions to a marker URL, classifying recordings as happy-path or bug-repro flows, or injecting diagnostic capture into reproduction tests. Invoke to convert a raw codegen recording into a maintainable test file or to build a bug reproduction test with console/network/state diagnostics. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the playwright-recording-processor skill?

Run `npx @skills-hub-ai/cli install jeffallan-skills-playwright-recording-processor` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/jeffallan-skills-playwright-recording-processor/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does playwright-recording-processor work with?

playwright-recording-processor runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the playwright-recording-processor skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use playwright-recording-processor after installing it?

In Claude Code, type `/jeffallan-skills-playwright-recording-processor` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the playwright-recording-processor skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.