Google's official skill for the gws CLI — drive Gmail, Drive, Calendar, Sheets, Docs, Chat and Admin APIs from an agent, with Model Armor screening.
Clerk Next.js PatternsSkill
Summary
Clerk's official skill for advanced Next.js auth: middleware strategy, protecting Server Actions, caching-safe auth() usage, session tokens and manual JWT verification.
Features
- Public-first vs protected-first clerkMiddleware strategies
- Protecting Next.js Server Actions
- auth() versus client hooks, and the caching implications
- getToken() for calling external APIs
- Manual JWT verification for servers without Clerk middleware
- Conditional rendering with <Show>
- Common Next.js pitfalls and SDK version differences
Install This Skill
Add this skill to your favorite AI agent in a few steps.
Skill Content
Usage Instructions
Learn how to use this skill with different AI agents.
Example Usage
Protect my Next.js Server Actions with Clerk and set up middleware for a mostly-public marketing site.
Description
Basic Clerk setup is easy; the parts that go wrong in Next.js are middleware ordering, what auth() does to caching, and how to protect Server Actions. This is Clerk's own skill for exactly those problems - the layer above "add the provider and go".
What it covers
- Server vs client auth - when to reach for
auth()and when to use the React hooks, and why mixing them up produces the bugs it does. - Middleware strategies - the public-first and protected-first approaches to
clerkMiddleware, with the trade-offs of each spelled out. - Server Actions - how to protect them properly rather than assuming middleware already did.
- Conditional rendering with
<Show>for auth-dependent UI. - Session tokens and custom JWTs -
getToken()for calling external APIs,useSession()for session data, and manual JWT verification for standalone API servers that sit outside Clerk middleware. - Common pitfalls - a dedicated section of the mistakes that recur in Next.js Clerk apps.
The skill also carries an SDK version table and marks Core 2-only guidance inline, so an agent working on an older SDK is not handed newer syntax.
Requirements
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY must be set. Manual JWT verification additionally needs CLERK_JWT_KEY or CLERK_PEM_PUBLIC_KEY. For first-time framework setup use the companion clerk-setup skill instead.
Where it fits
Part of Clerk's skill collection, which spans a router skill, CLI operations, custom UI, the backend REST API, framework patterns for React, React Router, Vue, Nuxt, Astro, TanStack Start and Chrome extensions, feature skills for organisations, billing, webhooks and testing, and native mobile skills for Swift, Android and Expo.
Install the whole set with npx skills add clerk/skills, add it as a Codex plugin marketplace, or clone the repo into ~/.claude/skills/clerk. Follows the Agent Skills open standard. MIT licensed.
Related Skills
Netlify's official skill for zero-config managed Postgres — querying from Functions, Drizzle setup, migrations and per-preview database branches.
Official WordPress skill for Gutenberg block work: block.json, attributes and serialization, dynamic rendering, and the deprecation path that keeps existing content valid.
Persistent cross-session memory for coding agents: hooks capture each session, a local SQLite + vector store compresses it, and a mem-search skill reads it back.
