Official agent skill

Routing Middleware

by vercel in vercel/vercel-plugin

Vercel Routing Middleware guidance — request interception before cache, rewrites, redirects, personalization.

OfficialCustom licenceAuto-check passed

Install Routing Middleware

skills CLI
$ npx skills add vercel/vercel-plugin --skill routing-middleware -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vercel/vercel-plugin routing-middleware --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vercel/vercel-plugin.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/routing-middleware .claude/skills/routing-middleware && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
routing-middleware
GitHub stars
301
Token cost
~2.8k tokens
SKILL.md length
851 words
Files
2
Skills in repo
38
Repo updated
First seen
Licence
Custom licence

At a glance

Vercel Routing Middleware guidance — request interception before cache, rewrites, redirects, personalization.

  • Intercepting requests at the platform level
  • SKILL.md covers What It Is, CRITICAL: Middleware…, Bun Runtime and Basic Example, plus 9 more sections
  • Calls vercel and npx; reaches openapi.vercel.sh

What it does

Routing Middleware is an agent skill from vercel/vercel-plugin, published by the product's own GitHub organization. Vercel Routing Middleware guidance — request interception before cache, rewrites, redirects, personalization. Works with any framework. Supports Edge, Node.js, and Bun runtimes. Use when intercepting requests at the platform level.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.

It works with Vercel, Node.js and Next.js. The repository describes itself as: Comprehensive Vercel ecosystem plugin — relational knowledge graph, skills for every major product, specialized agents, and Vercel conventions. Turns any AI agent into a Vercel…

When your agent uses it

  • Intercepting requests at the platform level

Example prompts

  • “/routing-middleware”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit 82fa491. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • vercel
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • openapi.vercel.sh

    Also links to:

    • vercel.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Routing Middleware loads about 2.8k tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 851 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 851 words (~2,804 tokens).

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

— opening of SKILL.md by vercel, Custom licence
name
routing-middleware
metadata.priority
6
metadata.docs
https://nextjs.org/docs/app/api-reference/file-conventions/proxy, https://vercel.com/docs/routing-middleware
metadata.sitemap
https://nextjs.org/sitemap.xml
metadata.pathPatterns
middleware.ts, middleware.js, middleware.mts, middleware.mjs, proxy.ts, proxy.js, proxy.mts, proxy.mjs, src/middleware.ts, src/middleware.js…
metadata.bashPatterns
\bnpx\s+@vercel/config\b
retrieval.aliases
request interceptor, middleware, rewrite rules, redirect rules
retrieval.intents
intercept requests, add middleware, configure rewrites, set up redirects
retrieval.entities
middleware, rewrite, redirect, personalization, Edge

Read the full SKILL.md on GitHub

Files

SKILL.md and 1 other file in skills/routing-middleware of vercel/vercel-plugin.

  • SKILL.md
  • .vercel.approvers

Open the folder on GitHubat commit 82fa491

Compare with similar skills

Routing Middleware next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Routing Middleware compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Routing Middleware this skillvercel/vercel-plugin301—~2.8kAutomated safety check: PassCustom licence
Cicd Pipeline Generatorailabs-393/ai-labs-claude-skills454—~2.7kAutomated safety check: PassMIT
Bun Nextjssecondsky/claude-skills227—~1.9kAutomated safety check: NotesMIT
Vercel Optimize Auditvercel-labs/agent-skills32k8 repos~4.3kAutomated safety check: PassNone
AI SDKvercel-labs/ai-facts16821 repos~1.2kAutomated safety check: PassNone
Wcag Audit PatternsvmDeshpande/ai-agent-automation17810 repos~610Automated safety check: PassApache-2.0

Similar skills

  • Cicd Pipeline Generator

    ailabs-393/ai-labs-claude-skills

    This skill should be used when creating or configuring CI/CD pipeline files for automated testing, building, and deployment.

    454 GitHub stars~2.7k tokensUpdated 11 mo ago
    DevOps & CloudAuto-check passed
  • Bun Nextjs

    secondsky/claude-skills

    This skill should be used when the user asks about "Next.js with Bun", "Bun and Next", "running Next.js on Bun", "Next.js development with Bun", "create-next-app with Bun", or building Next.js…

    227 GitHub stars~1.9k tokensUpdated 9 days ago
    DevOps & CloudAuto-check: notes
  • Vercel Optimize Audit

    vercel-labs/agent-skills

    Official

    Runs a metrics-first audit of a deployed Vercel project, gating investigations on real signals to produce ranked, citation-backed cost and performance recommendations.

    32k GitHub starsUsed in 8 repos~4.3k tokens
    DevOps & CloudAuto-check passed
  • AI SDK

    vercel-labs/ai-facts

    Official

    Answer questions about the AI SDK and help build AI-powered features.

    168 GitHub starsUsed in 21 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Wcag Audit Patterns

    vmDeshpande/ai-agent-automation

    Conduct WCAG 2.2 accessibility audits with automated testing, manual verification, and remediation guidance.

    178 GitHub starsUsed in 10 repos~610 tokens
    Frontend & DesignAuto-check passed
  • Official

    React and Next.js performance optimization guidelines from Vercel Engineering.

    6.4k GitHub starsUsed in 130 repos~1.6k tokens
    Frontend & DesignAuto-check passed

