CCM
/Skills
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Claude Code Marketplaces

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Skill index
  • MCP index
  • Marketplace index
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by mertbuilds.com

Independent project, not affiliated with Anthropic
lambdatest avatar

Playwright Skill

lambdatest/agent-skills
401 installs350 stars
Summary

This generates production-grade Playwright tests across TypeScript, JavaScript, Python, Java, and C#, with built-in support for both local execution and TestMu AI cloud testing across 3000+ browser/OS combinations. The routing logic is smart: it detects whether you need local debugging or cloud execution based on your request, defaults to accessible selectors (getByRole, getByLabel), and enforces web-first assertions that auto-retry. It includes full Page Object Model scaffolding, handles the tricky bits like proper test status reporting to LambdaTest, and has specific guidance for impossible combinations like Safari on Windows. The anti-patterns table alone will save you from the usual timeout and flaky test mistakes.

Install to Claude Code

npx -y skills add lambdatest/agent-skills --skill playwright-skill --agent claude-code

Installs into .claude/skills of the current project.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
inference shell
inference shell
create and run specialised agents in minutes
build now →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
inference shell
inference shell
create and run specialised agents in minutes
build now →
Files
SKILL.mdView on GitHub

Playwright Test Automation

Step 1 — Determine Execution Target

Decide BEFORE writing any code:

User says...TargetAction
No cloud mention, "locally", "debug"LocalStandard Playwright config
"cloud", "TestMu", "LambdaTest", "cross-browser", "real device"CloudSee reference/cloud-integration.md
Impossible local combo (Safari on Windows, Edge on Linux)CloudSuggest TestMu AI, see reference/cloud-integration.md
"HyperExecute", "parallel at scale"HyperExecuteDefer to hyperexecute-skill
"visual regression", "screenshot comparison"SmartUIDefer to smartui-skill
AmbiguousLocalDefault local, mention cloud option

Step 2 — Detect Language

SignalLanguageDefault
"TypeScript", "TS", .ts, or no language specifiedTypeScript✅
"JavaScript", "JS", .jsJavaScript
"Python", "pytest", .pyPythonSee reference/python-patterns.md
"Java", "Maven", "Gradle", "TestNG"JavaSee reference/java-patterns.md
"C#", ".NET", "NUnit", "MSTest"C#See reference/csharp-patterns.md

Step 3 — Determine Scope

Request typeOutput
One-off quick scriptStandalone .ts file, no POM
Single test for existing projectMatch their structure and conventions
New test suite / projectFull scaffold — see scripts/scaffold-project.sh
Fix flaky testDebugging checklist — see reference/debugging-flaky.md
API mocking neededSee reference/api-mocking-visual.md
Mobile device testingSee reference/mobile-testing.md

Core Patterns — TypeScript (Default)

Selector Priority

Use in this order — stop at the first that works:

  1. getByRole('button', { name: 'Submit' }) — accessible, resilient
  2. getByLabel('Email') — form fields
  3. getByPlaceholder('Enter email') — when label missing
  4. getByText('Welcome') — visible text
  5. getByTestId('submit-btn') — last resort, needs data-testid

Never use raw CSS/XPath unless matching a third-party widget with no other option.

Assertions — Always Web-First

// ✅ Auto-retries until timeout
await expect(page.getByRole('heading')).toBeVisible();
await expect(page.getByRole('alert')).toHaveText('Saved');
await expect(page).toHaveURL('/dashboard');

// ❌ No auto-retry — races with DOM
const text = await page.textContent('.msg');
expect(text).toBe('Saved');

Anti-Patterns

❌ Don't✅ DoWhy
page.waitForTimeout(3000)await expect(locator).toBeVisible()Hard waits are flaky
expect(await el.isVisible())await expect(el).toBeVisible()No auto-retry
page.$('.btn')page.getByRole('button')Fragile selector
page.click('.submit')page.getByRole('button', {name:'Submit'}).click()Not accessible
Shared state between teststest.beforeEach for setupTests must be independent
try/catch around assertionsLet Playwright handle retriesSwallows real failures

Page Object Model

Use POM for any project with more than 3 tests. Full patterns with base page, fixtures, and examples in reference/page-object-model.md.

Quick example:

// pages/login.page.ts
import { Page, Locator } from '@playwright/test';

export class LoginPage {
  readonly emailInput: Locator;
  readonly passwordInput: Locator;
  readonly submitButton: Locator;

  constructor(private page: Page) {
    this.emailInput = page.getByLabel('Email');
    this.passwordInput = page.getByLabel('Password');
    this.submitButton = page.getByRole('button', { name: 'Sign in' });
  }

