clerk-testing

Set up Clerk authentication testing for Playwright and Cypress.

6|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/memoirlabs/mog --skill clerk-testing-memoirlabs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clerk-testing
Source: https://github.com/memoirlabs/mog/tree/main/.agents/skills/testing
Command: npx skills add https://github.com/memoirlabs/mog --skill clerk-testing-memoirlabs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents flaky, time-consuming end-to-end authentication testing for Clerk apps by standardizing how test tokens and auth state are created and reused.

Core Features & Use Cases

  • Framework-Specific Auth Testing: Guides Playwright or Cypress setup for Clerk authentication flows.
  • Deterministic Test Context: Uses isolated session state patterns so each test starts from the right auth conditions.
  • Fast, Repeatable Runs: Recommends saving auth state to reduce redundant sign-in steps and improve test latency.

Quick Start

Use this skill to set up your Playwright or Cypress E2E auth tests with Clerk test keys and a persisted storage state for faster, more reliable execution.

Frequently Asked Questions about clerk-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Clerk authentication for Playwright E2E tests?▼

To set up Clerk authentication for Playwright E2E tests, you initialize the test environment with Clerk test keys (pk_test_* and sk_test_*), bypass bot detection for test runs, and persist session state to storageState for faster, repeatable iterations.

Why are my Clerk E2E tests flaky and slow?▼

Clerk E2E tests are often flaky and slow due to redundant sign-in steps and inconsistent auth state. Standardizing test tokens and saving auth state to isolated session storage prevents this and provides deterministic test context.

Do I need specific API keys for Clerk authentication testing?▼

Yes, Clerk authentication testing requires using Clerk-provided test keys (pk_test_* and sk_test_*) to initialize the test environment and simulate auth flows without affecting production data.

Can I use Cypress for Clerk authentication end-to-end testing?▼

Yes, you can use Cypress for Clerk authentication end-to-end testing. The setup follows official framework-specific instructions to configure auth flow scenarios, bypass bot detection, and persist session state for reliable execution.

What is the best way to persist Clerk auth state across test runs?▼

The best way to persist Clerk auth state across test runs is saving the session to a storage state file, which reduces redundant sign-in steps and improves test latency for faster, repeatable execution.

How do I bypass bot detection when running Clerk E2E tests?▼

To bypass bot detection during Clerk E2E tests, you use the official framework-specific testing setup instructions paired with Clerk test keys to initialize the environment and allow automated test runs.