CtrlK
BlogDocsLog inGet started
Tessl Logo

clerk-auth

Expert patterns for Clerk auth implementation, middleware, organizations, webhooks, and user sync Use when: adding authentication, clerk auth, user authentication, sign in, sign up.

Install with Tessl CLI

npx tessl i github:sickn33/antigravity-awesome-skills --skill clerk-auth
What are skills?

78

0.98x

Quality

48%

Does it follow best practices?

Impact

98%

0.98x

Average score across 6 eval scenarios

Optimize this skill with Tessl

npx tessl skill review --optimize ./skills/clerk-auth/SKILL.md
SKILL.md
Review
Evals

Evaluation results

100%

Add Authentication to a Next.js 14 SaaS Starter

Next.js Clerk app bootstrap

Criteria
Without context
With context

ClerkProvider wraps app

100%

100%

SignIn component used

100%

100%

SignUp component used

100%

100%

UserButton component used

100%

100%

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY referenced

100%

100%

CLERK_SECRET_KEY referenced

100%

100%

@clerk/nextjs import

100%

100%

clerkMiddleware export

100%

100%

No custom auth forms

100%

100%

App Router structure

100%

100%

Without context: $0.3152 · 1m 26s · 21 turns · 28 in / 4,968 out tokens

With context: $0.5032 · 1m 31s · 30 turns · 34 in / 6,000 out tokens

95%

-5%

Secure a Multi-Section Next.js Application with Route-Level Access Control

Middleware route protection

Criteria
Without context
With context

Single middleware.ts at root

100%

100%

createRouteMatcher used

100%

100%

auth.protect() called

100%

100%

clerkMiddleware export

100%

100%

All auth logic in middleware

100%

100%

Public routes defined

100%

50%

Protected routes defined

100%

100%

matcher config present

100%

100%

No page-level auth duplication

100%

100%

Without context: $0.1724 · 48s · 13 turns · 20 in / 2,684 out tokens

With context: $0.3892 · 1m 17s · 26 turns · 357 in / 4,126 out tokens

100%

Build a Personalized Server-Rendered Dashboard for a Project Management App

Server component auth access

Criteria
Without context
With context

auth() used for userId/session

100%

100%

currentUser() used for profile data

100%

100%

auth() and currentUser() not swapped

100%

100%

clerkMiddleware prerequisite noted

100%

100%

Server Component import path

100%

100%

No client-side auth in server files

100%

100%

Unauthenticated case handled

100%

100%

middleware.ts present

100%

100%

async/await on currentUser

100%

100%

Without context: $0.5793 · 2m 36s · 28 turns · 33 in / 9,110 out tokens

With context: $0.5181 · 1m 42s · 30 turns · 146 in / 6,860 out tokens

Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.