Agent Skills: scaffold-auth-route

Create a new auth-protected route with server-side validation. Use for user-facing pages needing authentication.

UncategorizedID: Oungseik/gakom/scaffold-auth-route

Install this agent skill to your local

pnpm dlx add-skill https://github.com/MonDevHub/gakom/tree/HEAD/.claude/skills/scaffold-auth-route

Skill Files

Browse the full folder contents for scaffold-auth-route.

Download Skill

Loading file tree…

.claude/skills/scaffold-auth-route/SKILL.md

Skill Metadata

Name
scaffold-auth-route
Description
Create a new auth-protected route with server-side validation. Use for user-facing pages needing authentication.

Generate a new authenticated SvelteKit route following repo patterns.

Create:

  • +page.svelte with SNUGGLE components and {#await} for data fetching
  • +page.server.ts with session validation using Better Auth
  • Proper error handling for unauthenticated users

Route conventions:

  • Use kebab-case naming (e.g., /my-dashboard)
  • Check session in load function: ctx.locals.session
  • Redirect to login if no session
  • Use Svelte 5 runes like $props for props
  • Integrate with Tailwind/shadcn for consistent UI

Reference template.md for route files.