What problem does it solve? Next.js App Router route handlers often accumulate ad-hoc authentication, authorization, validation, and error-handling code that is inconsistent, untyped, and hard to audit. This Skill standardizes every API route around a declarative defineRoute({ guards: [...], handler }) pattern with a progressively typed context and a single response envelope. ## Core Features & Use Cases - Declarative guard pipeline: Compose authentication, RBAC roles, permissions, ownership, rate limiting, idempotency, CORS/CSRF, timeouts, and Zod validation as an ordered array, with ctx.principal and ctx.body inferred automatically. - Pluggable adapters: Wire Supabase auth, Upstash Redis rate limiting and idempotency, and structured logging once via configureGuards(...), with Edge-safe defaults and custom adapter support. - Consistent error envelope: Every response carries ok, a stable machine code, and an X-Request-Id correlation id, with typed ApiError classes and always-on audit logging. - Use Case: When adding a PATCH endpoint that only managers can call, declare rateLimit, auth, roles("admin", "manager"), and validate({ body }) guards and keep the handler thin, instead of hand-writing session checks and error JSON. ## Quick Start Ask the AI to protect a Next.js route handler using the MIS guard pipeline, for example by adding auth, role checks, rate limiting, and Zod body validation to an existing route.ts file.