Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add andrelandgraf/fullstackrecipes --skill authentication-best-practices -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/authentication-best-practices/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/authentication-best-practices/

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.

Similar skills

All skills for Backend and APIs →

From the same set9

ralph-loop-workflow The ralph-loop-workflow skill runs an agent through a coding loop that turns a broad goal into tasks, changes code, and checks the result. Use it for work that needs repeated agent-led iterations. CX Codex +1 684installs use-fullstackrecipes use-fullstackrecipes — a skill for discovering and applying fullstackrecipes: setup guides for tools and day-to-day patterns for databases and APIs. The agent fetches the needed .md from the site and follows its instructions. CX Codex +1 240installs testing-best-practices testing-best-practices — a skill that teaches the agent to pick the right test type (Playwright, integration, or unit) and run it against an isolated Neon branch that auto-deletes after an hour. CX Codex +1 113installs logging-best-practices logging-best-practices teaches the agent to write structured Pino logs: context-first signature, levels for different scenarios, workflow-safe wrapper. CX Codex +1 111installs url-state-patterns The url-state-patterns Claude Code skill keeps React state in sync with URL query parameters using nuqs. It activates for shareable filters, search, and dialogs opened through a link. CX Codex +1 110installs sentry-best-practices The sentry-best-practices Claude Code skill guides Sentry error capture, context, tracing, and logging in application code. It activates during work on error handling or performance instrumentation. CX Codex +1 106installs workflow-best-practices The workflow-best-practices Claude Code skill covers durable workflows with steps, streaming, and agent runs. It applies when creating, starting, resuming, or saving a workflow. CX Codex +1 104installs drizzle-queries The drizzle-queries Claude Code skill guides type-safe Postgres queries with Drizzle ORM. It activates for database reads, mutations, and new table work. CX Codex +1 103installs

Project sponsors

Companies that keep this analytics open