BrowserStack Integration
Run tests on BrowserStack.
How to use it
Claude Code
- Run the line below. It pulls the whole folder into
~/.claude/skills/browserstack. - Describe your job in plain words. Claude Code follows the skill from there.
npx degit alirezarezvani/claude-skills/engineering-team/playwright-pro/skills/browserstack#main ~/.claude/skills/browserstackFor one project only, change the path to .claude/skills/browserstack.
Claude (web or desktop app)
- On this page open ⋯ → Download .md.
- Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
- Pick the file and Save. Claude shows the name and description and runs a security scan.
- Check the skill is switched on.
- Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
- ChatGPT: make a Project and paste it into Instructions.
- Neither? Paste it at the top of a new chat — it works for that chat.
Not working?
- Check which app you pasted it into — the steps above name the right one.
- Some skills need the paid tier of Claude or ChatGPT.
Paste into Claude, ChatGPT or Cursor.
Source of BrowserStack Integration
Show the full text178 lines
| name | description |
|---|---|
| browserstack | >- Run tests on BrowserStack. Use when user mentions "browserstack", cross-browser", "cloud testing", "browser matrix", "test on safari", test on firefox", or "browser compatibility". |
BrowserStack Integration
Run Playwright tests on BrowserStack's cloud grid for cross-browser and cross-device testing.
Prerequisites
Environment variables must be set:
BROWSERSTACK_USERNAME— your BrowserStack usernameBROWSERSTACK_ACCESS_KEY— your access key
If 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.
Capabilities
1. Configure for BrowserStack
/pw:browserstack setup
Steps:
- Check current
playwright.config.ts - Add BrowserStack connect options:
// 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
],
});
- Add npm script:
"test:e2e:cloud": "npx playwright test --project='chrome@*' --project='firefox@*' --project='webkit@*'"
2. Run Tests on BrowserStack
/pw:browserstack run
Steps:
- Verify credentials are set
- Run tests with BrowserStack projects:
BROWSERSTACK_USERNAME=$BROWSERSTACK_USERNAME \ BROWSERSTACK_ACCESS_KEY=$BROWSERSTACK_ACCESS_KEY \ npx playwright test --project='chrome@*' --project='firefox@*' - Monitor execution
- Report results per browser
3. Get Build Results
/pw:browserstack results
Steps:
- Call
browserstack_get_buildsMCP tool - Get latest build's sessions
- For each session:
- Status (pass/fail)
- Browser and OS
- Duration
- Video URL
- Log URLs
- Format as summary table
4. Check Available Browsers
/pw:browserstack browsers
Steps:
- Call
browserstack_get_browsersMCP tool - Filter for Playwright-compatible browsers
- Display available browser/OS combinations
5. Local Testing
/pw:browserstack local
For testing localhost or staging behind firewall:
- Install BrowserStack Local:
npm install -D browserstack-local - Add local tunnel to config
- Provide setup instructions
MCP Tools Used
| 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 |
Output
- Cross-browser test results table
- Per-browser pass/fail status
- Links to BrowserStack dashboard for video/screenshots
- Any browser-specific failures highlighted
| 1 | |
| 2 | name "browserstack" |
| 3 | description >- |
| 4 | Run tests on BrowserStack. Use when user mentions "browserstack", |
| 5 | "cross-browser", "cloud testing", "browser matrix", "test on safari", |
| 6 | "test on firefox", or "browser compatibility". |
| 7 | |
| 8 | |
| 9 | # BrowserStack Integration |
| 10 | |
| 11 | Run Playwright tests on BrowserStack's cloud grid for cross-browser and cross-device testing. |
| 12 | |
| 13 | ## Prerequisites |
| 14 | |
| 15 | Environment variables must be set: |
| 16 | `BROWSERSTACK_USERNAME` — your BrowserStack username |
| 17 | `BROWSERSTACK_ACCESS_KEY` — your access key |
| 18 | |
| 19 | If not set, inform the user how to get them from [browserstack.com/accounts/settings] and stop. |
| 20 | |
| 21 | > **The BrowserStack MCP server is not auto-registered (issue #978).** |
| 22 | > `pw-browserstack` was removed from the plugin's `.mcp.json` because it failed to |
| 23 | > connect for every user (the plugin ships no `node_modules`). The `browserstack_*` |
| 24 | > MCP tools used below, and the `/pw:browserstack` command, will fail with "tool |
| 25 | > not found" until it is enabled manually — see the **Integrations** section of the |
| 26 | > plugin's `CLAUDE.md` (`cd integrations/browserstack-mcp && npm install`, then |
| 27 | > register the server in your own user/project MCP config). Setting the env vars |
| 28 | > alone is not sufficient. |
| 29 | |
| 30 | ## Capabilities |
| 31 | |
| 32 | ### 1. Configure for BrowserStack |
| 33 | |
| 34 | |
| 35 | /pw:browserstack setup |
| 36 | |
| 37 | |
| 38 | Steps: |
| 39 | Check current `playwright.config.ts` |
| 40 | Add BrowserStack connect options: |
| 41 | |
| 42 | |
| 43 | // Add to playwright.config.ts |
| 44 | import { defineConfig } from '@playwright/test'; |
| 45 | |
| 46 | const isBS = !!process.env.BROWSERSTACK_USERNAME; |
| 47 | |
| 48 | export default defineConfig({ |
| 49 | // ... existing config |
| 50 | projects: isBS ? [ |
| 51 | { |
| 52 | name: "chromelatestwindows-11", |
| 53 | use: { |
| 54 | connectOptions: { |
| 55 | wsEndpoint: `wss://cdp.browserstack.com/playwright?caps=${encodeURIComponent(JSON.stringify({ |
| 56 | 'browser': 'chrome', |
| 57 | 'browser_version': 'latest', |
| 58 | 'os': 'Windows', |
| 59 | 'os_version': '11', |
| 60 | 'browserstack.username': process.env.BROWSERSTACK_USERNAME, |
| 61 | 'browserstack.accessKey': process.env.BROWSERSTACK_ACCESS_KEY, |
| 62 | }))}`, |
| 63 | }, |
| 64 | }, |
| 65 | }, |
| 66 | { |
| 67 | name: "firefoxlatestwindows-11", |
| 68 | use: { |
| 69 | connectOptions: { |
| 70 | wsEndpoint: `wss://cdp.browserstack.com/playwright?caps=${encodeURIComponent(JSON.stringify({ |
| 71 | 'browser': 'playwright-firefox', |
| 72 | 'browser_version': 'latest', |
| 73 | 'os': 'Windows', |
| 74 | 'os_version': '11', |
| 75 | 'browserstack.username': process.env.BROWSERSTACK_USERNAME, |
| 76 | 'browserstack.accessKey': process.env.BROWSERSTACK_ACCESS_KEY, |
| 77 | }))}`, |
| 78 | }, |
| 79 | }, |
| 80 | }, |
| 81 | { |
| 82 | name: "webkitlatestos-x-ventura", |
| 83 | use: { |
| 84 | connectOptions: { |
| 85 | wsEndpoint: `wss://cdp.browserstack.com/playwright?caps=${encodeURIComponent(JSON.stringify({ |
| 86 | 'browser': 'playwright-webkit', |
| 87 | 'browser_version': 'latest', |
| 88 | 'os': 'OS X', |
| 89 | 'os_version': 'Ventura', |
| 90 | 'browserstack.username': process.env.BROWSERSTACK_USERNAME, |
| 91 | 'browserstack.accessKey': process.env.BROWSERSTACK_ACCESS_KEY, |
| 92 | }))}`, |
| 93 | }, |
| 94 | }, |
| 95 | }, |
| 96 | ] : [ |
| 97 | // ... local projects fallback |
| 98 | ], |
| 99 | }); |
| 100 | |
| 101 | |
| 102 | Add npm script: `"test:e2e:cloud": "npx playwright test --project='chrome@*' --project='firefox@*' --project='webkit@*'"` |
| 103 | |
| 104 | ### 2. Run Tests on BrowserStack |
| 105 | |
| 106 | |
| 107 | /pw:browserstack run |
| 108 | |
| 109 | |
| 110 | Steps: |
| 111 | Verify credentials are set |
| 112 | Run tests with BrowserStack projects: |
| 113 | |
| 114 | BROWSERSTACK_USERNAME=$BROWSERSTACK_USERNAME \ |
| 115 | BROWSERSTACK_ACCESS_KEY=$BROWSERSTACK_ACCESS_KEY \ |
| 116 | npx playwright test --project='chrome@*' --project='firefox@*' |
| 117 | |
| 118 | Monitor execution |
| 119 | Report results per browser |
| 120 | |
| 121 | ### 3. Get Build Results |
| 122 | |
| 123 | |
| 124 | /pw:browserstack results |
| 125 | |
| 126 | |
| 127 | Steps: |
| 128 | Call `browserstack_get_builds` MCP tool |
| 129 | Get latest build's sessions |
| 130 | For each session: |
| 131 | Status (pass/fail) |
| 132 | Browser and OS |
| 133 | Duration |
| 134 | Video URL |
| 135 | Log URLs |
| 136 | Format as summary table |
| 137 | |
| 138 | ### 4. Check Available Browsers |
| 139 | |
| 140 | |
| 141 | /pw:browserstack browsers |
| 142 | |
| 143 | |
| 144 | Steps: |
| 145 | Call `browserstack_get_browsers` MCP tool |
| 146 | Filter for Playwright-compatible browsers |
| 147 | Display available browser/OS combinations |
| 148 | |
| 149 | ### 5. Local Testing |
| 150 | |
| 151 | |
| 152 | /pw:browserstack local |
| 153 | |
| 154 | |
| 155 | For testing localhost or staging behind firewall: |
| 156 | Install BrowserStack Local: `npm install -D browserstack-local` |
| 157 | Add local tunnel to config |
| 158 | Provide setup instructions |
| 159 | |
| 160 | ## MCP Tools Used |
| 161 | |
| 162 | | Tool | When | |
| 163 | |---|---| |
| 164 | | `browserstack_get_plan` | Check account limits | |
| 165 | | `browserstack_get_browsers` | List available browsers | |
| 166 | | `browserstack_get_builds` | List recent builds | |
| 167 | | `browserstack_get_sessions` | Get sessions in a build | |
| 168 | | `browserstack_get_session` | Get session details (video, logs) | |
| 169 | | `browserstack_update_session` | Mark pass/fail | |
| 170 | | `browserstack_get_logs` | Get text/network logs | |
| 171 | |
| 172 | ## Output |
| 173 | |
| 174 | Cross-browser test results table |
| 175 | Per-browser pass/fail status |
| 176 | Links to BrowserStack dashboard for video/screenshots |
| 177 | Any browser-specific failures highlighted |
| 178 |
Discussion
Browse more free Claude skills.