sebas-aikon-intelligence/antigravity-awesome-skills

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.

First seen Jan 26, 2026

Installation

$ npx skills add sebas-aikon-intelligence/antigravity-awesome-skills --skill clerk-auth

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from sebas-aikon-intelligence/antigravity-awesome-skills · top by installs.

npx skills add sebas-aikon-intelligence/antigravity-awesome-skills

Browse all from sebas-aikon-intelligence/antigravity-awesome-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

License LICENSE
Default branch main
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents antigravity

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,506 B
  • docs SUMMARY.md 199 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 5 installs

SKILL.md

Clerk Authentication

Patterns

Next.js App Router Setup

Complete Clerk setup for Next.js 14/15 App Router.

Includes ClerkProvider, environment variables, and basic sign-in/sign-up components.

Key components:

  • ClerkProvider: Wraps app for auth context
  • <SignIn />, <SignUp />: Pre-built auth forms
  • <UserButton />: User menu with session management

Middleware Route Protection

Protect routes using clerkMiddleware and createRouteMatcher.

Best practices:

  • Single middleware.ts file at project root
  • Use createRouteMatcher for route groups
  • auth.protect() for explicit protection
  • Centralize all auth logic in middleware

Server Component Authentication

Access auth state in Server Components using auth() and currentUser().

Key functions:

  • auth(): Returns userId, sessionId, orgId, claims
  • currentUser(): Returns full User object
  • Both require clerkMiddleware to be configured

⚠️ Sharp Edges

Issue Severity Solution
Issue critical See docs
Issue high See docs
Issue high See docs
Issue high See docs
Issue medium See docs
Issue medium See docs
Issue medium See docs
Issue medium See docs