asymmetric-al/core/nextjs-supabase-auth
Claude Code and agent skill by asymmetric-al/core
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Integrate Supabase Auth with Next.js App Router using middleware, callback handling, protected routes, and server/client client boundaries.
Install
npx vskill@latest install asymmetric-al/core/nextjs-supabase-authSKILL.md
Next.js + Supabase Auth
Use this skill for authentication work in Next.js App Router with Supabase Auth.
When to Apply
Use this skill when:
- Implementing login/signup/logout and session flows
- Protecting routes with middleware
- Handling auth callback exchanges
- Wiring auth checks in Server Components, Server Actions, and route handlers
- Debugging cookie/session desync between server and client
Do not use this skill when:
- The task is primarily query/index/schema optimization (use
supabase-postgres-best-practices) - The task spans broader Supabase surface area beyond Next.js auth wiring (use
docs/ai/skills/supabase/SKILL.md) - The task is UI-only and does not change auth behavior
Core Rules
- Use
@supabase/ssrpatterns for App Router integration. - Use
@/lib/supabase/serverfor server-side code and@/lib/supabase/clientfor client-side code. - Use middleware to refresh and enforce session state on protected routes.
- Do not manually store or forward auth tokens in client code.
- Use Server Actions (or secure route handlers) for privileged auth operations.
- Maintain RLS assumptions; do not bypass policy boundaries.
Workflow
- Identify execution boundary first (server component, client component, middleware, action, or route handler).
- Ensure the correct Supabase client is used for that boundary.
- Verify middleware coverage for protected routes.
- Verify callback handling exchanges auth code/session correctly.
- Validate auth checks before sensitive reads/writes.
- Verify end-to-end login/logout/session refresh behavior.
Checklist
- [ ] Server code imports
@/lib/supabase/server - [ ] Client code imports
@/lib/supabase/client - [ ] Protected paths are covered by auth middleware
- [ ] Callback route/session exchange is correctly handled
- [ ] No service role keys in client-side code
- [ ] No manual token persistence logic added
Common Anti-Patterns
- Using browser clients in server actions
- Using server clients in client components
- Calling
getSessionblindly in server render paths without user validation - Storing JWTs manually in localStorage/cookies
Security
- Security scanPassed, 95 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 repositoryCheckingdocs/ai/skills/nextjs-supabase-auth/SKILL.md
Popularity
- Repository stars
- 382
- Repository forks
- 7
- 7-day trend score
- 35
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/asymmetric-al/core/nextjs-supabase-auth)