  async login(email: string, password: string) {
    await this.emailInput.fill(email);
    await this.passwordInput.fill(password);
    await this.submitButton.click();
  }
}

Configuration — Local

// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
  testDir: './tests',
  timeout: 30_000,
  retries: process.env.CI ? 2 : 0,
  workers: process.env.CI ? 1 : undefined,
  reporter: [['html'], ['list']],
  use: {
    baseURL: 'http://localhost:3000',
    trace: 'on-first-retry',
    screenshot: 'only-on-failure',
  },
  projects: [
    { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
    { name: 'firefox', use: { ...devices['Desktop Firefox'] } },
    { name: 'webkit', use: { ...devices['Desktop Safari'] } },
    { name: 'mobile-chrome', use: { ...devices['Pixel 5'] } },
    { name: 'mobile-safari', use: { ...devices['iPhone 13'] } },
  ],
  webServer: {
    command: 'npm run dev',
    port: 3000,
    reuseExistingServer: !process.env.CI,
  },
});

Cloud Execution on TestMu AI

Set environment variables: LT_USERNAME, LT_ACCESS_KEY

Direct CDP connection (standard approach):

// lambdatest-setup.ts
import { chromium } from 'playwright';

const capabilities = {
  browserName: 'Chrome',
  browserVersion: 'latest',
  'LT:Options': {
    platform: 'Windows 11',
    build: 'Playwright Build',
    name: 'Playwright Test',
    user: process.env.LT_USERNAME,
    accessKey: process.env.LT_ACCESS_KEY,
    network: true,
    video: true,
    console: true,
  },
};

const browser = await chromium.connect({
  wsEndpoint: `wss://cdp.lambdatest.com/playwright?capabilities=${encodeURIComponent(JSON.stringify(capabilities))}`,
});
const context = await browser.newContext();
const page = await context.newPage();

HyperExecute project approach (for parallel cloud runs):

// Add to projects array in playwright.config.ts:
{
  name: 'chrome:latest:Windows 11@lambdatest',
  use: { viewport: { width: 1920, height: 1080 } },
},
{
  name: 'MicrosoftEdge:latest:macOS Sonoma@lambdatest',
  use: { viewport: { width: 1920, height: 1080 } },
},

Run: npx playwright test --project="chrome:latest:Windows 11@lambdatest"

Test Status Reporting (Cloud)

Tests on TestMu AI show "Completed" by default. You MUST report pass/fail:

// In afterEach or test teardown:
await page.evaluate((_) => {},
  `lambdatest_action: ${JSON.stringify({
    action: 'setTestStatus',
    arguments: { status: testInfo.status, remark: testInfo.error?.message || 'OK' },
  })}`
);

This is handled automatically when using the fixture from reference/cloud-integration.md.


Validation Workflow

After generating any test:

1. Validate config:  python scripts/validate-config.py playwright.config.ts
2. If errors → fix → re-validate
3. Run locally:      npx playwright test --project=chromium
4. If cloud:         npx playwright test --project="chrome:latest:Windows 11@lambdatest"
5. If failures → check reference/debugging-flaky.md

Quick Reference

Common Commands

npx playwright test                          # Run all tests
npx playwright test --ui                     # Interactive UI mode
npx playwright test --debug                  # Step-through debugger
npx playwright test --project=chromium       # Single browser
npx playwright test tests/login.spec.ts      # Single file
npx playwright show-report                   # Open HTML report
npx playwright codegen https://example.com   # Record test
npx playwright test --update-snapshots       # Update visual baselines

Auth State Reuse

// Save auth state once in global setup
await page.context().storageState({ path: 'auth.json' });

// Reuse in config
use: { storageState: 'auth.json' }

Visual Regression (Built-in)

await expect(page).toHaveScreenshot('homepage.png', {
  maxDiffPixelRatio: 0.01,
  animations: 'disabled',
  mask: [page.locator('.dynamic-date')],
});

Network Mocking

await page.route('**/api/users', (route) =>
  route.fulfill({ json: [{ id: 1, name: 'Mock User' }] })
);

Full mocking patterns in reference/api-mocking-visual.md.

Test Steps for Readability

test('checkout flow', async ({ page }) => {
  await test.step('Add item to cart', async () => {
    await page.goto('/products');
    await page.getByRole('button', { name: 'Add to cart' }).click();
  });

  await test.step('Complete checkout', async () => {
    await page.getByRole('link', { name: 'Cart' }).click();
    await page.getByRole('button', { name: 'Checkout' }).click();
  });
});

