middleware-protection

Community

Secure routes with declarative middleware.

Authordadbodgeoff
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill streamlines route protection by centralizing authentication and authorization logic, preventing repetitive code across your application.

Core Features & Use Cases

  • Declarative Route Protection: Define which routes are public or protected.
  • Centralized Authentication: Check user authentication status once for all requests.
  • Role-Based Access Control: Implement granular access based on user roles.
  • Consistent Error Handling: Provides appropriate responses (JSON for APIs, redirects for pages).
  • Use Case: Protect your /dashboard and /api/user routes, ensuring only authenticated users can access them, while allowing public access to / and /login.

Quick Start

Use the middleware-protection skill to protect the '/dashboard' route by ensuring a user is authenticated.

Dependency Matrix

Required Modules

None required

Components

scripts

💻 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: middleware-protection
Download link: https://github.com/dadbodgeoff/drift/archive/main.zip#middleware-protection

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.