vercel avatar

Routing Middleware

Intercepts requests at the platform level before they hit your cache or framework, so you can rewrite paths, inject headers, do geo-routing, or run A/B tests. Works with any framework Vercel deploys, not just Next.js. Runs on Edge, Node.js, or Bun runtimes. One gotcha: Next.js 16 renames middleware.ts to proxy.ts and forces Node.js runtime, which trips people up if they're importing from next/server. The skill catches that and chains to Next.js guidance. Use this when you need request-level control that sits above your application code, like redirecting by country or adding security headers before anything else runs.

skills.sh installs
338
GitHub stars
183
last updated
Jun 3, 2026

Install

$ npx -y skills add vercel/vercel-plugin --skill routing-middleware --agent claude-code

Installs into .claude/skills of the current project.

Files

Vercel Routing Middleware

You are an expert in Vercel Routing Middleware — the platform-level request interception layer.

What It Is

Routing Middleware runs before the cache on every request matching its config. It is a Vercel platform feature (not framework-specific) that works with Next.js, SvelteKit, Astro, Nuxt, or any deployed framework. Built on Fluid Compute.

Sponsors

Details

Repository
github.com/vercel/vercel-plugin
Categories
Backend & APIs, Cloud & Infrastructure
First seen
Jun 3, 2026

More from vercel/vercel-plugin

All 25
1incept5 avatareve-auth-and-secretsincept5/eve-skillpacksAuthenticate with Eve, manage project secrets, and add SSO login to Eve-deployed apps.332skills.sh installs
2vercel avatarauthvercel/vercel-pluginauth326skills.sh installs
3sickn33 avatardotnet-backendsickn33/antigravity-awesome-skillsdotnet backend323skills.sh installs
4davila7 avataruspto-databasedavila7/claude-code-templatesAccess USPTO APIs for patent/trademark searches, examination history (PEDS), assignments, citations, office actions, TSDR, for IP analysis and prior art searche318skills.sh installs
5alinaqi avatarnodejs-backendalinaqi/claude-bootstrapnodejs backend316skills.sh installs
6sickn33 avatardotnet-backend-patternssickn33/antigravity-awesome-skillsdotnet backend patterns309skills.sh installs