Protect routes with Next.js middleware. Check authentication once, protect routes declaratively. Supports public routes, protected routes, and role-based access.
Install
npx skills add dadbodgeoff/drift --skill middleware-protectionnpx skills add dadbodgeoff/drift --skill middleware-protection -a claude-code -gnpx skills add dadbodgeoff/drift --skill middleware-protection -a codex -ggemini skills install https://github.com/dadbodgeoff/drift.git --path skills/middleware-protectiongh skill install dadbodgeoff/drift middleware-protectiongit clone --depth 1 https://github.com/dadbodgeoff/drift /tmp/dadbodgeoff__drift
mkdir -p ~/.claude/skills ~/.agents/skills
cp -R /tmp/dadbodgeoff__drift/skills/middleware-protection ~/.claude/skills/middleware-protection # Claude Code
cp -R /tmp/dadbodgeoff__drift/skills/middleware-protection ~/.agents/skills/middleware-protection # Codex, Cursor, Gemini CLI, Copilot, OpenCode