A senior-level engineering skill for implementing flawless Clerk authentication and route protection in Next.js 15/16+ applications.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install sr-next-clerk-expert
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install sr-next-clerk-expert using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
This Openclaw Skills extension provides a comprehensive framework for integrating Clerk authentication into modern Next.js environments. It focuses on high-performance, SEO-friendly patterns that avoid common pitfalls like infinite redirect loops, slow static pages, and server-side errors on public routes.
By adhering to the strict technical patterns defined in this skill, developers can ensure a robust security posture while maintaining a seamless user experience. This includes implementing the Twelve Commandments of Clerk integration, which cover everything from route group organization to the proper use of client-side loading wrappers.
First, ensure you have your API keys from the Clerk Dashboard. Then, configure your environment variables in your .env.local file:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
Next, if you are using Next.js 16+, migrate your middleware to the new proxy format to ensure compatibility with modern Openclaw Skills workflows:
mv middleware.ts proxy.ts
Ensure your file structure includes an app/(private) directory for all authenticated routes to leverage this automation effectively.
The skill organizes authentication data and configuration according to the following schema to ensure reliability:
| Component | Location | Responsibility |
|---|---|---|
| Root Layout | app/layout.tsx | ClerkProvider initialization and global redirect configuration |
| Middleware | proxy.ts | Edge-level route protection and session verification logic |
| Private Routes | app/(private)/* | Authenticated views requiring server-side auth() checks |
| Public Routes | app/page.tsx | Static or marketing pages that avoid server-side auth for SEO |
Loading
A production-grade development workflow for AI agents that manages tasks, stacked PRs, and deployment verification.

A high-performance skill for AI agents to generate production-ready, visually stunning frontend interfaces that break away from generic AI design patterns.

An architecture-first development workflow that ensures every line of code justifies its existence within a system's strict design principles.

A local REST API integration for managing Nest and Google Home devices through a Starling Home Hub.

A high-performance multi-agent orchestration playbook for building TypeScript, Next.js, and Convex applications without architectural chaos.

A specialized CLI tool that queries Xcode IndexStoreDB to find every Swift file referencing a specific symbol.








































