worldcrafter-auth-guard

Community

Protect routes with login and RBAC.

Authorhopeoverture
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides patterns and tools to implement authentication and authorization in WorldCrafter apps using Supabase Auth.

Core Features & Use Cases

  • Protected routes & actions: Add authentication checks to pages, server actions, and API endpoints to ensure only authenticated users can perform sensitive operations.
  • Role-based access control (RBAC): Implement a 5-tier RBAC system (OWNER, ADMIN, EDITOR, COMMENTER, VIEWER) to control what users can read or modify.
  • Login/Logout flows & session management: Patterns for login state handling, redirects after login, and secure session storage (HTTP-only cookies).

Quick Start

Say: "Protect the dashboard" or "Add authentication to the admin area". Start by wiring an auth check on the route or layout, then implement a minimal login flow and a requireRole helper to gate admin routes. Finally, redirect non-authenticated users to /login and non-admins to /unauthorized.

Dependency Matrix

Required Modules

@supabase/supabase-jsprismazod

Components

assetsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: worldcrafter-auth-guard
Download link: https://github.com/hopeoverture/worldcrafter-v2/archive/main.zip#worldcrafter-auth-guard

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.