yudefine/nuxt-supabase-starter/nuxt-auth-utils

Claude Code and agent skill by yudefine/nuxt-supabase-starter

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when implementing auth in Nuxt apps with nuxt-auth-utils - provides useUserSession composable, OAuth handlers, cookie-based sessions, and route protection. Works on all deployment targets without DB dependency.

Install

npx vskill@latest install yudefine/nuxt-supabase-starter/nuxt-auth-utils

SKILL.md

The same SKILL.md was published earlier as yudefine/nuxt-supabase-starter/nuxt-auth-utils.

Nuxt Auth Utils

Cookie-based authentication module for Nuxt. No database required for session storage — sessions are encrypted and stored in cookies.

When to Use

  • Installing/configuring nuxt-auth-utils
  • Implementing OAuth login flows (Google, GitHub, etc.)
  • Protecting routes (client and server)
  • Accessing user session in API routes
  • Setting up session types

For Nuxt patterns: use nuxt skill For better-auth (DB-based auth): use nuxt-better-auth skill

Available Guidance

FileTopics
[references/client-auth.md](references/client-auth.md)useUserSession, OAuth login, logout, session state
[references/server-auth.md](references/server-auth.md)requireUserSession, getUserSession, setUserSession, OAuth handlers

Loading Files

DO NOT load all files at once. Load only what's relevant to your current task.

Key Concepts

ConceptDescription
useUserSession()Client composable — user, loggedIn, session, fetch, clear
requireUserSession()Server helper — throws 401 if not authenticated
setUserSession()Server helper — set session after OAuth success
clearUserSession()Server helper — clear session (logout)
defineOAuth*EventHandlerServer OAuth callback handlers
auth.d.tsType augmentation via declare module '#auth-utils'

Quick Reference

ts
// Client: useUserSession()
const { user, loggedIn, clear } = useUserSession()
ts
// Server: OAuth handler
export default defineOAuthGoogleEventHandler({
async onSuccess(event, { user: googleUser }) {
await setUserSession(event, {
user: { id: googleUser.sub, email: googleUser.email, name: googleUser.name },
})
return sendRedirect(event, '/')
},
})
ts
// Server: protect API route
const { user } = await requireUserSession(event)

vs better-auth

nuxt-auth-utilsbetter-auth
Session 儲存Cookie(無 DB)Database
登入方式OAuth onlyEmail/Password + OAuth
登出clear()signOut()
角色檢查手動requireUserSession(event, { user: { role } })
部署所有環境Workers 需 Hyperdrive

Resources


_Token efficiency: Main skill ~300 tokens, each sub-file ~600-800 tokens_

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
45
Repository forks
2
7-day trend score
19

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
  • Grok Build (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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/yudefine/nuxt-supabase-starter/nuxt-auth-utils/badge)](https://verified-skill.com/skills/yudefine/nuxt-supabase-starter/nuxt-auth-utils)

Something wrong with this skill or its page? Tell us.