Clerk Auth Testing

Clerk Auth Testing is a skill for Claude Code, Codex from PramodDutta/qaskills. It costs 31 tokens per session (10,817 once invoked), scanned A, original, MIT.

A guide for testing applications that use Clerk, an authentication service for sign-in and user access control. It covers sign-in, protected pages, middleware, webhooks, and organization roles.

In plain words
What is it for?
Use it to test login flows, protected routes, authentication middleware, signed webhooks, and role-based access across organizations.
Why use it?
It helps verify that your own access rules and webhook security work correctly without testing Clerk's internal service.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: mentions Codex; built for aider; mentions Gemini CLI.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import middleware from '../../src/middleware';.

Good fit Use it to test login flows, protected routes, authentication middleware, signed webhooks, and role-based access across organizations.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/PramodDutta/qaskills
agentmods
npx agentmods add skills/pramoddutta/qaskills/clerk-auth-testing

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Clerk Auth Testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/pramoddutta/qaskills/clerk-auth-testing/github.svg)](https://agentmods.dev/skills/pramoddutta/qaskills/clerk-auth-testing)
Your own site
<a href="https://agentmods.dev/skills/pramoddutta/qaskills/clerk-auth-testing"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/clerk-auth-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Clerk Auth Testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/pramoddutta/qaskills/clerk-auth-testing"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/clerk-auth-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,817 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 438
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.10817
Opus 5.5 $0.00012 $0.04327
Sonnet 5.5 $0.00006 $0.02163
Haiku 4.5 $0.00003 $0.01082

Measured 1mo ago against content hash 9c661e0837bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Clerk Auth Testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

seed-skills/clerk-auth-testing/SKILL.md · 1,447 lines

How it starts

The opening of the file, as written. The whole thing — 1,447 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Clerk Auth Testing Skill

You are an expert QA engineer specializing in testing applications that use Clerk for authentication. When the user asks you to write, review, or debug tests for Clerk auth flows, protected routes, middleware, webhooks, or organization-based access control, follow these detailed instructions.

Core Principles

  1. Use Clerk testing tokens for E2E tests -- Clerk provides testing tokens that bypass the Clerk hosted UI. Use them in Playwright tests to avoid interacting with iframes and third-party UI.
  2. Mock Clerk in unit tests, integrate in E2E -- For unit tests, mock @clerk/nextjs hooks and helpers. For E2E tests, use real Clerk test instances or testing tokens.
  3. Test the middleware, not Clerk itself -- Your middleware uses Clerk's auth() and clerkMiddleware(). Test your route protection logic, not Clerk's JWT verification.
  4. Webhook signature verification is critical -- Clerk webhooks use Svix for signing. Test that your webhook handler rejects unsigned or tampered payloads.
  5. Organization RBAC requires multi-tenant testing -- Test that users with different roles in different organizations see the correct content and have the correct permissions.
  6. Session management affects every page -- Test that expired sessions redirect correctly, session refresh works, and multi-tab scenarios do not cause state inconsistencies.
  7. Graceful degradation when Clerk is unavailable -- Your app should handle missing Clerk keys or network failures without crashing. Test the degraded state.

Project Structure

Always organize Clerk auth testing with this structure:

src/
  middleware.ts
  app/
    (auth)/
      sign-in/
        [[...sign-in]]/
          page.tsx
      sign-up/
        [[...sign-up]]/
          page.tsx
    (protected)/
      dashboard/
        page.tsx
      admin/
        page.tsx
      settings/
        page.tsx
    api/
      webhooks/
        clerk/
          route.ts
      protected/
        route.ts
  lib/
    auth.ts
    roles.ts
  __tests__/
    unit/
      middleware.test.ts
      auth.test.ts
      roles.test.ts
    integration/
      webhook.test.ts
      protected-routes.test.ts
      organization.test.ts
    e2e/
      sign-in.spec.ts
      sign-up.spec.ts
      protected-flow.spec.ts
      admin-flow.spec.ts
    helpers/
      clerk-mock.ts
      clerk-test-utils.ts
    fixtures/
      clerk-user.fixture.ts
      clerk-webhook.fixture.ts

Read the full file on GitHub · 1,447 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 1,447 lines · 31 tokens per session scan A 9c661e0837bd

Subscribe to this mod's changes

Clerk Auth Testing is a skill published in the GitHub repository PramodDutta/qaskills (243 stars, last pushed 6d ago), licensed MIT. It adds 31 tokens to every session and 10,817 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

nextjs-authentication

Secure token storage (HttpOnly Cookies) and Middleware patterns. Use when implementing authentication, secure session storage, or auth middleware in Next.js.

FilippoDeSilva/skills · 33 tokens

testing-and-ci

Choose and run unit, E2E, Caddyfile fixture, automation, and CI checks for caddy-security. Use for coverage requirements, test evidence, failures, and report workflows; official OP conformance remains opt-in.

greenpau/caddy-security · 50 tokens

agent-inbox

Create temporary email inboxes and receive emails for testing auth flows, email verification, account confirmation, and any scenario where an AI agent needs to receive an email. Uses the agent-inbox MCP server with mail.tm + 1secmail fallback.

gsd-build/agent-inbox · 54 tokens

laravel-docs

Laravel 13.x — routing, Eloquent ORM, Blade, middleware, queues, broadcasting, auth, testing, Artisan, packages.

pledgeandgrow/pledge-skills · 32 tokens

ux-torture-test

Break a user interface under real-world conditions across responsiveness, hostile content, interaction states, accessibility, network failure, interruption, and complete user journeys, reporting observable user harm with evidence rather than aesthetic opinion. Use whenever the user wants to stress-test a UI, verify…

playbookTV/Ironclad · 108 tokens

e2e-testing-patterns

Master end-to-end testing with Playwright and Cypress to build reliable test suites that catch bugs, improve confidence, and enable fast deployment. Use when implementing E2E tests, debugging flaky tests, or establishing testing standards.

is-bo/fullstack-forge-skill · 51 tokens