[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EMBPREQ6KN7CVCNYHDTFB4":3,"skill-same:01M6EMBPREQ6KN7CVCNYHDTFB4":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6EMBPREQ6KN7CVCNYHDTFB4","auth-integration",null,"Use when implementing authentication - login\u002Fsignup forms, session management, protected routes, or role-based access control.\nNOT when non-auth UI, plain data fetching, or unrelated backend logic.\nTriggers: \"login page\", \"signup form\", \"auth setup\", \"protected route\", \"role-based access\", \"Better Auth\", \"NextAuth\".","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fawais68\u002Fauth-integration\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"auth integration","integration","auth","auth setup","session management","form","triggers","control","signup","Access Control","route","forms","unrelated","use","session","page","access","data","ui","authentication","2026-11-10 10:12:30",false,"---\nname: auth-integration\ndescription: |\n  Use when implementing authentication - login\u002Fsignup forms, session management, protected routes, or role-based access control.\n  NOT when non-auth UI, plain data fetching, or unrelated backend logic.\n  Triggers: \"login page\", \"signup form\", \"auth setup\", \"protected route\", \"role-based access\", \"Better Auth\", \"NextAuth\".\n---\n\n# Better Auth Integration Skill\n\n## Overview\n\nExpert guidance for authentication implementation using Better Auth\u002FNextAuth v5, including login\u002Fsignup forms, session management with Zustand, protected routes via middleware, and role-based access control for ERP systems.\n\n## When This Skill Applies\n\nThis skill triggers when users request:\n- **Auth Setup**: \"Setup Better Auth\", \"Configure authentication\", \"Auth providers\"\n- **Auth Forms**: \"Login page\", \"Signup form\", \"Forgot password\", \"Email verification\"\n- **Session Management**: \"Auth store\", \"Session handling\", \"Zustand auth\"\n- **Protected Routes**: \"Protected dashboard\", \"Auth middleware\", \"Route guards\"\n- **Role-Based Access**: \"Role guard\", \"Permission check\", \"Admin only\", \"Teacher access\"\n\n## Core Rules\n\n### 1. Provider Setup\n\n```typescript\n\u002F\u002F app\u002Fauth\u002F[...auth]\u002Froute.ts\nimport { auth } from '@\u002Flib\u002Fauth';\nimport { toNextJsHandler } from 'better-auth\u002Fnext-js';\n\nexport const { GET, POST } = toNextJsHandler(auth);\n\n\u002F\u002F lib\u002Fauth.ts\nimport { betterAuth } from 'better-auth';\nimport { prismaAdapter } from 'better-auth\u002Fadapters\u002Fprisma';\n\nexport const auth = betterAuth({\n  database: prismaAdapter(prisma),\n  emailAndPassword: {\n    enabled: true,\n    requireEmailVerification: true,\n  },\n  socialProviders: {\n    google: {\n      clientId: process.env.GOOGLE_CLIENT_ID!,\n      clientSecret: process.env.GOOGLE_CLIENT_SECRET!,\n    },\n  },\n  session: {\n    expiresIn: 60 * 60 * 24 * 7, \u002F\u002F 7 days\n    updateAge: 60 * 60 * 24, \u002F\u002F 24 hours\n  },\n});\n```\n\n**Requirements:**\n- Use Better Auth v5 for Next.js App Router\n- Configure providers (Google, Email\u002FPassword)\n- Enable email verification for new users\n- Set appropriate session expiration\n- Use environment variables for secrets (never hardcode)\n- Prisma adapter for database integration\n\n### 2. Auth Forms with Validation\n\n```tsx\nimport { useForm } from 'react-hook-form';\nimport { zodResolver } from '@hookform\u002Fresolvers\u002Fzod';\nimport { z } from 'zod';\nimport { signIn } from '@\u002Flib\u002Fauth\u002Fclient';\n\nconst loginSchema = z.object({\n  email: z.string().email('Invalid email address'),\n  password: z.string().min(8, 'Password must be at least 8 characters'),\n});\n\ntype LoginFormData = z.infer\u003Ctypeof loginSchema>;\n\nexport default function LoginForm() {\n  const { register, handleSubmit, formState: { errors, isSubmitting } } = useForm\u003CLoginFormData>({\n    resolver: zodResolver(loginSchema),\n  });\n\n  const onSubmit = async (data: LoginFormData) => {\n    await signIn.email({\n      email: data.email,\n      password: data.password,\n    });\n  };\n\n  return (\n    \u003Cform onSubmit={handleSubmit(onSubmit)} className=\"space-y-4\">\n      \u003Cdiv>\n        \u003Clabel className=\"block text-sm font-medium mb-2\">Email\u003C\u002Flabel>\n        \u003Cinput\n          {...register('email')}\n          type=\"email\"\n          className=\"w-full px-4 py-2 rounded-lg border\"\n        \u002F>\n        {errors.email && \u003Cp className=\"text-red-500 text-sm mt-1\">{errors.email.message}\u003C\u002Fp>}\n      \u003C\u002Fdiv>\n      \u003Cdiv>\n        \u003Clabel className=\"block text-sm font-medium mb-2\">Password\u003C\u002Flabel>\n        \u003Cinput\n          {...register('password')}\n          type=\"password\"\n          className=\"w-full px-4 py-2 rounded-lg border\"\n        \u002F>\n        {errors.password && \u003Cp className=\"text-red-500 text-sm mt-1\">{errors.password.message}\u003C\u002Fp>}\n      \u003C\u002Fdiv>\n      \u003Cbutton\n        type=\"submit\"\n        disabled={isSubmitting}\n        className=\"w-full py-2 bg-blue-500 text-white rounded-lg disabled:opacity-50\"\n      >\n        {isSubmitting ? 'Signing in...' : 'Sign In'}\n      \u003C\u002Fbutton>\n    \u003C\u002Fform>\n  );\n}\n```\n\n**Requirements:**\n- Use React Hook Form + Zod for validation\n- shadcn\u002Fui components for form inputs\n- Clear error messages with localization support\n- Loading states for better UX\n- Accessibility: proper labels, ARIA attributes\n- Password strength indicator for signup\n\n### 3. Session Management\n\n```typescript\nimport { create } from 'zustand';\nimport { authClient } from '@\u002Flib\u002Fauth\u002Fclient';\n\ninterface AuthState {\n  user: User | null;\n  session: Session | null;\n  isLoading: boolean;\n  isAuthenticated: boolean;\n  role: string | null;\n  hydrateAuth: () => Promise\u003Cvoid>;\n  signIn: (email: string, password: string) => Promise\u003Cvoid>;\n  signOut: () => Promise\u003Cvoid>;\n  refresh: () => Promise\u003Cvoid>;\n}\n\nexport const useAuthStore = create\u003CAuthState>((set, get) => ({\n  user: null,\n  session: null,\n  isLoading: true,\n  isAuthenticated: false,\n  role: null,\n\n  hydrateAuth: async () => {\n    set({ isLoading: true });\n    try {\n      const session = await authClient.getSession();\n      set({\n        user: session.user,\n        session: session,\n        isAuthenticated: !!session,\n        role: session.user?.role || null,\n        isLoading: false,\n      });\n    } catch (error) {\n      set({ isLoading: false, isAuthenticated: false });\n    }\n  },\n\n  signIn: async (email: string, password: string) => {\n    await authClient.signIn.email({ email, password });\n    await get().hydrateAuth();\n  },\n\n  signOut: async () => {\n    await authClient.signOut();\n    set({\n      user: null,\n      session: null,\n      isAuthenticated: false,\n      role: null,\n    });\n  },\n\n  refresh: async () => {\n    await get().hydrateAuth();\n  },\n}));\n\nexport const useAuth = () => {\n  const auth = useAuthStore();\n\n  useEffect(() => {\n    if (!auth.user && !auth.isLoading) {\n      auth.hydrateAuth();\n    }\n  }, []);\n\n  return auth;\n};\n```\n\n**Requirements:**\n- Use Zustand for client-side auth state\n- Sync with Better Auth session\n- Type-safe user and session data\n- Automatic session refresh on hydration\n- Secure cookie storage (httpOnly, secure, sameSite)\n- Clear sessions on sign out\n\n### 4. Protected Routes\n\n```typescript\nimport { authMiddleware } from 'better-auth\u002Fnext-js';\nimport { NextResponse } from 'next\u002Fserver';\n\nexport default authMiddleware({\n  pathPrefix: '\u002Fdashboard',\n\n  callback: async (request) => {\n    const { user } = request;\n\n    \u002F\u002F Redirect to login if not authenticated\n    if (!user) {\n      return NextResponse.redirect(new URL('\u002Fauth\u002Flogin', request.url));\n    }\n\n    \u002F\u002F Role-based access control\n    const path = request.nextUrl.pathname;\n\n    if (path.startsWith('\u002Fdashboard\u002Fadmin') && user.role !== 'admin') {\n      return NextResponse.redirect(new URL('\u002Fdashboard', request.url));\n    }\n\n    if (path.startsWith('\u002Fdashboard\u002Fteacher') && user.role !== 'teacher' && user.role !== 'admin') {\n      return NextResponse.redirect(new URL('\u002Fdashboard', request.url));\n    }\n\n    return NextResponse.next();\n  },\n});\n\nexport const config = {\n  matcher: ['\u002Fdashboard\u002F:path*'],\n};\n```\n\n```tsx\nimport { useRouter } from 'next\u002Fnavigation';\nimport { useAuth } from '@\u002Fhooks\u002FuseAuth';\n\nexport function withAuth\u003CP extends object>(\n  WrappedComponent: React.ComponentType\u003CP>,\n  allowedRoles?: string[]\n) {\n  return function AuthGuard(props: P) {\n    const { isAuthenticated, user, isLoading } = useAuth();\n    const router = useRouter();\n\n    useEffect(() => {\n      if (!isLoading && !isAuthenticated) {\n        router.push('\u002Fauth\u002Flogin');\n      }\n\n      if (!isLoading && isAuthenticated && allowedRoles) {\n        if (!allowedRoles.includes(user?.role || '')) {\n          router.push('\u002Funauthorized');\n        }\n      }\n    }, [isAuthenticated, isLoading, user, router]);\n\n    if (isLoading) {\n      return \u003CLoadingSkeleton \u002F>;\n    }\n\n    if (!isAuthenticated || (allowedRoles && !allowedRoles.includes(user?.role || ''))) {\n      return null;\n    }\n\n    return \u003CWrappedComponent {...props} \u002F>;\n  };\n}\n```\n\n**Requirements:**\n- Middleware for server-side route protection\n- Path matchers for protected routes\n- Role-based access control in middleware\n- Client-side auth guard HOC for extra protection\n- Redirect unauthorized users to appropriate pages\n- Loading states during auth checks\n\n### 5. Role-Based Access Control\n\n```typescript\nexport const ROLES = {\n  ADMIN: 'admin',\n  TEACHER: 'teacher',\n  STUDENT: 'student',\n  PARENT: 'parent',\n} as const;\n\nexport const PERMISSIONS = {\n  \u002F\u002F Admin permissions\n  MANAGE_USERS: 'manage:users',\n  MANAGE_COURSES: 'manage:courses',\n  VIEW_ALL_DATA: 'view:all_data',\n\n  \u002F\u002F Teacher permissions\n  VIEW_CLASS: 'view:class',\n  MANAGE_STUDENTS: 'manage:students',\n  CREATE_ASSIGNMENTS: 'create:assignments',\n\n  \u002F\u002F Student permissions\n  VIEW_OWN_DATA: 'view:own_data',\n  SUBMIT_ASSIGNMENTS: 'submit:assignments',\n} as const;\n\nexport const hasRole = (user: User | null, role: string): boolean => {\n  return user?.role === role || user?.role === ROLES.ADMIN;\n};\n\nexport const hasPermission = (user: User | null, permission: string): boolean => {\n  if (!user) return false;\n  if (user.role === ROLES.ADMIN) return true;\n\n  const rolePermissions = {\n    [ROLES.ADMIN]: Object.values(PERMISSIONS),\n    [ROLES.TEACHER]: [\n      PERMISSIONS.VIEW_CLASS,\n      PERMISSIONS.MANAGE_STUDENTS,\n      PERMISSIONS.CREATE_ASSIGNMENTS,\n    ],\n    [ROLES.STUDENT]: [\n      PERMISSIONS.VIEW_OWN_DATA,\n      PERMISSIONS.SUBMIT_ASSIGNMENTS,\n    ],\n    [ROLES.PARENT]: [\n      PERMISSIONS.VIEW_OWN_DATA,\n    ],\n  };\n\n  return rolePermissions[user.role]?.includes(permission) ?? false;\n};\n\nexport const PermissionGuard = ({\n  permission,\n  fallback = null,\n  children,\n}: {\n  permission: string;\n  fallback?: React.ReactNode;\n  children: React.ReactNode;\n}) => {\n  const { user } = useAuth();\n\n  if (!hasPermission(user, permission)) {\n    return \u003C>{fallback}\u003C\u002F>;\n  }\n\n  return \u003C>{children}\u003C\u002F>;\n};\n```\n\n**Requirements:**\n- Define roles and permissions clearly\n- Admin has all permissions by default\n- Type-safe permission checking\n- Permission-aware components\n- Server-side permission verification for sensitive actions\n- Audit logs for permission checks\n\n## Output Requirements\n\n### Code Files\n\n1. **Auth Configuration**:\n   - `lib\u002Fauth.ts` - Better Auth setup\n   - `app\u002Fauth\u002F[...auth]\u002Froute.ts` - Auth API routes\n\n2. **Forms**:\n   - `app\u002Fauth\u002Flogin\u002Fpage.tsx` - Login form\n   - `app\u002Fauth\u002Fsignup\u002Fpage.tsx` - Signup form\n   - `app\u002Fauth\u002Fforgot-password\u002Fpage.tsx` - Password reset\n\n3. **Session Management**:\n   - `lib\u002Fauth-store.ts` - Zustand auth store\n   - `hooks\u002FuseAuth.ts` - Auth hook\n\n4. **Protected Routes**:\n   - `middleware.ts` - Route protection\n   - `components\u002FAuthGuard.tsx` - Auth guard HOC\n\n### Integration Requirements\n\n- **shadcn\u002Fui**: Use shadcn form components\n- **@ui-ux-designer**: Ensure responsive, accessible forms\n- **@nextjs-app-router**: Follow Next.js App Router patterns\n- **@react-component**: Use functional components with hooks\n\n### Documentation\n\n- **PHR**: Create Prompt History Record for auth decisions\n- **ADR**: Document auth strategy (JWT vs DB sessions, provider choice)\n- **Comments**: Document security considerations\n\n## Workflow\n\n1. **Analyze Auth Requirements**\n   - Identify auth providers needed (Google, Email\u002FPassword)\n   - Determine role-based access needs\n   - Check email verification requirements\n\n2. **Setup Auth Provider**\n   - Configure Better Auth with providers\n   - Setup database adapter (Prisma)\n   - Configure session settings\n\n3. **Create Auth Forms**\n   - Build login form with validation\n   - Create signup with email verification\n   - Add password reset flow\n\n4. **Implement Session Management**\n   - Create Zustand auth store\n   - Sync with Better Auth session\n   - Handle session refresh\n\n5. **Protect Routes**\n   - Setup middleware for server-side protection\n   - Create auth guard HOC for client-side\n   - Implement role-based access control\n\n6. **Validate Security**\n   - Check OWASP compliance\n   - Verify CSRF protection\n   - Test session handling\n\n## Quality Checklist\n\nBefore completing any auth implementation:\n\n- [ ] **OWASP Secure**: CSRF tokens, XSS protection, secure headers\n- [ ] **Password Hash\u002FVerify**: bcrypt\u002Fargon2, no plain text storage\n- [ ] **Role Guards**: Middleware + client-side role checks\n- [ ] **Logout Clear Sessions**: Clear cookies, Zustand store, redirect\n- [ ] **Responsive Mobile Login**: Mobile-friendly forms, touch targets 44px+\n- [ ] **Email Verification**: Required for new accounts\n- [ ] **Session Expiration**: Reasonable timeout (7-30 days)\n- [ ] **Secure Cookies**: httpOnly, secure, sameSite='strict'\n- [ ] **Rate Limiting**: Prevent brute force attacks\n- [ ] **Audit Logging**: Log auth events for security monitoring\n\n## Common Patterns\n\n### Login Page with Google Auth\n\n```tsx\n'use client';\n\nimport { useState } from 'react';\nimport { signIn } from '@\u002Flib\u002Fauth\u002Fclient';\nimport { useRouter } from 'next\u002Fnavigation';\n\nexport default function LoginPage() {\n  const router = useRouter();\n  const [error, setError] = useState('');\n\n  const handleGoogleSignIn = async () => {\n    try {\n      await signIn.social({\n        provider: 'google',\n        callbackURL: '\u002Fdashboard',\n      });\n    } catch (err) {\n      setError('Failed to sign in with Google');\n    }\n  };\n\n  const handleEmailSignIn = async (email: string, password: string) => {\n    try {\n      await signIn.email({\n        email,\n        password,\n        callbackURL: '\u002Fdashboard',\n      });\n      router.push('\u002Fdashboard');\n    } catch (err) {\n      setError('Invalid email or password');\n    }\n  };\n\n  return (\n    \u003Cdiv className=\"min-h-screen flex items-center justify-center bg-gray-50\">\n      \u003Cdiv className=\"max-w-md w-full space-y-8 p-8 bg-white rounded-lg shadow-md\">\n        \u003Ch1 className=\"text-3xl font-bold text-center\">Sign In\u003C\u002Fh1>\n\n        {error && (\n          \u003Cdiv className=\"p-3 bg-red-100 text-red-700 rounded-lg\">\n            {error}\n          \u003C\u002Fdiv>\n        )}\n\n        \u003Cbutton\n          onClick={handleGoogleSignIn}\n          className=\"w-full flex items-center justify-center px-4 py-3 border border-gray-300 rounded-lg hover:bg-gray-50\"\n        >\n          Sign in with Google\n        \u003C\u002Fbutton>\n\n        \u003Cdiv className=\"relative\">\n          \u003Cdiv className=\"absolute inset-0 flex items-center\">\n            \u003Cdiv className=\"w-full border-t border-gray-300\" \u002F>\n          \u003C\u002Fdiv>\n          \u003Cdiv className=\"relative flex justify-center text-sm\">\n            \u003Cspan className=\"px-2 bg-white text-gray-500\">Or continue with email\u003C\u002Fspan>\n          \u003C\u002Fdiv>\n        \u003C\u002Fdiv>\n\n        \u003CLoginForm onSubmit={handleEmailSignIn} \u002F>\n\n        \u003Cp className=\"text-center text-sm text-gray-600\">\n          Don't have an account?{' '}\n          \u003Ca href=\"\u002Fauth\u002Fsignup\" className=\"text-blue-600 hover:underline\">\n            Sign up\n          \u003C\u002Fa>\n        \u003C\u002Fp>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n### Signup with Email Verification\n\n```tsx\n'use client';\n\nimport { useState } from 'react';\nimport { signUp } from '@\u002Flib\u002Fauth\u002Fclient';\n\nexport default function SignupPage() {\n  const [success, setSuccess] = useState(false);\n  const [error, setError] = useState('');\n\n  const handleSignup = async (data: SignupFormData) => {\n    try {\n      await signUp.email({\n        email: data.email,\n        password: data.password,\n        name: data.name,\n      });\n\n      setSuccess(true);\n    } catch (err) {\n      setError('Failed to create account');\n    }\n  };\n\n  if (success) {\n    return (\n      \u003Cdiv className=\"min-h-screen flex items-center justify-center\">\n        \u003Cdiv className=\"text-center\">\n          \u003Ch1 className=\"text-2xl font-bold mb-4\">Check your email\u003C\u002Fh1>\n          \u003Cp className=\"text-gray-600\">\n            We've sent a verification link to your email address\n          \u003C\u002Fp>\n        \u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n    );\n  }\n\n  return \u003CSignupForm onSubmit={handleSignup} \u002F>;\n}\n```\n\n### Protected Dashboard with Role Guard\n\n```tsx\nimport { withAuth } from '@\u002Fcomponents\u002FAuthGuard';\nimport { ROLES } from '@\u002Flib\u002Fpermissions';\n\nfunction AdminDashboard() {\n  const { user } = useAuth();\n\n  return (\n    \u003Cdiv className=\"p-6\">\n      \u003Ch1 className=\"text-2xl font-bold mb-6\">Admin Dashboard\u003C\u002Fh1>\n      \u003Cp>Welcome, {user?.name}\u003C\u002Fp>\n    \u003C\u002Fdiv>\n  );\n}\n\nexport default withAuth(AdminDashboard, [ROLES.ADMIN]);\n```\n\n### Password Strength Indicator\n\n```tsx\nexport const PasswordStrength = ({ password }: { password: string }) => {\n  const getStrength = (pwd: string) => {\n    let strength = 0;\n    if (pwd.length >= 8) strength++;\n    if (\u002F[a-z]\u002F.test(pwd)) strength++;\n    if (\u002F[A-Z]\u002F.test(pwd)) strength++;\n    if (\u002F[0-9]\u002F.test(pwd)) strength++;\n    if (\u002F[^a-zA-Z0-9]\u002F.test(pwd)) strength++;\n    return strength;\n  };\n\n  const strength = getStrength(password);\n  const colors = ['bg-red-500', 'bg-orange-500', 'bg-yellow-500', 'bg-green-500', 'bg-green-600'];\n  const labels = ['Weak', 'Fair', 'Good', 'Strong', 'Very Strong'];\n\n  return (\n    \u003Cdiv className=\"mt-2\">\n      \u003Cdiv className=\"flex gap-1\">\n        {[1, 2, 3, 4, 5].map((i) => (\n          \u003Cdiv\n            key={i}\n            className={`h-2 flex-1 rounded ${i \u003C= strength ? colors[strength - 1] : 'bg-gray-200'}`}\n          \u002F>\n        ))}\n      \u003C\u002Fdiv>\n      {password && (\n        \u003Cp className={`text-sm mt-1 ${colors[strength - 1]?.replace('bg-', 'text-')}`}>\n          Password strength: {labels[strength - 1]}\n        \u003C\u002Fp>\n      )}\n    \u003C\u002Fdiv>\n  );\n};\n```\n\n## Security Best Practices\n\n### OWASP Compliance\n\n1. **CSRF Protection**: Use built-in Better Auth CSRF tokens\n2. **XSS Prevention**: Sanitize user input, use React's auto-escaping\n3. **SQL Injection**: Use Prisma ORM (parameterized queries)\n4. **Password Security**: bcrypt\u002Fargon2 hashing, minimum 8 characters\n5. **Session Security**: httpOnly, secure, sameSite cookies\n\n### Rate Limiting\n\n```typescript\nimport { Ratelimit } from '@upstash\u002Fratelimit';\nimport { Redis } from '@upstash\u002Fredis';\n\nconst ratelimit = new Ratelimit({\n  redis: Redis.fromEnv(),\n  limiter: Ratelimit.slidingWindow(5, '10 s'), \u002F\u002F 5 requests per 10 seconds\n});\n\nexport async function checkRateLimit(identifier: string) {\n  const { success } = await ratelimit.limit(identifier);\n  return success;\n}\n```\n\n### Audit Logging\n\n```typescript\nexport async function logAuthEvent(event: {\n  type: 'login' | 'logout' | 'signup' | 'password_reset';\n  userId?: string;\n  ip?: string;\n  userAgent?: string;\n}) {\n  await prisma.authEvent.create({\n    data: {\n      ...event,\n      timestamp: new Date(),\n    },\n  });\n}\n```\n\n## Environment Variables\n\n```bash\n# .env.local\nAUTH_SECRET=your-super-secret-random-string\nBETTER_AUTH_URL=http:\u002F\u002Flocalhost:3000\n\n# Google OAuth\nGOOGLE_CLIENT_ID=your-google-client-id\nGOOGLE_CLIENT_SECRET=your-google-client-secret\n\n# Database\nDATABASE_URL=your-database-url\n```\n\n## References\n\n- Better Auth: https:\u002F\u002Fwww.better-auth.com\n- NextAuth v5: https:\u002F\u002Fauthjs.dev\n- OWASP Authentication Cheat Sheet: https:\u002F\u002Fcheatsheetseries.owasp.org\u002Fcheatsheets\u002FAuthentication_Cheat_Sheet.html\n- shadcn\u002Fui Forms: https:\u002F\u002Fui.shadcn.com\u002Fdocs\u002Fcomponents\u002Fform\n- React Hook Form: https:\u002F\u002Freact-hook-form.com\n- Zod Validation: https:\u002F\u002Fzod.dev\n","# Better Auth Integration Skill\n\n## Overview\n\nExpert guidance for authentication implementation using Better Auth\u002FNextAuth v5, including login\u002Fsignup forms, session management with Zustand, protected routes via middleware, and role-based access control for ERP systems.\n\n## When This Skill Applies\n\nThis skill triggers when users request:\n- **Auth Setup**: \"Setup Better Auth\", \"Configure authentication\", \"Auth providers\"\n- **Auth Forms**: \"Login page\", \"Signup form\", \"Forgot password\", \"Email verification\"\n- **Session Management**: \"Auth store\", \"Session handling\", \"Zustand auth\"\n- **Protected Routes**: \"Protected dashboard\", \"Auth middleware\", \"Route guards\"\n- **Role-Based Access**: \"Role guard\", \"Permission check\", \"Admin only\", \"Teacher access\"\n\n## Core Rules\n\n### 1. Provider Setup\n\n```typescript\n\u002F\u002F app\u002Fauth\u002F[...auth]\u002Froute.ts\nimport { auth } from '@\u002Flib\u002Fauth';\nimport { toNextJsHandler } from 'better-auth\u002Fnext-js';\n\nexport const { GET, POST } = toNextJsHandler(auth);\n\n\u002F\u002F lib\u002Fauth.ts\nimport { betterAuth } from 'better-auth';\nimport { prismaAdapter } from 'better-auth\u002Fadapters\u002Fprisma';\n\nexport const auth = betterAuth({\n  database: prismaAdapter(prisma),\n  emailAndPassword: {\n    enabled: true,\n    requireEmailVerification: true,\n  },\n  socialProviders: {\n    google: {\n      clientId: process.env.GOOGLE_CLIENT_ID!,\n      clientSecret: process.env.GOOGLE_CLIENT_SECRET!,\n    },\n  },\n  session: {\n    expiresIn: 60 * 60 * 24 * 7, \u002F\u002F 7 days\n    updateAge: 60 * 60 * 24, \u002F\u002F 24 hours\n  },\n});\n```\n\n**Requirements:**\n- Use Better Auth v5 for Next.js App Router\n- Configure providers (Google, Email\u002FPassword)\n- Enable email verification for new users\n- Set appropriate session expiration\n- Use environment variables for secrets (never hardcode)\n- Prisma adapter for database integration\n\n### 2. Auth Forms with Validation\n\n```tsx\nimport { useForm } from 'react-hook-form';\nimport { zodResolver } from '@hookform\u002Fresolvers\u002Fzod';\nimport { z } from 'zod';\nimport { signIn } from '@\u002Flib\u002Fauth\u002Fclient';\n\nconst loginSchema = z.object({\n  email: z.string().email('Invalid email address'),\n  password: z.string().min(8, 'Password must be at least 8 characters'),\n});\n\ntype LoginFormData = z.infer\u003Ctypeof loginSchema>;\n\nexport default function LoginForm() {\n  const { register, handleSubmit, formState: { errors, isSubmitting } } = useForm\u003CLoginFormData>({\n    resolver: zodResolver(loginSchema),\n  });\n\n  const onSubmit = async (data: LoginFormData) => {\n    await signIn.email({\n      email: data.email,\n      password: data.password,\n    });\n  };\n\n  return (\n    \u003Cform onSubmit={handleSubmit(onSubmit)} className=\"space-y-4\">\n      \u003Cdiv>\n        \u003Clabel className=\"block text-sm font-medium mb-2\">Email\u003C\u002Flabel>\n        \u003Cinput\n          {...register('email')}\n          type=\"email\"\n          className=\"w-full px-4 py-2 rounded-lg border\"\n        \u002F>\n        {errors.email && \u003Cp className=\"text-red-500 text-sm mt-1\">{errors.email.message}\u003C\u002Fp>}\n      \u003C\u002Fdiv>\n      \u003Cdiv>\n        \u003Clabel className=\"block text-sm font-medium mb-2\">Password\u003C\u002Flabel>\n        \u003Cinput\n          {...register('password')}\n          type=\"password\"\n          className=\"w-full px-4 py-2 rounded-lg border\"\n        \u002F>\n        {errors.password && \u003Cp className=\"text-red-500 text-sm mt-1\">{errors.password.message}\u003C\u002Fp>}\n      \u003C\u002Fdiv>\n      \u003Cbutton\n        type=\"submit\"\n        disabled={isSubmitting}\n        className=\"w-full py-2 bg-blue-500 text-white rounded-lg disabled:opacity-50\"\n      >\n        {isSubmitting ? 'Signing in...' : 'Sign In'}\n      \u003C\u002Fbutton>\n    \u003C\u002Fform>\n  );\n}\n```\n\n**Requirements:**\n- Use React Hook Form + Zod for validation\n- shadcn\u002Fui components for form inputs\n- Clear error messages with localization support\n- Loading states for better UX\n- Accessibility: proper labels, ARIA attributes\n- Password strength indicator for signup\n\n### 3. Session Management\n\n```typescript\nimport { create } from 'zustand';\nimport { authClient } from '@\u002Flib\u002Fauth\u002Fclient';\n\ninterface AuthState {\n  user: User | null;\n  session: Session | null;\n  isLoading: boolean;\n  isAuthenticated: boolean;\n  role: string | null;\n  hydrateAuth: () => Promise\u003Cvoid>;\n  signIn: (email: string, password: string) => Promise\u003Cvoid>;\n  signOut: () => Promise\u003Cvoid>;\n  refresh: () => Promise\u003Cvoid>;\n}\n\nexport const useAuthStore = create\u003CAuthState>((set, get) => ({\n  user: null,\n  session: null,\n  isLoading: true,\n  isAuthenticated: false,\n  role: null,\n\n  hydrateAuth: async () => {\n    set({ isLoading: true });\n    try {\n      const session = await authClient.getSession();\n      set({\n        user: session.user,\n        session: session,\n        isAuthenticated: !!session,\n        role: session.user?.role || null,\n        isLoading: false,\n      });\n    } catch (error) {\n      set({ isLoading: false, isAuthenticated: false });\n    }\n  },\n\n  signIn: async (email: string, password: string) => {\n    await authClient.signIn.email({ email, password });\n    await get().hydrateAuth();\n  },\n\n  signOut: async () => {\n    await authClient.signOut();\n    set({\n      user: null,\n      session: null,\n      isAuthenticated: false,\n      role: null,\n    });\n  },\n\n  refresh: async () => {\n    await get().hydrateAuth();\n  },\n}));\n\nexport const useAuth = () => {\n  const auth = useAuthStore();\n\n  useEffect(() => {\n    if (!auth.user && !auth.isLoading) {\n      auth.hydrateAuth();\n    }\n  }, []);\n\n  return auth;\n};\n```\n\n**Requirements:**\n- Use Zustand for client-side auth state\n- Sync with Better Auth session\n- Type-safe user and session data\n- Automatic session refresh on hydration\n- Secure cookie storage (httpOnly, secure, sameSite)\n- Clear sessions on sign out\n\n### 4. Protected Routes\n\n```typescript\nimport { authMiddleware } from 'better-auth\u002Fnext-js';\nimport { NextResponse } from 'next\u002Fserver';\n\nexport default authMiddleware({\n  pathPrefix: '\u002Fdashboard',\n\n  callback: async (request) => {\n    const { user } = request;\n\n    \u002F\u002F Redirect to login if not authenticated\n    if (!user) {\n      return NextResponse.redirect(new URL('\u002Fauth\u002Flogin', request.url));\n    }\n\n    \u002F\u002F Role-based access control\n    const path = request.nextUrl.pathname;\n\n    if (path.startsWith('\u002Fdashboard\u002Fadmin') && user.role !== 'admin') {\n      return NextResponse.redirect(new URL('\u002Fdashboard', request.url));\n    }\n\n    if (path.startsWith('\u002Fdashboard\u002Fteacher') && user.role !== 'teacher' && user.role !== 'admin') {\n      return NextResponse.redirect(new URL('\u002Fdashboard', request.url));\n    }\n\n    return NextResponse.next();\n  },\n});\n\nexport const config = {\n  matcher: ['\u002Fdashboard\u002F:path*'],\n};\n```\n\n```tsx\nimport { useRouter } from 'next\u002Fnavigation';\nimport { useAuth } from '@\u002Fhooks\u002FuseAuth';\n\nexport function withAuth\u003CP extends object>(\n  WrappedComponent: React.ComponentType\u003CP>,\n  allowedRoles?: string[]\n) {\n  return function AuthGuard(props: P) {\n    const { isAuthenticated, user, isLoading } = useAuth();\n    const router = useRouter();\n\n    useEffect(() => {\n      if (!isLoading && !isAuthenticated) {\n        router.push('\u002Fauth\u002Flogin');\n      }\n\n      if (!isLoading && isAuthenticated && allowedRoles) {\n        if (!allowedRoles.includes(user?.role || '')) {\n          router.push('\u002Funauthorized');\n        }\n      }\n    }, [isAuthenticated, isLoading, user, router]);\n\n    if (isLoading) {\n      return \u003CLoadingSkeleton \u002F>;\n    }\n\n    if (!isAuthenticated || (allowedRoles && !allowedRoles.includes(user?.role || ''))) {\n      return null;\n    }\n\n    return \u003CWrappedComponent {...props} \u002F>;\n  };\n}\n```\n\n**Requirements:**\n- Middleware for server-side route protection\n- Path matchers for protected routes\n- Role-based access control in middleware\n- Client-side auth guard HOC for extra protection\n- Redirect unauthorized users to appropriate pages\n- Loading states during auth checks\n\n### 5. Role-Based Access Control\n\n```typescript\nexport const ROLES = {\n  ADMIN: 'admin',\n  TEACHER: 'teacher',\n  STUDENT: 'student',\n  PARENT: 'parent',\n} as const;\n\nexport const PERMISSIONS = {\n  \u002F\u002F Admin permissions\n  MANAGE_USERS: 'manage:users',\n  MANAGE_COURSES: 'manage:courses',\n  VIEW_ALL_DATA: 'view:all_data',\n\n  \u002F\u002F Teacher permissions\n  VIEW_CLASS: 'view:class',\n  MANAGE_STUDENTS: 'manage:students',\n  CREATE_ASSIGNMENTS: 'create:assignments',\n\n  \u002F\u002F Student permissions\n  VIEW_OWN_DATA: 'view:own_data',\n  SUBMIT_ASSIGNMENTS: 'submit:assignments',\n} as const;\n\nexport const hasRole = (user: User | null, role: string): boolean => {\n  return user?.role === role || user?.role === ROLES.ADMIN;\n};\n\nexport const hasPermission = (user: User | null, permission: string): boolean => {\n  if (!user) return false;\n  if (user.role === ROLES.ADMIN) return true;\n\n  const rolePermissions = {\n    [ROLES.ADMIN]: Object.values(PERMISSIONS),\n    [ROLES.TEACHER]: [\n      PERMISSIONS.VIEW_CLASS,\n      PERMISSIONS.MANAGE_STUDENTS,\n      PERMISSIONS.CREATE_ASSIGNMENTS,\n    ],\n    [ROLES.STUDENT]: [\n      PERMISSIONS.VIEW_OWN_DATA,\n      PERMISSIONS.SUBMIT_ASSIGNMENTS,\n    ],\n    [ROLES.PARENT]: [\n      PERMISSIONS.VIEW_OWN_DATA,\n    ],\n  };\n\n  return rolePermissions[user.role]?.includes(permission) ?? false;\n};\n\nexport const PermissionGuard = ({\n  permission,\n  fallback = null,\n  children,\n}: {\n  permission: string;\n  fallback?: React.ReactNode;\n  children: React.ReactNode;\n}) => {\n  const { user } = useAuth();\n\n  if (!hasPermission(user, permission)) {\n    return \u003C>{fallback}\u003C\u002F>;\n  }\n\n  return \u003C>{children}\u003C\u002F>;\n};\n```\n\n**Requirements:**\n- Define roles and permissions clearly\n- Admin has all permissions by default\n- Type-safe permission checking\n- Permission-aware components\n- Server-side permission verification for sensitive actions\n- Audit logs for permission checks\n\n## Output Requirements\n\n### Code Files\n\n1. **Auth Configuration**:\n   - `lib\u002Fauth.ts` - Better Auth setup\n   - `app\u002Fauth\u002F[...auth]\u002Froute.ts` - Auth API routes\n\n2. **Forms**:\n   - `app\u002Fauth\u002Flogin\u002Fpage.tsx` - Login form\n   - `app\u002Fauth\u002Fsignup\u002Fpage.tsx` - Signup form\n   - `app\u002Fauth\u002Fforgot-password\u002Fpage.tsx` - Password reset\n\n3. **Session Management**:\n   - `lib\u002Fauth-store.ts` - Zustand auth store\n   - `hooks\u002FuseAuth.ts` - Auth hook\n\n4. **Protected Routes**:\n   - `middleware.ts` - Route protection\n   - `components\u002FAuthGuard.tsx` - Auth guard HOC\n\n### Integration Requirements\n\n- **shadcn\u002Fui**: Use shadcn form components\n- **@ui-ux-designer**: Ensure responsive, accessible forms\n- **@nextjs-app-router**: Follow Next.js App Router patterns\n- **@react-component**: Use functional components with hooks\n\n### Documentation\n\n- **PHR**: Create Prompt History Record for auth decisions\n- **ADR**: Document auth strategy (JWT vs DB sessions, provider choice)\n- **Comments**: Document security considerations\n\n## Workflow\n\n1. **Analyze Auth Requirements**\n   - Identify auth providers needed (Google, Email\u002FPassword)\n   - Determine role-based access needs\n   - Check email verification requirements\n\n2. **Setup Auth Provider**\n   - Configure Better Auth with providers\n   - Setup database adapter (Prisma)\n   - Configure session settings\n\n3. **Create Auth Forms**\n   - Build login form with validation\n   - Create signup with email verification\n   - Add password reset flow\n\n4. **Implement Session Management**\n   - Create Zustand auth store\n   - Sync with Better Auth session\n   - Handle session refresh\n\n5. **Protect Routes**\n   - Setup middleware for server-side protection\n   - Create auth guard HOC for client-side\n   - Implement role-based access control\n\n6. **Validate Security**\n   - Check OWASP compliance\n   - Verify CSRF protection\n   - Test session handling\n\n## Quality Checklist\n\nBefore completing any auth implementation:\n\n- [ ] **OWASP Secure**: CSRF tokens, XSS protection, secure headers\n- [ ] **Password Hash\u002FVerify**: bcrypt\u002Fargon2, no plain text storage\n- [ ] **Role Guards**: Middleware + client-side role checks\n- [ ] **Logout Clear Sessions**: Clear cookies, Zustand store, redirect\n- [ ] **Responsive Mobile Login**: Mobile-friendly forms, touch targets 44px+\n- [ ] **Email Verification**: Required for new accounts\n- [ ] **Session Expiration**: Reasonable timeout (7-30 days)\n- [ ] **Secure Cookies**: httpOnly, secure, sameSite='strict'\n- [ ] **Rate Limiting**: Prevent brute force attacks\n- [ ] **Audit Logging**: Log auth events for security monitoring\n\n## Common Patterns\n\n### Login Page with Google Auth\n\n```tsx\n'use client';\n\nimport { useState } from 'react';\nimport { signIn } from '@\u002Flib\u002Fauth\u002Fclient';\nimport { useRouter } from 'next\u002Fnavigation';\n\nexport default function LoginPage() {\n  const router = useRouter();\n  const [error, setError] = useState('');\n\n  const handleGoogleSignIn = async () => {\n    try {\n      await signIn.social({\n        provider: 'google',\n        callbackURL: '\u002Fdashboard',\n      });\n    } catch (err) {\n      setError('Failed to sign in with Google');\n    }\n  };\n\n  const handleEmailSignIn = async (email: string, password: string) => {\n    try {\n      await signIn.email({\n        email,\n        password,\n        callbackURL: '\u002Fdashboard',\n      });\n      router.push('\u002Fdashboard');\n    } catch (err) {\n      setError('Invalid email or password');\n    }\n  };\n\n  return (\n    \u003Cdiv className=\"min-h-screen flex items-center justify-center bg-gray-50\">\n      \u003Cdiv className=\"max-w-md w-full space-y-8 p-8 bg-white rounded-lg shadow-md\">\n        \u003Ch1 className=\"text-3xl font-bold text-center\">Sign In\u003C\u002Fh1>\n\n        {error && (\n          \u003Cdiv className=\"p-3 bg-red-100 text-red-700 rounded-lg\">\n            {error}\n          \u003C\u002Fdiv>\n        )}\n\n        \u003Cbutton\n          onClick={handleGoogleSignIn}\n          className=\"w-full flex items-center justify-center px-4 py-3 border border-gray-300 rounded-lg hover:bg-gray-50\"\n        >\n          Sign in with Google\n        \u003C\u002Fbutton>\n\n        \u003Cdiv className=\"relative\">\n          \u003Cdiv className=\"absolute inset-0 flex items-center\">\n            \u003Cdiv className=\"w-full border-t border-gray-300\" \u002F>\n          \u003C\u002Fdiv>\n          \u003Cdiv className=\"relative flex justify-center text-sm\">\n            \u003Cspan className=\"px-2 bg-white text-gray-500\">Or continue with email\u003C\u002Fspan>\n          \u003C\u002Fdiv>\n        \u003C\u002Fdiv>\n\n        \u003CLoginForm onSubmit={handleEmailSignIn} \u002F>\n\n        \u003Cp className=\"text-center text-sm text-gray-600\">\n          Don't have an account?{' '}\n          \u003Ca href=\"\u002Fauth\u002Fsignup\" className=\"text-blue-600 hover:underline\">\n            Sign up\n          \u003C\u002Fa>\n        \u003C\u002Fp>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n### Signup with Email Verification\n\n```tsx\n'use client';\n\nimport { useState } from 'react';\nimport { signUp } from '@\u002Flib\u002Fauth\u002Fclient';\n\nexport default function SignupPage() {\n  const [success, setSuccess] = useState(false);\n  const [error, setError] = useState('');\n\n  const handleSignup = async (data: SignupFormData) => {\n    try {\n      await signUp.email({\n        email: data.email,\n        password: data.password,\n        name: data.name,\n      });\n\n      setSuccess(true);\n    } catch (err) {\n      setError('Failed to create account');\n    }\n  };\n\n  if (success) {\n    return (\n      \u003Cdiv className=\"min-h-screen flex items-center justify-center\">\n        \u003Cdiv className=\"text-center\">\n          \u003Ch1 className=\"text-2xl font-bold mb-4\">Check your email\u003C\u002Fh1>\n          \u003Cp className=\"text-gray-600\">\n            We've sent a verification link to your email address\n          \u003C\u002Fp>\n        \u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n    );\n  }\n\n  return \u003CSignupForm onSubmit={handleSignup} \u002F>;\n}\n```\n\n### Protected Dashboard with Role Guard\n\n```tsx\nimport { withAuth } from '@\u002Fcomponents\u002FAuthGuard';\nimport { ROLES } from '@\u002Flib\u002Fpermissions';\n\nfunction AdminDashboard() {\n  const { user } = useAuth();\n\n  return (\n    \u003Cdiv className=\"p-6\">\n      \u003Ch1 className=\"text-2xl font-bold mb-6\">Admin Dashboard\u003C\u002Fh1>\n      \u003Cp>Welcome, {user?.name}\u003C\u002Fp>\n    \u003C\u002Fdiv>\n  );\n}\n\nexport default withAuth(AdminDashboard, [ROLES.ADMIN]);\n```\n\n### Password Strength Indicator\n\n```tsx\nexport const PasswordStrength = ({ password }: { password: string }) => {\n  const getStrength = (pwd: string) => {\n    let strength = 0;\n    if (pwd.length >= 8) strength++;\n    if (\u002F[a-z]\u002F.test(pwd)) strength++;\n    if (\u002F[A-Z]\u002F.test(pwd)) strength++;\n    if (\u002F[0-9]\u002F.test(pwd)) strength++;\n    if (\u002F[^a-zA-Z0-9]\u002F.test(pwd)) strength++;\n    return strength;\n  };\n\n  const strength = getStrength(password);\n  const colors = ['bg-red-500', 'bg-orange-500', 'bg-yellow-500', 'bg-green-500', 'bg-green-600'];\n  const labels = ['Weak', 'Fair', 'Good', 'Strong', 'Very Strong'];\n\n  return (\n    \u003Cdiv className=\"mt-2\">\n      \u003Cdiv className=\"flex gap-1\">\n        {[1, 2, 3, 4, 5].map((i) => (\n          \u003Cdiv\n            key={i}\n            className={`h-2 flex-1 rounded ${i \u003C= strength ? colors[strength - 1] : 'bg-gray-200'}`}\n          \u002F>\n        ))}\n      \u003C\u002Fdiv>\n      {password && (\n        \u003Cp className={`text-sm mt-1 ${colors[strength - 1]?.replace('bg-', 'text-')}`}>\n          Password strength: {labels[strength - 1]}\n        \u003C\u002Fp>\n      )}\n    \u003C\u002Fdiv>\n  );\n};\n```\n\n## Security Best Practices\n\n### OWASP Compliance\n\n1. **CSRF Protection**: Use built-in Better Auth CSRF tokens\n2. **XSS Prevention**: Sanitize user input, use React's auto-escaping\n3. **SQL Injection**: Use Prisma ORM (parameterized queries)\n4. **Password Security**: bcrypt\u002Fargon2 hashing, minimum 8 characters\n5. **Session Security**: httpOnly, secure, sameSite cookies\n\n### Rate Limiting\n\n```typescript\nimport { Ratelimit } from '@upstash\u002Fratelimit';\nimport { Redis } from '@upstash\u002Fredis';\n\nconst ratelimit = new Ratelimit({\n  redis: Redis.fromEnv(),\n  limiter: Ratelimit.slidingWindow(5, '10 s'), \u002F\u002F 5 requests per 10 seconds\n});\n\nexport async function checkRateLimit(identifier: string) {\n  const { success } = await ratelimit.limit(identifier);\n  return success;\n}\n```\n\n### Audit Logging\n\n```typescript\nexport async function logAuthEvent(event: {\n  type: 'login' | 'logout' | 'signup' | 'password_reset';\n  userId?: string;\n  ip?: string;\n  userAgent?: string;\n}) {\n  await prisma.authEvent.create({\n    data: {\n      ...event,\n      timestamp: new Date(),\n    },\n  });\n}\n```\n\n## Environment Variables\n\n```bash\n# .env.local\nAUTH_SECRET=your-super-secret-random-string\nBETTER_AUTH_URL=http:\u002F\u002Flocalhost:3000\n\n# Google OAuth\nGOOGLE_CLIENT_ID=your-google-client-id\nGOOGLE_CLIENT_SECRET=your-google-client-secret\n\n# Database\nDATABASE_URL=your-database-url\n```\n\n## References\n\n- Better Auth: https:\u002F\u002Fwww.better-auth.com\n- NextAuth v5: https:\u002F\u002Fauthjs.dev\n- OWASP Authentication Cheat Sheet: https:\u002F\u002Fcheatsheetseries.owasp.org\u002Fcheatsheets\u002FAuthentication_Cheat_Sheet.html\n- shadcn\u002Fui Forms: https:\u002F\u002Fui.shadcn.com\u002Fdocs\u002Fcomponents\u002Fform\n- React Hook Form: https:\u002F\u002Freact-hook-form.com\n- Zod Validation: https:\u002F\u002Fzod.dev\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fawais68\u002Fauth-integration",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill auth-integration",{"tool":59,"command":60},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill auth-integration",{"tool":62,"command":63},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill auth-integration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fawais68\u002Fauth-integration\u002FSKILL.md",true,[67],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"skill-report.json","REFERENCE","参考文档",8790,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fawais68\u002Fauth-integration\u002Fskill-report.json",[74,83,92,101,107,113],{"skillNo":75,"name":76,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":39},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[80,81,82],"model","model hierarchy","model hierarchy skill",{"skillNo":84,"name":85,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":39},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[89,90,91],"MCP","zoom","zoom mcp",{"skillNo":93,"name":94,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":39},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[98,99,100,90],"sdk","zoom apps sdk","apps",{"skillNo":102,"name":103,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":39},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[103],{"skillNo":108,"name":109,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":39},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[109],{"skillNo":114,"name":115,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":39},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[115]]