gitagent/skills/export-auth/SKILL.md
Migrates the IntelliStack Better-Auth OIDC authentication system to any target auth framework, preserving OAuth flows, session management, role/permission model, and JWT claim structure.
npx skillsauth add SARAMALI15792/AINativeBook export-authInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Re-implement IntelliStack's full auth system in any target environment.
intellistack/auth-server/src/)auth-server/src/index.ts — Express server wrapping Better-Authauth-server/src/auth.ts — providers, session, callbacksstudent, instructor, admin, institution_adminsub, email, role, institution_id, stage_access[]| Target | Language | Notes | |---------------------|------------|------------------------------------| | Auth.js (NextAuth) | TypeScript | Next.js / Edge | | Passport.js + JWT | TypeScript | Express / NestJS | | Spring Security | Java | OAuth2 Resource Server | | Devise + OmniAuth | Ruby | Rails | | Laravel Sanctum | PHP | SPA / API tokens | | Supabase Auth | Any | Managed auth with RLS | | Clerk | Any | Hosted auth, webhook sync | | Keycloak | Any | Self-hosted OIDC | | Better-Auth (keep) | TypeScript | Different backend, same auth |
Describe:
/auth/sign-in — credential + OAuth entry points/auth/callback — OAuth redirect handling/auth/sign-out — session teardown/auth/refresh — token refresh/auth/me — current user + claims## Auth Migration Plan → <target>
- Provider credentials needed: GOOGLE_CLIENT_ID/SECRET, GITHUB_CLIENT_ID/SECRET
- Session storage: [cookie / DB / Redis]
- JWT library: [name + version]
- Breaking changes: [anything the target cannot replicate exactly]
Output complete, working auth config for the target including:
Produce a mapping table:
IntelliStack Role → Target Role/Policy
student → ROLE_STUDENT
instructor → ROLE_INSTRUCTOR
admin → ROLE_ADMIN
institution_admin → ROLE_INSTITUTION_ADMIN
development
Re-implements the IntelliStack RAG pipeline (Qdrant + Cohere + OpenAI SSE) in any target language or framework, preserving hybrid retrieval, reranking, citation architecture, and stage-based access control.
tools
Generates typed API clients and frontend integration code for any framework consuming the IntelliStack REST API, including auth flows, learning path UI, chatbot UI, and admin dashboards.
tools
Converts IntelliStack's SQLAlchemy 2.0 models and Alembic migrations to any target ORM or database toolkit, preserving the full schema, indexes, relationships, and cascade rules.
development
Migrates IntelliStack FastAPI routers, services, and Pydantic schemas to any target backend framework while preserving every business rule, auth guard, and error contract.