skills/clerk-testing/SKILL.md
E2E testing for Clerk apps. Use with Playwright or Cypress for auth flow tests.
npx skillsauth add awfixers-stuff/opencode-config 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
clerk-setup - Install Clerk before adding testsclerk-nextjs-patterns - Next.js patterns being testeddevelopment
Use when starting dev servers, watchers, tilt, or any process expected to outlive the conversation. Provides zmx session management patterns for long-lived processes.
development
Zig testing skill for writing and running tests. Use when using zig build test, writing comptime tests, using test filters, working with test allocators to detect leaks, or using Zig's built-in fuzz testing (0.14+). Activates on queries about Zig tests, zig test, zig build test, comptime testing, test allocators, Zig fuzz testing, or detecting memory leaks in Zig tests.
development
Zig debugging skill. Use when debugging Zig programs with GDB or LLDB, interpreting Zig runtime panics, using std.debug.print for tracing, configuring debug builds, or debugging Zig programs in VS Code. Activates on queries about debugging Zig, Zig panics, zig gdb, zig lldb, std.debug.print, Zig stack traces, or Zig error return traces.
tools
Zig cross-compilation skill. Use when cross-compiling Zig programs to different targets, using Zig's built-in cross-compilation for embedded, WASM, Windows, ARM, or using zig cc to cross-compile C code without a system cross-toolchain. Activates on queries about Zig cross-compilation, zig target triples, zig cc cross-compile, Zig embedded targets, or Zig WASM.