fixmyberlin/fixmyskills/tanstack-start-auth
Claude Code and agent skill by fixmyberlin/fixmyskills
- community
Checking that the SKILL.md file is still in the repository.
Better Auth on TanStack Start: betterAuth() config, plugins, adapters, sessions, and FMC route protection (layout beforeLoad for route UX, endpointAuth/guards for data boundaries, headers, tanstackStartCookies plugin, OAuth sign-in). Use for auth.server.ts, Better Auth, sign-in flows, session helpers, or secured routes/APIs.
Install
npx vskill@latest install fixmyberlin/fixmyskills/tanstack-start-authSKILL.md
The same SKILL.md was published earlier as fixmyberlin/fixmyskills/tanstack-start-auth.
TanStack Start + Better Auth
Single skill for library configuration and Start-specific wiring in FMC apps (TILDA, Trassenscout migration, etc.).
When to apply
- Creating or changing
betterAuth()/createAuthClient()config - Mounting
/api/auth/*,tanstackStartCookies()plugin, OAuth sign-in routes beforeLoadgates,endpointAuth, session in server functions or API handlers- Public vs protected server functions (
public*.functions.tsnaming) - API key + session dual auth on automation endpoints
References (read as needed)
| Topic | File | |
|---|---|---|
| TanStack routes, cookies, session helpers, TILDA patterns | references/auth.md | |
| Trassenscout auth lint pattern | references/endpoint-auth-lint.md | |
| betterAuth options, DB, plugins, sessions, hooks | references/better-auth-config.md |
Live docs: better-auth.com/docs · llms.txt
Related skills
tanstack-router-conventions—validateSearch, search serialization, loaders + Querytanstack-start-conventions— layout,.server.ts/.functions.ts, boundaries, SSRplaywright-skill— E2E stubbed auth (TILDA)
Non-negotiable rules
- Session helpers always receive
headers: Headersfrom the current request. - Route
beforeLoaddoes not call DB/session directly — server functions +getRequestHeaders(). - Use official
tanstackStartCookies()as the last plugin; verify no client-bundle leak afterbetter-authversion changes (auth.md). /api/auth/$and other handler-only API routes:ssr: false(skilltanstack-start-conventions→references/selective-ssr.md).- API routes: auth inside each handler (no route-level
beforeLoad). - Admin/role checks with cookie cache:
getSession({ query: { disableCookieCache: true } }). - Compare API secrets with timing-safe equality.
- Two layers:
beforeLoad= route UX only;endpointAuth/ guards = data boundary. Never rely onbeforeLoadalone. - No auth middleware for route guarding — use layout
beforeLoad. Global auth middleware breaks public RPCs (public*.functions.ts,getSessionForRouteFn) and is not the FMC auth-route pattern.
Quick patterns
Setup snapshot
betterAuth()inauth.server.ts(Prisma/Drizzle adapter, plugins)createAuthClient()with matching client plugins/api/auth/$→auth.handler(request)(cookies viatanstackStartCookies()plugin)session.server.tshelpers takingHeaders- CLI migrate/generate after plugin changes — details in better-auth-config.md
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/tanstack-start-auth/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- 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
[](https://verified-skill.com/skills/fixmyberlin/fixmyskills/tanstack-start-auth)