← ClerkCONTENT HISTORYWHAT CHANGED · RULE-BASED ANALYSIS
Update to Clerk
Snapshot Sep 30, 2026 · 23:09 UTC · version 0.1.0
Collection source: not recorded for this historical snapshot.
First saved snapshot
No earlier snapshot is available to establish a change.
Compare saved observations
Download comparison JSONFull technical diff · 0 changed fields
Full snapshot data
{
"name": "clerk-testing",
"description": "E2E testing for Clerk apps. Use with Playwright or Cypress for auth flow tests.",
"included_files": [],
"skill_md_contents": "---\nname: clerk-testing\ndescription: E2E testing for Clerk apps. Use with Playwright or Cypress for auth flow\n tests.\nallowed-tools: WebFetch\nlicense: MIT\nmetadata:\n author: clerk\n version: 1.2.0\ncompatibility: Requires CLERK_TESTING_TOKEN from Clerk dashboard\n---\n\n# Testing\n\n## Decision Tree\n\n| Framework | Documentation |\n|-----------|---------------|\n| Overview | https://clerk.com/docs/guides/development/testing/overview |\n| Playwright | https://clerk.com/docs/guides/development/testing/playwright/overview |\n| Cypress | https://clerk.com/docs/guides/development/testing/cypress/overview |\n\n## Mental Model\n\nTest auth = isolated session state. Each test needs fresh auth context.\n- `clerkSetup()` initializes test environment\n- `setupClerkTestingToken()` bypasses bot detection\n- `storageState` persists auth between tests for speed\n\n## Workflow\n\n1. Identify test framework (Playwright or Cypress)\n2. WebFetch the appropriate URL from decision tree above\n3. Follow official setup instructions\n4. Use `pk_test_*` and `sk_test_*` keys only\n\n## Best Practices\n\n- Use `setupClerkTestingToken()` before navigating to auth pages\n- Use test API keys: `pk_test_xxx`, `sk_test_xxx`\n- Save auth state with `storageState` for faster tests\n- Use `page.waitForSelector('[data-clerk-component]')` for Clerk UI\n\n## Anti-Patterns\n\n| Pattern | Problem | Fix |\n|---------|---------|-----|\n| Production keys in tests | Security risk | Use `pk_test_*` keys |\n| No `setupClerkTestingToken()` | Auth fails | Call before navigation |\n| UI-based sign-in every test | Slow tests | Use `storageState` |\n\n## Framework-Specific\n\n**Playwright**: Use `globalSetup` for auth state\n**Cypress**: Add `addClerkCommands({ Cypress, cy })` to support file\n\n## See Also\n\n- `clerk-setup` - Install Clerk before adding tests\n- `clerk-nextjs-patterns` - Next.js patterns being tested\n- [Demo Repo](https://github.com/clerk/clerk-playwright-nextjs/tree/main/e2e)\n"
}SHA-256: 4b92233e222a69f5b6568372256cf739fe25e04e9d8af39db019debafff1d74a