middleware-protection
CommunitySecure routes with declarative middleware.
Software Engineering#authorization#authentication#middleware#next.js#route protection#role-based access
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
/dashboardand/api/userroutes, 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 requiredComponents
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.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.