/pw:browserstackfrom pw
Configures and runs Playwright tests on BrowserStack's cloud grid for cross-browser and cross-device testing. Guides project setup with connect options for Chrome, Firefox, and WebKit on various OS versions.
Ships in pw. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run Playwright tests on BrowserStack's cloud grid for cross-browser and cross-device testing.
Environment variables must be set:
BROWSERSTACK_USERNAME — your BrowserStack usernameBROWSERSTACK_ACCESS_KEY — your access keyIf not set, inform the user how to get them from browserstack.com/accounts/settings and stop.
The BrowserStack MCP server is not auto-registered (issue #978).
pw-browserstackwas removed from the plugin's.mcp.jsonbecause it failed to connect for every user (the plugin ships nonode_modules). Thebrowserstack_*MCP tools used below, and the/pw:browserstackcommand, will fail with "tool not found" until it is enabled manually — see the Integrations section of the plugin'sCLAUDE.md(cd integrations/browserstack-mcp && npm install, then register the server in your own user/project MCP config). Setting the env vars alone is not sufficient.
/pw:browserstack setup
Steps:
playwright.config.ts// Add to playwright.config.ts
import { defineConfig } from '@playwright/test';
const isBS = !!process.env.BROWSERSTACK_USERNAME;
export default defineConfig({
// ... existing config
projects: isBS ? [
{
name: "chromelatestwindows-11",
use: {
connectOptions: {
wsEndpoint: `wss://cdp.browserstack.com/playwright?caps=${encodeURIComponent(JSON.stringify({
'browser': 'chrome',
'browser_version': 'latest',
'os': 'Windows',
'os_version': '11',
'browserstack.username': process.env.BROWSERSTACK_USERNAME,
'browserstack.accessKey': process.env.BROWSERSTACK_ACCESS_KEY,
}))}`,
},
},
},
{
name: "firefoxlatestwindows-11",
use: {
connectOptions: {
wsEndpoint: `wss://cdp.browserstack.com/playwright?caps=${encodeURIComponent(JSON.stringify({
'browser': 'playwright-firefox',
'browser_version': 'latest',
'os': 'Windows',
'os_version': '11',
'browserstack.username': process.env.BROWSERSTACK_USERNAME,
'browserstack.accessKey': process.env.BROWSERSTACK_ACCESS_KEY,
}))}`,
},
},
},
{
name: "webkitlatestos-x-ventura",
use: {
connectOptions: {
wsEndpoint: `wss://cdp.browserstack.com/playwright?caps=${encodeURIComponent(JSON.stringify({
'browser': 'playwright-webkit',
'browser_version': 'latest',
'os': 'OS X',
'os_version': 'Ventura',
'browserstack.username': process.env.BROWSERSTACK_USERNAME,
'browserstack.accessKey': process.env.BROWSERSTACK_ACCESS_KEY,
}))}`,
},
},
},
] : [
// ... local projects fallback
],
});
"test:e2e:cloud": "npx playwright test --project='chrome@*' --project='firefox@*' --project='webkit@*'"/pw:browserstack run
Steps:
BROWSERSTACK_USERNAME=$BROWSERSTACK_USERNAME \
BROWSERSTACK_ACCESS_KEY=$BROWSERSTACK_ACCESS_KEY \
npx playwright test --project='chrome@*' --project='firefox@*'
/pw:browserstack results
Steps:
browserstack_get_builds MCP tool/pw:browserstack browsers
Steps:
browserstack_get_browsers MCP tool/pw:browserstack local
For testing localhost or staging behind firewall:
npm install -D browserstack-local| Tool | When |
|---|---|
browserstack_get_plan | Check account limits |
browserstack_get_browsers | List available browsers |
browserstack_get_builds | List recent builds |
browserstack_get_sessions | Get sessions in a build |
browserstack_get_session | Get session details (video, logs) |
browserstack_update_session | Mark pass/fail |
browserstack_get_logs | Get text/network logs |
What SKILL.md sets; muted values are Claude Code's defaults
10 skills in this plugin
/coverageFind what is not tested: map untested pages and flows and coverage gaps. Use whenever the user asks what needs tests, about missing tests or test coverage./fixDiagnose and fix a failing or flaky Playwright test. Use whenever a test fails, passes only sometimes, breaks intermittently or needs fixing./generateUse when asked to write Playwright or e2e tests for a page, component or feature ('write tests', 'add tests for', 'e2e test')./migrateUse when moving tests from Cypress or Selenium to Playwright ('migrate tests', 'convert tests', 'replace selenium')./pwUse for any Playwright or end-to-end browser testing work: writing tests, fixing flaky ones, migrating from Cypress or Selenium, CI setup, TestRail or BrowserStack. Routes to the matching /pw sub-skill and its 55 templates./pw-initUse when setting up Playwright in a project ('set up playwright', 'add e2e tests', 'configure playwright', 'init playwright').npx claudepluginhub alirezarezvani/claude-skills --plugin pwOther plugins' skills for the same job