workos-authkit-base
WorkOS AuthKit Integration
Step 1: Fetch AuthKit Documentation (BLOCKING)
STOP. Do not proceed until complete.
WebFetch: https://workos.com/docs/user-management/authkit
This page is the source of truth for AuthKit concepts, supported frameworks, and setup requirements. If this skill conflicts with the docs, follow the docs.
Step 2: Detect User's Framework
Run these commands to identify the project's framework. Check each in order; use the first match.
# Next.js
grep -q '"next"' package.json 2>/dev/null && echo "DETECTED: nextjs"
# React Router / Remix
grep -qE '"react-router"|"@remix-run"' package.json 2>/dev/null && echo "DETECTED: react-router"
# TanStack Start
grep -q '"@tanstack/start"' package.json 2>/dev/null && echo "DETECTED: tanstack-start"
# React (standalone SPA — check AFTER framework-specific entries)
grep -q '"react"' package.json 2>/dev/null && echo "DETECTED: react"
If none match, check for a plain HTML/JS project:
# Vanilla JS — no package.json or no framework dependency
[ ! -f package.json ] && echo "DETECTED: vanilla-js"
ls index.html 2>/dev/null && echo "DETECTED: vanilla-js"
Step 3: Route to Framework-Specific Skill
Use the detection result from Step 2 to select the correct skill. Do not continue past this step if a framework matched — switch to the matching skill immediately.
Detection result --> Skill to invoke
─────────────────────────────────────────────
nextjs --> workos-authkit-nextjs
react-router --> workos-authkit-react-router
tanstack-start --> workos-authkit-tanstack-start
react --> workos-authkit-react
vanilla-js --> workos-authkit-vanilla-js
If a framework is detected: Stop here. The framework-specific skill handles everything from install through verification.
If no framework is detected: Ask the user: "Which framework are you using? (Next.js, React, React Router, TanStack Start, or vanilla JS)". If they name something not listed (e.g., Astro, Remix, SvelteKit), use workos-authkit-vanilla-js as the closest starting point and WebFetch https://workos.com/docs/user-management/authkit for framework-specific guidance.
Related Skills
- workos-authkit-nextjs — Next.js App Router (13+), server-side rendering
- workos-authkit-react — React SPA with client-side AuthKit
- workos-authkit-react-router — React Router / Remix integration
- workos-authkit-tanstack-start — TanStack Start framework
- workos-authkit-vanilla-js — Plain HTML/JS without a framework
More from workos/skills
workos
Use when the user asks for a WorkOS docs URL, term, or dashboard field (Sign-in endpoint, initiate_login_uri, Redirect URI, `WORKOS_*` env vars), or is implementing, debugging, or migrating WorkOS — AuthKit, SSO/SAML, Directory Sync, RBAC, FGA, MFA, Vault, Audit Logs, Admin Portal, Pipes (Connected Apps), Feature Flags, Radar (bot/fraud detection), webhooks, Custom Domains, or migrating from Auth0, Clerk, Cognito, Firebase, Supabase, Stytch, Descope, or Better Auth. Also triggers on @workos-inc/* imports.
599workos-widgets
Use when the user is implementing, embedding, or debugging a WorkOS Widget — specifically the User Management, User Profile, Admin Portal SSO Connection, or Admin Portal Domain Verification widgets. Handles the full stack — detecting the frontend (Next.js, React, React Router, TanStack Start, Vite, SvelteKit), generating access tokens via the backend SDK in use (Node, Python, Go, Ruby, PHP, Java, .NET), and wiring up the widget component correctly per the bundled OpenAPI spec. Also use when code imports from @workos-inc/widgets or the user pastes <UserManagement /> or <UserProfile /> JSX.
272workos-authkit-nextjs
Integrate WorkOS AuthKit with Next.js App Router (13+). Server-side rendering required.
64workos-authkit-react
Integrate WorkOS AuthKit with React single-page applications. Client-side only authentication. Use when the project is a React SPA without Next.js or React Router.
33workos-authkit-tanstack-start
Integrate WorkOS AuthKit with TanStack Start applications. Full-stack TypeScript with server functions. Use when project uses TanStack Start, @tanstack/start, or vinxi.
28workos-authkit-vanilla-js
Integrate WorkOS AuthKit with vanilla JavaScript applications. No framework required, browser-only. Use when project is plain HTML/JS, doesn't use React/Vue/etc, or mentions vanilla JavaScript authentication.
28