From features
Sets up E2E tests for Clerk auth flows using Playwright or Cypress. Guides on testing tokens, storage state, clerkSetup, and avoiding anti-patterns like production keys.
npx claudepluginhub clerk/skills --plugin mobileThis skill is limited to using the following tools:
| Framework | Documentation |
Sets up GitHub Actions CI pipelines for Clerk auth testing with Playwright E2E tests, GitHub secrets, and test user configuration.
Creates test plans for unit, integration, and E2E tests using specialist agents. Runs and fixes vitest, Jest, Playwright tests with Clerk/WorkOS auth guidance.
Sets up Clerk authentication by detecting framework from package.json, fetching official quickstart docs via WebFetch, and applying instructions for Next.js, React, Vue, Astro, and more.
Share bugs, ideas, or general feedback.
Test auth = isolated session state. Each test needs fresh auth context.
clerkSetup() initializes test environmentsetupClerkTestingToken() bypasses bot detectionstorageState persists auth between tests for speedpk_test_* and sk_test_* keys onlysetupClerkTestingToken() before navigating to auth pagespk_test_xxx, sk_test_xxxstorageState for faster testspage.waitForSelector('[data-clerk-component]') for Clerk UI| Pattern | Problem | Fix |
|---|---|---|
| Production keys in tests | Security risk | Use pk_test_* keys |
No setupClerkTestingToken() | Auth fails | Call before navigation |
| UI-based sign-in every test | Slow tests | Use storageState |
Playwright: Use globalSetup for auth state
Cypress: Add addClerkCommands({ Cypress, cy }) to support file
clerk-setup - Install Clerk before adding testsclerk-nextjs-patterns - Next.js patterns being tested