Reference Files

FileWhen to read
reference/cloud-integration.mdCloud execution, 3 integration patterns, parallel browsers
reference/page-object-model.mdPOM architecture, base page, fixtures, full examples
reference/mobile-testing.mdAndroid + iOS real device testing
reference/debugging-flaky.mdFlaky test checklist, common fixes
reference/api-mocking-visual.mdAPI mocking + visual regression patterns
reference/python-patterns.mdPython-specific: pytest-playwright, sync/async
reference/java-patterns.mdJava-specific: Maven, JUnit, Gradle
reference/csharp-patterns.mdC#-specific: NUnit, MSTest, .NET config
../shared/testmu-cloud-reference.mdFull device catalog, capabilities, geo-location

Advanced Playbook

For production-grade patterns, see reference/playbook.md:

SectionWhat's Inside
§1 Production ConfigMulti-project, reporters, retries, webServer
§2 Auth Fixture ReusestorageState, multi-role fixtures
§3 Page Object ModelBasePage, LoginPage with fluent API
§4 Network InterceptionMock, modify, HAR replay, block resources
§5 Visual RegressionScreenshot comparison, masks, thresholds
§6 File Upload/DownloadfileChooser, setInputFiles, download events
§7 Multi-Tab & DialogsPopup handling, alert/confirm/prompt
§8 Geolocation & EmulationLocation, timezone, locale, color scheme
§9 Custom FixturesDB seeding, API context, auto-teardown
§10 API TestingRequest context, end-to-end API+UI
§11 Accessibilityaxe-core integration, WCAG audits
§12 ShardingCI matrix sharding, report merging
§13 CI/CDGitHub Actions with artifacts
§14 Debugging ToolkitDebug, UI mode, trace viewer, codegen
§15 Debugging Table10 common problems with fixes
§16 Best Practices17-item production checklist
Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
inference shell
inference shell
create and run specialised agents in minutes
build now →
Categories
Testing & QAAI & Agent BuildingDebuggingAutomation & WorkflowsPythonCloud & InfrastructureMobile DevelopmentJava & JVMDesign & UI/UX.NET & C#
First SeenJun 3, 2026
View on GitHub

More from lambdatest/agent-skills

All 2 skills →
  • Appium Skill351

Recommended

More Testing & QA →
secondsky avatar
mobile-app-testing

secondsky/claude-skills

Mobile app testing with unit tests, UI automation, performance testing. Use for test infrastructure, E2E tests, testing standards, or encountering test framework setup, device farms, flaky tests, platform-specific test errors.
389
204
oakoss avatar
playwright

oakoss/agent-skills

Playwright browser automation API, web scraping, and tooling. Covers locator strategies, assertions, API testing, stealth mode, anti-bot bypass, authenticated sessions, screenshots/PDFs, Docker deployment, configuration, debugging, and MCP integration with AI agents. Prevents documented errors including CI timeout hangs, extension testing failures, and navigation issues. Use when automating browsers, scraping protected sites, bypassing bot detection, generating screenshots/PDFs, configuring Playwright Test, troubleshooting Playwright errors, or learning Playwright API patterns. For E2E test architecture, Page Object Models, CI sharding strategies, or test organization patterns, use the e2e-testing skill instead.
388
14
levnikolaevich avatar
ln-743-test-infrastructure

levnikolaevich/claude-code-skills

Sets up test infrastructure with Vitest, xUnit, and pytest. Use when adding testing frameworks and sample tests to a project.
379
533
rshankras avatar
testing

rshankras/claude-code-apple-skills

TDD and testing skills for iOS/macOS apps. Covers characterization tests, TDD workflows, test contracts, snapshot tests, test infrastructure, and deterministic quality gates (fitness functions, coverage ratchet, mutation testing). Use for test-driven development, adding tests to existing code, or building test infrastructure.
376
593
pproenca avatar
tdd

pproenca/dot-skills

Test-Driven Development methodology and red-green-refactor workflow (formerly test-tdd). This skill should be used when practicing TDD, writing tests first, designing tests before implementation, or reviewing test-first approaches. Triggers on "write tests first", "test before code", "red green refactor", "test driven development". This skill does NOT cover Vitest framework specifics (use vitest skill) or API mocking with MSW (use msw skill).
367
192
levnikolaevich avatar
ln-523-auto-test-planner

levnikolaevich/claude-code-skills

Plans automated tests (E2E/Integration/Unit) using Risk-Based Testing after manual testing. Use when Story needs a test task with prioritized scenarios.
362
533