.claude/skills/clerk-testing/SKILL.md
E2E testing for Clerk apps. Use with Playwright or Cypress for auth flow tests.
npx skillsauth add kausthubh-coder/studi clerk-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Framework | Documentation | |-----------|---------------| | Overview | https://clerk.com/docs/guides/development/testing/overview | | Playwright | https://clerk.com/docs/guides/development/testing/playwright/overview | | Cypress | https://clerk.com/docs/guides/development/testing/cypress/overview |
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
data-ai
PostHog LLM analytics for all supported providers
tools
PostHog integration for Next.js App Router applications
development
Complete reference for integrating with 300+ AI models through the OpenRouter TypeScript SDK using the callModel pattern
development
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.