Skip to content

Migrate to Playwright

Convert Cypress or Selenium test suites to Playwright, file by file, with verification runs.

Stars
29,149
Licence
MIT
Files
3 files

What it does

When installed, the agent knows how to move an existing browser test suite written in Cypress or Selenium over to Playwright. It detects which framework your project uses, counts the files, and converts them one at a time using translation tables for commands and locators (for example cy.visit becomes page.goto). After each file it runs Playwright to check the result, and it asks before deleting old dependencies or config files.

Great for

  • Teams with a Cypress or Selenium suite who want to switch to Playwright
  • Developers who want a guided, file-by-file conversion rather than rewriting tests by hand
  • Projects that need help upgrading brittle selectors to role-based or test-id locators

Skip it if

  • Projects with no existing Cypress or Selenium tests, since there is nothing to convert
  • Very large suites run unattended without review, because automated conversion can silently change test meaning and some tests will need manual rework
  • Teams that need to keep Cypress or Selenium running in parallel during a migration, since the skill's cleanup step removes the old tooling

Try asking

  • “Migrate my Cypress test suite to Playwright”
  • “Convert the Selenium Python tests in this repo to Playwright”
  • “Switch this project from Cypress to Playwright and update the CI config”
  • “Convert tests/checkout.spec.js from Cypress to Playwright”
Step-by-step guide: how to use Migrate to PlaywrightInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 3 original files, the MIT licence and an attribution note.

    migrate.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip migrate.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip migrate.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Commit or back up your repository before starting so you can review each converted file in version control.
  • Run the existing test suite first to record a baseline, then compare results after migration.
  • Review locator upgrades and custom command conversions manually, since these are the most likely places for behaviour to change.

What's inside

  • cypress-mapping.md
  • selenium-mapping.md
  • SKILL.md

Redistributed unmodified from alirezarezvani/claude-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.