More from vercel/vercel-plugin

All 38 skills in this repo
  • Deployments Cicd

    vercel/vercel-plugin

    Official

    Vercel deployment and CI/CD expert guidance. An agent skill from vercel/vercel-plugin.

    301 GitHub starsUsed in 1 repo~3k tokens
    Auto-check passed
  • Plugin Audit

    vercel/vercel-plugin

    Official

    Audit vercel-plugin performance on real-world projects. An agent skill from vercel/vercel-plugin.

    301 GitHub stars~739 tokensUpdated today
    Auto-check passed
  • Vercel CLI

    vercel/vercel-plugin

    Official

    Vercel CLI expert guidance. An agent skill from vercel/vercel-plugin.

    301 GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • AI Gateway

    vercel/vercel-plugin

    Official

    Vercel AI Gateway guidance for setup, model discovery, authentication, routing, fallbacks, virtual models, evaluation models, BYOK, budgets, spend reporting, observability, compatible APIs, and…

    301 GitHub stars~4.4k tokensUpdated today
    Auto-check: notes
  • Vercel Services

    vercel/vercel-plugin

    Official

    Configure and troubleshoot Vercel Services for multiple frontends and backends in one project.

    301 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Official

    Access and test Vercel deployments protected by Vercel Authentication, SSO, or Deployment Protection.

    301 GitHub stars~1.9k tokensUpdated today
    Auto-check: notes

Questions about Routing Middleware

What does Routing Middleware do?

Vercel Routing Middleware guidance — request interception before cache, rewrites, redirects, personalization. Routing Middleware is an agent skill from vercel/vercel-plugin, published by the product's own GitHub organization. Vercel Routing Middleware guidance — request interception before cache, rewrites, redirects, personalization.

When should I use Routing Middleware?

Routing Middleware fits situations like: intercepting requests at the platform level.

How do I install Routing Middleware in Claude Code?

Run `npx skills add vercel/vercel-plugin --skill routing-middleware -a claude-code`. Or copy the skill folder (skills/routing-middleware in vercel/vercel-plugin) into .claude/skills/routing-middleware in your project. Claude Code loads it when a task matches its description.

How do I install Routing Middleware in Codex?

Run `npx skills add vercel/vercel-plugin --skill routing-middleware -a codex`. Or copy the skill folder (skills/routing-middleware in vercel/vercel-plugin) into .agents/skills/routing-middleware in your project. Codex loads it when a task matches its description.

Can I use Routing Middleware in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vercel/vercel-plugin --skill routing-middleware -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/routing-middleware, .gemini/skills/routing-middleware, .github/skills/routing-middleware and .opencode/skills/routing-middleware in your project.

What does Routing Middleware need to run?

Going by SKILL.md and its folder, Routing Middleware needs the command-line tools its instructions call (vercel and npx). Our summary lists: Node.js.

Does Routing Middleware access the network?

SKILL.md names 2 domains. In commands or code: openapi.vercel.sh; the agent is likely to contact it when it follows the instructions. As links in the text: vercel.com. This is read from the text; nothing was executed.

Is Routing Middleware safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Routing Middleware use?

Routing Middleware has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Routing Middleware use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Routing Middleware?

Skills that share tags, products or a category with Routing Middleware: Cicd Pipeline Generator (ailabs-393/ai-labs-claude-skills, 454 stars), Bun Nextjs (secondsky/claude-skills, 227 stars), Vercel Optimize Audit (vercel-labs/agent-skills, 32k stars) and AI SDK (vercel-labs/ai-facts, 168 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Routing Middleware?

vercel (a GitHub organization, an official publisher) maintains it in vercel/vercel-plugin, which has 301 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on October 6, 2026.

Source: vercel/vercel-plugin on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.