fjrg2007/enigma/clerk-nuxt-patterns
Claude Code and agent skill by fjrg2007/enigma
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
'Nuxt 3 auth patterns with @clerk/nuxt - middleware, composables, server
Install
npx vskill@latest install fjrg2007/enigma/clerk-nuxt-patternsSKILL.md
The same SKILL.md was published earlier as midudev/autoskills/clerk-nuxt-patterns.
Nuxt Patterns
What Do You Need?
| Task | Reference | |
|---|---|---|
| Protect routes with middleware | references/nuxt-middleware.md | |
| Auth in server API routes (Nitro) | references/server-api-routes.md | |
| useAuth / useUser in components | references/composables.md | |
| SSR-safe auth patterns | references/ssr-auth.md |
References
| Reference | Description | |
|---|---|---|
references/nuxt-middleware.md | Route protection, clerkMiddleware() | |
references/server-api-routes.md | Nitro server route auth | |
references/composables.md | useAuth, useUser, useClerk | |
references/ssr-auth.md | SSR hydration, server vs client |
Setup
.env:
nuxt.config.ts:
This single line auto-configures middleware, plugins, and component auto-imports.
Mental Model
@clerk/nuxt auto-imports all Clerk components and composables — no explicit imports needed in <script setup>.
- Composables (
useAuth,useUser) — client-side reactive, inside<script setup> - Server routes (
clerkClient) — Nitro server routes,event.context.auth - Middleware (
clerkMiddleware) — auto-registered, useauth().protect()to lock routes
Minimal Pattern
definePageMeta({ middleware: 'auth' })uses the built-in auth middleware from@clerk/nuxt.
Common Pitfalls
| Symptom | Cause | Fix | |
|---|---|---|---|
Composables return undefined on server | useAuth is client-only | Use event.context.auth in server routes | |
| Route not protected | Missing middleware: 'auth' meta | Add definePageMeta({ middleware: 'auth' }) | |
clerkClient not available | Wrong import path | Import from @clerk/nuxt/server | |
| Hydration mismatch | Rendering auth state before mounted | Wrap in <ClientOnly> or check isLoaded | |
| Env vars not picked up | Wrong prefix | Nuxt requires NUXT_PUBLIC_ for public, NUXT_ for server |
Org-Aware Pattern
See Also
clerk-setup- Initial Clerk installclerk-custom-ui- Custom flows & appearanceclerk-orgs- B2B organizations
Docs
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingassets/skills-registry/clerk-nuxt-patterns/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/fjrg2007/enigma/clerk-nuxt-patterns)