Better Auth Integrations
Route handler wiring for Better Auth across Next.js, SvelteKit, Remix, Express, Hono, and other frameworks.
- CCM score
- 51 of 100
- skills.sh installs
- 381
- GitHub stars
- 79
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers mounting the Better Auth handler at
/api/auth/*or a custom base path - Includes App Router and Pages Router examples using
toNextJsHandlerandtoNodeHandler, plus thenextCookiesplugin for server actions - Enforces a consistent base path between server and client and avoids body parsers that run before the auth handler
- Designed for TypeScript projects that need auth routes and cookie handling working in SSR and server actions
Install
$ npx -y skills add bobmatnyc/claude-mpm-skills --skill better-auth-integrations -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Better Auth Integrations
Goals
- Mount the Better Auth handler at
/api/auth/*(or a custom base path). - Use framework helpers where available.
- Ensure cookies and headers flow correctly in SSR and server actions.
Quick start
- Create an
authinstance (seebetter-auth-core). - Add a catch-all route for
/api/auth/*. - Use a framework helper (or
auth.handler) to return a Response.
Next.js App Router
import { auth } from "@/lib/auth";
import { toNextJsHandler } from "better-auth/next-js";
export const { GET, POST } = toNextJsHandler(auth);
Next.js Pages Router
import { auth } from "@/lib/auth";
import { toNodeHandler } from "better-auth/node";
export const config = { api: { bodyParser: false } };
export default toNodeHandler(auth.handler);
Cookie handling in Next.js server actions
Use the nextCookies plugin so server actions set cookies correctly.
import { betterAuth } from "better-auth";
import { nextCookies } from "better-auth/next-js";
export const auth = betterAuth({
// ...config
plugins: [nextCookies()],
});
Details
- Repository
- github.com/bobmatnyc/claude-mpm-skills
- Categories
- Backend & APIs, Frontend & UI Code
- First seen
- Jun 3, 2026
Questions
What does the better-auth-integrations skill do?
The better-auth-integrations skill guides wiring Better Auth route handlers in TypeScript web frameworks such as Next.js, SvelteKit, Remix, Express and Hono. It shows how to mount the Better Auth handler at /api/auth/* and how to return a Response using framework helpers. It also covers cookie handling so cookies flow correctly in server actions.
How do I install the better-auth-integrations skill?
Run npx -y skills add bobmatnyc/claude-mpm-skills --skill better-auth-integrations -y in your project to install it. After installation, better-auth-integrations gives the agent Next.js App Router and Pages Router handler examples. It also includes the nextCookies plugin setup for server actions.
Which frameworks does the better-auth-integrations skill cover?
The better-auth-integrations skill covers Next.js, SvelteKit, Remix, Express, Hono and other web frameworks that use route handlers. Its SKILL.md gives concrete Next.js App Router and Pages Router examples. Its references point to framework-specific notes for the rest.
Where does better-auth-integrations sit in the Backend & APIs category?
better-auth-integrations is listed in the Backend & APIs category on Claude Marketplaces alongside entra-app-registration, neon, firebase-basics, firebase-auth-basics and workers-best-practices. Its focus is narrow: wiring Better Auth handlers into web framework routes. It sets itself apart by targeting that Better Auth integration step rather than general backend work.
More from bobmatnyc/claude-mpm-skills
All 154- Reporting Pipelines381
- Better Auth Plugins380
- Git Worktrees379
- Vb Winforms377
- Nextjs Core375
- Headlessui374
- Fastapi Local Dev373
- Sec Edgar Pipeline372
- Vb Core371
- Vercel Networking Domains371
- Svelte370
- Env Manager368
- Mongodb368
- Digitalocean Containers Images365
- Hono Jsx365
- Phoenix Api Channels365
- Langgraph364
- Pr Quality Checklist364
- Vercel Observability364
- Media Transcoding363
- Writing Plans363
- Ecto Patterns362
- Clap361
- Graphql358
Similar to Better Auth Integrations
More Backend & APIsbetter-auth-corebobmatnyc/claude-mpm-skills386 installsSetup guide for the Better Auth instance, server handlers, client wiring, and session access in TypeScript apps.
nuxt-better-authonmax/nuxt-skills2.2K installsAuthentication guide for Nuxt apps using the Better Auth module, with a reference file for each task.
better-authgiuseppe-trisciuoglio/developer-kit3.9K installsType-safe Better Auth integration guide for NestJS, Next.js App Router, and Drizzle ORM with PostgreSQL.
nextjs-authenticationgiuseppe-trisciuoglio/developer-kit4.1K installsComplete Auth.js 5 setup for Next.js App Router, covering OAuth, route protection, and role-based access.
create-authbetter-auth/skills29.3K installsInteractive scaffolding guide that plans and implements Better Auth in TypeScript/JavaScript apps before writing any code.
nextauth-authenticationmindrally/skills1.2K installsSetup guide for NextAuth.js v5 in Next.js covering providers, JWT and database sessions, and route protection.