clerk-testing

Automate end-to-end Clerk authentication flow testing with Playwright or Cypress.

1|Updated Jun 13, 2017
One-click install
npx skills add https://github.com/RoyMcCrain/dotsfile --skill clerk-testing-roymccrain
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clerk-testing
Source: https://github.com/RoyMcCrain/dotsfile/tree/main/claude/skills/clerk-testing
Command: npx skills add https://github.com/RoyMcCrain/dotsfile --skill clerk-testing-roymccrain

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

E2E testing for Clerk apps to validate authentication flows with isolated sessions and token handling.

Core Features & Use Cases

  • Decision-tree guided setup for Clerk authentication tests using Playwright or Cypress.
  • Mental model-based test structure: isolated auth state, token setup, and persistent storage for speed.
  • Reusable workflows covering login, signup, and token renewal with best practices.

Quick Start

Run the end-to-end Clerk authentication tests using Playwright or Cypress to validate login flows and token handling.

Frequently Asked Questions about clerk-testing

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

FAQPage Schema
How do I automate Clerk authentication flows with Playwright?

Automate Clerk authentication flows with Playwright by using a Clerk testing token and storageState to persist isolated auth sessions. This validates login, signup, and token renewal across test runs without manual intervention.

What's the best way to handle Clerk token management in E2E testing?

Handle Clerk token management in E2E testing by applying storageState to persist auth state and isolate sessions. This reusable workflow validates login, token handling, and session persistence for speed across test runs.

Can I use Cypress to test Clerk login and session persistence?

Yes, you can use Cypress to test Clerk login and session persistence. The decision-tree guided setup supports both Playwright and Cypress to validate authentication flows, token handling, and session persistence with isolated auth state.

Why does my Clerk auth state not persist between Playwright test runs?

Clerk auth state fails to persist between Playwright test runs when storageState is not configured to save and restore isolated sessions. Applying storageState with a Clerk testing token ensures session persistence and speeds up test execution.

Do I need a Clerk testing token to set up E2E authentication tests?

Yes, a Clerk testing token is required to set up E2E authentication tests. The token, along with config guidance from Clerk, enables isolated auth state, token setup, and persistent storage for validating login flows and token renewal.

What does storageState do for Clerk session persistence in Playwright?

storageState persists Clerk session data and auth tokens for Playwright tests by saving isolated auth state between runs. This mechanism validates login flows and token handling while significantly increasing test speed through session reuse.