authentication-best-practices — Claude Code skill: installation
The authentication-best-practices Claude Code skill covers Better Auth sessions, route protection, and sign-in flows. It activates when a task involves access control for pages or APIs.
no license 106 installs ★ 23 updated 2026-06-08
npx skills add andrelandgraf/fullstackrecipes --skill authentication-best-practices -a claude-codeWhat authentication-best-practices does
The skill explains how to read Better Auth sessions in client components and on the server, protect routes, and handle sign-in, sign-up, and sign-out. Client components use hooks from @/lib/auth/client; server code checks sessions with auth.api.getSession and request headers.
Unauthenticated visitors can be redirected away from protected pages, while signed-in users can be sent away from authentication pages. User-specific data can be fetched in parallel after the session check. Complete the Better Auth Setup recipe first.
What it helps with
- check a user's session on the server
- block unauthenticated access to a page or API
- redirect signed-in users away from authentication pages
- wire up Better Auth sign-in, sign-up, and sign-out
Example prompts for the agent
- Protect the profile page with a Better Auth session check.
- Add email sign-in and user registration.
- Redirect signed-in users away from the sign-in page.
How to install authentication-best-practices
1Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill authentication-best-practices -a claude-code2Manually: put the files in place
~/.claude/skills/authentication-best-practices/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/authentication-best-practices/
1Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill authentication-best-practices -a codex2Manually: put the files in place
.agents/skills/authentication-best-practices/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill authentication-best-practices -a cursor2Manually: put the files in place
.cursor/skills/authentication-best-practices/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install andrelandgraf/fullstackrecipes skills/authentication-best-practices2Manually: put the files in place
.github/skills/authentication-best-practices/SKILL.md1Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill authentication-best-practices -a gemini-cli2Platform CLI
gemini skills install https://github.com/andrelandgraf/fullstackrecipes --path skills/authentication-best-practicesManually: put the files in place
.devin/skills/authentication-best-practices/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill authentication-best-practices -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about authentication-best-practices
How do I install authentication-best-practices in Claude Code?
Run npx skills add andrelandgraf/fullstackrecipes --skill authentication-best-practices -a claude-code. The skill file is at ~/.claude/skills/authentication-best-practices/SKILL.md.
What does authentication-best-practices do?
It covers Better Auth sessions on the client and server, route access checks, and sign-in, registration, and sign-out flows.
What does authentication-best-practices require?
Complete the Better Auth Setup recipe first. The skill uses Better Auth.