
clerk/skills
21 skills123k installs966 starsGitHub
Install
npx skills add https://github.com/clerk/skillsSkills in this repo
1Clerk Nextjs PatternsClerk Next.js Patterns is an advanced agent skill from Clerk’s skill package for solo builders shipping SaaS on Next.js who already have basic Clerk setup and need correct production patterns. It organizes work by task—choosing server versus client auth, configuring middleware, protecting Server Actions, handling API route status codes, and caching authenticated data—with deep-linked reference docs rather than a single linear recipe. The skill assumes NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY, and notes optional JWT or PEM public keys when you verify tokens on standalone API servers without Clerk middleware. Version callouts distinguish Core 2 SDK differences inline so agents do not apply obsolete middleware filenames or APIs. On Prism’s journey it sits squarely in Build integrations: you invoke it while wiring login flows, protected dashboards, and secured mutations, not while brainstorming positioning or writing launch SEO. Intermediate complexity reflects real App Router and caching edges, not copy-paste snippet installs.16kinstalls2Clerk SetupClerk Setup is an agent skill oriented around eval-backed procedures for adding Clerk authentication to common indie stacks. It covers installing the correct SDK (@clerk/nextjs for App Router Next.js, @clerk/express for TypeScript APIs), placing ClerkProvider in the root layout inside the body, creating middleware with clerkMiddleware, and scoping public versus protected routes. Solo builders use it right after scaffolding a SaaS or API when manual auth would slow the first shippable milestone. The skill encodes guardrails seen in its eval fixtures: no inappropriate React-only Clerk packages on Next.js, required environment variables for publishable and secret keys, and optional detection of shadcn when present. It does not replace Clerk dashboard configuration, OAuth provider setup, or production secret management—that stays in Operate and Ship security passes. After setup, you typically continue with user profile UI, org billing, or row-level authorization in your own backend.10.8kinstalls3Clerk Custom Uiclerk-custom-ui is a Clerk agent skill for solo builders who need full control over sign-in screens while staying on the Core 2 JavaScript SDKs. It explains how to drive authentication with the `useSignIn()` hook from Next.js, React, or Expo packages, including when to wait on `isLoaded` and how to call `setActive` after a successful challenge. The flow starts with `signIn.create` using an identifier and password, then branches into first-factor verification when Clerk requires email or phone codes via `prepareFirstFactor` and `attemptFirstFactor`. When organizations enforce MFA, the skill continues with second-factor preparation and attempts, listing strategies such as TOTP alongside code-based channels. This is intentionally not the hosted Clerk UI—you own layout, validation messaging, and error states, but you must follow Clerk’s state machine so sessions finalize correctly. Intermediate complexity reflects multi-step auth edges. Pair it with Clerk dashboard configuration for factors and redirect URLs before agents generate production-ready components.10.5kinstalls4ClerkClerk is a router agent skill that detects what you are trying to do with Clerk—authentication setup, framework-specific patterns, organizations, seat-based pricing, feature entitlements, user syncing, or test flows—and points the agent at the matching specialized Clerk skill. Solo builders shipping SaaS, mobile (Expo/Swift/Android), or browser extensions use it when they mention Clerk, custom sign-in, subscriptions, or payments instead of guessing which doc skill to load. The skill reads package.json to classify Core 2 versus current @clerk SDK versions across Next.js, React, Expo, TanStack Start, and related packages so implementation advice matches installed dependencies. It does not replace deep framework guides; it is the front door that keeps Clerk work consistent across the stack while you integrate auth during build and refine billing during growth.10.2kinstalls5Clerk Webhooksclerk-webhooks teaches coding agents to output complete, verified webhook handlers for Clerk’s real-time event stream. Solo SaaS builders use it when they need a durable users or organizations table, welcome emails, Slack alerts, or billing-side effects that follow Clerk lifecycle changes—not when they need milliseconds-later consistency during signup. The skill is opinionated: verification on every request, framework-specific imports (`@clerk/nextjs/webhooks` and siblings), and clear guidance that webhooks complement session tokens rather than replace them for just-created data. That framing prevents brittle onboarding flows that poll the database waiting on Svix delivery. Event coverage spans identity, sessions, organizations, and payments, so one skill can anchor an event-driven integration layer. Metadata notes MIT licensing and WebFetch tooling for pulling current Clerk docs while generating handlers.9.6kinstalls6Clerk TestingClerk Testing is an official Clerk agent skill that guides solo builders through end-to-end authentication testing for SaaS apps using Playwright or Cypress. It frames test auth as isolated session state: initialize with clerkSetup, inject setupClerkTestingToken before navigation, and persist sessions via storageState so suites stay fast without re-login every case. The agent fetches the correct guide from Clerk’s decision tree rather than inventing API shapes, and enforces pk_test_* and sk_test_* keys plus CLERK_TESTING_TOKEN from the dashboard. Best practices include waiting on data-clerk-component selectors for UI readiness. Use it in Ship when Clerk gates your core flows and you need repeatable CI coverage before launch. It is narrowly scoped to Clerk’s testing model—not generic UI testing—so it pairs well with build-phase Clerk integration skills and keeps security mistakes like production keys in tests out of your pipeline, aligned with Prism’s testing and integrations facets.9.1kinstalls7Clerk Backend Apiclerk-backend-api is an agent skill for solo builders shipping SaaS with Clerk who need server-side API calls without rereading docs each time. It encodes how to authenticate with CLERK_SECRET_KEY, hit versioned REST paths like GET /v1/users (including recent signups via date filters), create organizations, and send org invitations with admin roles. Pagination via limit and offset is part of the contract so agents do not drop users on large tenants. The bundled evals anchor common prompts—last-seven-days signups and Acme Corp org plus invite—so generated code matches production patterns. Use during backend implementation, cron jobs, admin scripts, or growth automations that must not use the browser session. It complements Clerk frontend SDK skills; this package is REST-only. Intermediate complexity assumes you already store secrets safely and run Node or similar HTTP clients.8.7kinstalls8Clerk Orgsclerk-orgs is a Clerk-maintained agent skill for solo and indie builders shipping B2B SaaS with Clerk. It walks through enabling Organizations in the dashboard or via CLI, choosing membership required versus optional, and implementing multi-tenant flows such as org switching, RBAC, verified domains, and enterprise SSO. The skill assumes NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY and alignment between dashboard membership mode and whether personal accounts must coexist with org subscriptions. It targets current Clerk SDKs on Next.js and React while flagging Core 2 differences inline. Install it when you are past idea validation and actively integrating team workspaces, org-based routing, and member management—not when you only need single-user consumer sign-in.8.5kinstalls9Clerk React Patternsclerk-react-patterns is an agent skill for solo builders shipping React single-page apps who want production-grade auth without reinventing session handling. It documents how to install `@clerk/react`, load the publishable key through Vite env conventions, wrap the tree in ClerkProvider, and use the core hooks with correct loading guards so routes do not flash the wrong UI. Reference maps point to protected React Router setups for v6 and v7, plus custom sign-in and sign-up flows when hosted Clerk components are not enough. Triggers align with real task phrasing—Vite Clerk setup, useAuth, protected routes, and custom forms—so agents fetch the right slice instead of Next.js App Router advice. Pair it with Cursor or Claude Code while scaffolding dashboards, member areas, or B2B SaaS frontends where Clerk is the identity layer.4.4kinstalls10Clerk Swiftclerk-swift is an agent skill for solo and indie builders shipping native iOS apps who need Clerk authentication without misapplying React or Expo guidance. It activates when the user asks for Swift, SwiftUI, UIKit, or native iOS Clerk setup, or when the repo looks like a native Apple project. The workflow starts by confirming the stack is not Expo or React Native, then choosing prebuilt ClerkKitUI components or custom flows, and following packaged references for each path. The skill emphasizes reading installed package source so generated code mirrors current ClerkKit behavior rather than stale blog snippets. Allowed tooling includes web fetch for up-to-date docs patterns. You need Xcode and the ClerkKit Swift package. Outcomes are a working auth surface—either drop-in AuthView/UserButton or a controlled custom sign-in flow—ready to pair with your backend and App Store release checklist.4kinstalls11Clerk AndroidClerk Android is an agent skill for solo and indie builders shipping native Android apps who need production-ready authentication without guessing SDK APIs. It guides implementation in Kotlin with Jetpack Compose, following clerk-android source and documentation patterns. Use it when the codebase is clearly native Android—Android Gradle plugins, AndroidManifest.xml, and Compose UI—and you want either prebuilt AuthView or UserButton components for speed or custom flows that call Clerk APIs directly for full design control. The skill enforces activation boundaries so Expo and React Native work is not mis-tagged here; those stacks should use Clerk’s general mobile setup path instead. Prerequisites are Android Studio and the clerk-android Gradle dependency. Allowed tooling is limited to WebFetch for up-to-date doc alignment. Outcomes are a coherent auth integration plan and implementation steps matched to prebuilt versus custom mode, reducing rework from mixing web or cross-platform assumptions into a native app.3.8kinstalls12Clerk React Router Patternsclerk-react-router-patterns is an agent skill for solo builders who ship SaaS or web APIs with Clerk on React Router v7. It explains how Clerk fits the v7 middleware and loader pipeline: clerkMiddleware attaches auth to request context, rootAuthLoader in root.tsx injects Clerk state for the client, and getAuth(args) reads the current user inside any loader or action. The skill routes you to focused references for loaders and actions, protected routes and redirects, and SSR user/session handling so you do not mix client-only patterns with server loaders. Use it when triggers match react-router auth, rootAuthLoader, protected routes, or loader authentication—not when you only need generic React auth without RR v7. It assumes MIT-licensed Clerk SDK usage and WebFetch for fetching upstream docs when the agent needs them.3.6kinstalls13Clerk Chrome Extension Patternsclerk-chrome-extension-patterns is an agent skill that teaches solo builders how to embed Clerk authentication in Chrome extensions using the dedicated @clerk/chrome-extension packages. It covers wrapping the popup in ClerkProvider with a publishable key and extension-safe redirect URLs via chrome.runtime.getURL, so OAuth and sign-out flows work outside a normal web origin. For Manifest V3 background service workers that call your API, it documents createClerkClient with background: true, guarding clerk.session before getToken(), and avoiding imports meant for React or Next.js apps. The skill is aimed at indie developers shipping browser extensions with a SaaS backend who need session tokens in non-UI contexts. Invoke it when scaffolding extension auth, debugging redirect failures, or reviewing agent-generated Clerk code against Clerk’s extension eval expectations.3.3kinstalls14Clerk Astro PatternsClerk Astro Patterns is an agent skill packaged as eval-backed procedural knowledge for Clerk’s Astro integration. Solo builders shipping authenticated dashboards on Astro often hit subtle gaps: middleware export shape, createRouteMatcher usage, and the difference between Astro.locals.auth() versus Next.js server helpers. This skill encodes those expectations so your coding agent produces src/middleware.ts with onRequest, clerkMiddleware, protected route matching, and correct redirects for unsigned users. It also covers SSR page frontmatter that reads userId and bails to /sign-in. Use it while integrating Clerk during build, before you ship protected routes to production. Complexity is intermediate because you need Astro SSR basics and a Clerk application configured. Deliverables are correct middleware and page auth checks aligned with Clerk’s Astro server package.3.3kinstalls15Clerk Expo Patternsclerk-expo-patterns is an agent skill from Clerk’s official skills repo that teaches correct Expo + Clerk wiring for solo builders shipping React Native apps with hosted auth. It focuses on the mistakes that waste afternoons: wrong public env prefixes, missing tokenCache on ClerkProvider, and incomplete OAuth deep-link handling. Eval-driven scenarios ask the agent to import ClerkProvider from @clerk/expo, pass tokenCache from @clerk/expo/token-cache, read EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY, and implement Google sign-in with useSSO, startSSOFlow strategy oauth_google, a myapp://oauth-callback style redirectUrl, and top-level WebBrowser.maybeCompleteAuthSession. Prism places it on Build → integrations because you install packages, configure env, and connect mobile auth flows—not when you are only validating a landing page idea. Intermediate complexity assumes Expo Router or similar navigation and comfort with native OAuth redirects. Outcome is production-shaped auth scaffolding agents can generate and you can diff against eval expectations.3.2kinstalls16Clerk Nuxt PatternsClerk Nuxt Patterns is an agent skill for solo and indie builders shipping Nuxt 3 apps who need production-grade auth instead of copy-pasted snippets. It centers on the official `@clerk/nuxt` module: install, env configuration, and a mental model where middleware protects pages, composables expose session state on the client, and Nitro routes validate identity on the server. The skill routes you to four focused references—middleware, server API routes, composables, and SSR auth—so you pick the task (protect a route, call an API as the signed-in user, avoid hydration mismatches) without reading Clerk docs end to end. It assumes you are building a SaaS or API-backed product where Clerk is the identity layer. Use it during the Build phase when integrations are on the critical path; it is not a substitute for pricing, billing ops, or launch SEO work.3.2kinstalls17Clerk Vue PatternsClerk Vue Patterns is an agent skill for solo builders shipping Vue 3 apps who want Clerk as the auth layer without reverse-engineering composable APIs from scattered docs. It encodes eval-backed patterns: show the user’s name and a sign-out button via useAuth and useUser, gate content on isSignedIn, and build a custom sign-in form with useSignIn—calling signIn.create with identifier and password then setActive on the created session id. The skill also covers a Pinia store that mirrors Clerk auth so the rest of your app reads isAuthenticated from one place. Use it during frontend build when you have chosen Clerk over rolling your own JWT flow and need consistent Vue 3 + TypeScript-friendly examples. It assumes @clerk/vue is installed and a Clerk application is configured in the dashboard; it does not replace Clerk backend webhooks, organization policies, or SSR/Nuxt-specific middleware—that is adjacent integration work.3.2kinstalls18Clerk BillingClerk Billing is an agent skill for solo builders shipping a subscription SaaS on Clerk and Next.js who need monetization without hand-rolling Stripe flows from scratch. It walks through enabling billing (Dashboard or programmatic `clerk enable billing`), which auto-provisions default free user and org plans, then implementing Clerk’s PricingTable and checkout drawer, entitlement checks, and webhook handling for subscription lifecycle events. Development instances can use Clerk’s shared development gateway without linking Stripe; production requires Stripe for payment processing only. The skill stresses experimental billing APIs and pinning `@clerk/nextjs` and clerk-js versions per the main Clerk skill table. Use it when you are gating features by plan, selling seats in a B2B workspace product, running trials, or syncing billing state to your app database. It fits validate pricing conversations only after you commit to Clerk as the billing surface—implementation and hard gates live in build and carry into ship security around webhook secrets.3.1kinstalls19Clerk Tanstack PatternsClerk TanStack Patterns teaches server-first authentication for TanStack React Start apps using Clerk. Solo builders learn to guard routes like /dashboard by running auth() inside a server function from beforeLoad and redirecting guests to sign-in. The same pattern secures data loaders that fetch orders or other user-owned records, returning userId only when isAuthenticated is true. Eval expectations stress correct imports and never relying on client hooks alone for gatekeeping. Use it while wiring SaaS dashboards and API-backed pages where session state must be verified on every request boundary.3kinstalls20Clerk ExpoClerk Expo implements Clerk authentication for Expo and React Native by reading the installed @clerk/expo package and matching real hook and component APIs—not stale blog snippets. Solo mobile builders use it when adding ClerkProvider, session hooks, or prebuilt AuthView and UserButton to an app that already signals Expo via package.json, metro config, or app config files. The skill deliberately excludes pure native iOS/Android projects and web-only frameworks so agents do not apply RN guidance to Swift or Next.js codebases. allowed-tools includes WebFetch for staying aligned with upstream Clerk docs behavior. MIT-licensed Clerk-authored metadata marks compatibility with development builds. For indie SaaS apps shipped through Expo, this compresses auth integration into a repeatable agent procedure: detect project type, wire provider at root, choose prebuilt versus custom UI, and validate against current package exports.990installs21Clerk CliClerk CLI is a reference skill for solo builders and coding agents that automate Clerk through the command line. Clerk exposes an agent-oriented mode meant for scripts and LLM harnesses that cannot click prompts or open browsers blindly. The skill separates agent mode (non-interactive behavior) from sandbox limits (whether home-directory config, OS keychain, outbound Clerk API, browser launch, or localhost OAuth callbacks actually work). When a blocked boundary is hit, the CLI emits a one-time warning that host-only state may be missing—agents must rerun on a real host shell before trusting failures as genuine misconfiguration. Use --mode agent or CLERK_MODE=agent when the environment might look interactive but is not. This is not a replacement for Clerk’s application SDK docs; it prevents false negatives during CI, remote sandboxes, and agent loops while you wire auth in build and later operate Clerk-backed apps.96installs