routing-middleware

Intercept incoming requests for Vercel routing middleware rewrites and redirects.

1|Updated Apr 19, 2026
One-click install
npx skills add https://github.com/arthtyagi/onloop --skill routing-middleware-arthtyagi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: routing-middleware
Source: https://github.com/arthtyagi/onloop/tree/main/.agents/skills/routing-middleware
Command: npx skills add https://github.com/arthtyagi/onloop --skill routing-middleware-arthtyagi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you intercept incoming requests at the platform layer so you can apply rewrites, redirects, personalization, and header changes before cache or application logic runs.

Core Features & Use Cases

  • Request Interception: Decide how matching requests should be handled before they reach the app.
  • Routing Actions: Apply rewrites, redirects, geolocation-aware branching, and custom headers with Vercel routing primitives.
  • Use Cases: Use it for geo-based landing pages, A/B testing, lightweight access checks, and operational routing updates without redeploying the app.

Quick Start

Use the routing-middleware skill to choose the correct Vercel request interception approach for a project that needs rewrites, redirects, or header-based routing.

Frequently Asked Questions about routing-middleware

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I intercept requests on Vercel before they reach my application logic?

Vercel middleware lets you intercept requests at the platform layer to apply rewrites, redirects, and header changes before cache or application handlers run. This skill guides you through the correct request interception approach for your project.

Can I use Vercel edge middleware for geolocation-based redirects and A/B testing?

Yes, Vercel edge middleware supports geolocation-aware branching and A/B testing. You can route users to different landing pages or split traffic for experiments before the request hits your application logic.

What's the best way to configure rewrites and header injection without redeploying my app?

Configuring Vercel routing middleware allows you to apply rewrites, redirects, and custom header injection at the platform layer. This enables operational routing updates without requiring a full application redeployment.

Do I need specific runtime selection and matcher scoping for Vercel routing middleware?

Yes, correct Vercel routing middleware requires proper matcher scoping and runtime selection. You must configure routing correctly for Edge, Node.js, or Bun execution environments to ensure intercepts function properly.

Why are my Vercel middleware rewrites not applying to cached requests?

Vercel middleware intercepts incoming requests before cache or application handlers run, but incorrect matcher scoping can bypass your rewrites. Ensure your routing configuration targets the correct paths and runtime environment.

Does Vercel middleware work with Node.js and Bun runtimes, or only Edge?

Vercel routing middleware supports Edge, Node.js, and Bun execution environments. You must select the correct runtime and configure routing appropriately for your chosen execution environment to handle intercepts properly.