migrating-middleware-to-proxy

Community

Migrate middleware.ts to proxy.ts in Next.js 16.

Authordjankies
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Next.js 16 renames middleware.ts to proxy.ts and the middleware export to proxy. This breaking change has security implications. The skill guides a safe migration and clarifies the new proxy-based pattern.

Core Features & Use Cases

  • Rename file to proxy.ts and export to proxy to align with Next.js 16.
  • Move authentication-focused logic out of middleware to server components/route handlers.
  • Understand what proxy.ts should be used for (headers, logging, URL rewriting) vs what it should not handle (authentication).

Quick Start

Rename middleware.ts to proxy.ts, rename exports to proxy, update configuration if needed, and relocate auth logic to server components/route handlers.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 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: migrating-middleware-to-proxy
Download link: https://github.com/djankies/claude-configs/archive/main.zip#migrating-middleware-to-proxy

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository