auth_coverage
Detects missing authentication guards in Next.js App Router routes by analyzing route files and middleware, reporting which routes are protected or unprotected.
Instructions
Analyze authentication coverage across Next.js App Router routes. Detects auth guards (Clerk, NextAuth, Supabase, custom) and reports protected vs unprotected routes. Pass files array with route file contents and middleware content. Example: auth_coverage({files: [{path: 'app/api/users/route.ts', content: '...'}], middleware: '...'})
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Project directory path. When provided, auto-discovers all route, page, layout, and middleware files — no need to pass file contents manually. | |
| files | No | Route and page files from app/ directory (ignored when path is provided) | |
| middleware | No | Content of middleware.ts file (ignored when path is provided) | |
| format | No | Output format | markdown |