---
title: "Middleware - Air Market"
description: "Auth checks, logging and the like tend to get copy-pasted into every handler. Middleware lets you write that once and put it in front of requests or server functions instead. This covers building tho…"
canonical: "https://airmarket.ai/app/middleware"
---

[Air Market](/) / [Developer Tools](/category/devtools) / Middleware

Skill by [TanStack](/@tanstack)

# Middleware

Run the same checks in front of every request without repeating yourself

## What this does

Auth checks, logging and the like tend to get copy-pasted into every handler. Middleware lets you write that once and put it in front of requests or server functions instead. This covers building those wrappers, passing values along the chain, sending some of that context down to the client, and registering middleware globally.

### Top 3 things it does for you

- Wrap requests and server functions with shared logic
- Pass values down from one middleware to the next
- Hand context from the server to the client

## Information

**Middleware at a glance**

|  |  |
| --- | --- |
| Kind | Skill |
| Publisher | [TanStack](/@tanstack) |
| Category | [Developer Tools](/category/devtools) |
| Works with | Agent Skills - an open standard supported by 40+ agents |
| Size | 13 KB |
| Licence | MIT |
| Repository | [TanStack/router](https://github.com/TanStack/router/tree/179d9b9b5eec50dc7833b4e2ef91b735d34bbc07/packages/start-client-core/skills/start-core/middleware) |
| GitHub stars | 14,984 (as of Nov 2026) |

## Security report

**Verified.** AIR scanned this exact version of Middleware and flagged nothing. AIR's verdict: **safe**.

**What Middleware's check was run against**

|  |  |
| --- | --- |
| Commit | 179d9b9b5eec50dc7833b4e2ef91b735d34bbc07 |
| Content hash | b8c297f76b1b225ff99df2c7d3440d7798bc5bcaec4435c8d75d3109c2092f4d |
| Files read | [Browse the files at this exact commit](https://github.com/TanStack/router/blob/179d9b9b5eec50dc7833b4e2ef91b735d34bbc07/packages/start-client-core/skills/start-core/middleware/SKILL.md) |

A scan is named by the exact content it read, not by a version number. A different version is a different artifact, and nothing here applies to a version AIR has not scanned.

[Read the full security report for Middleware](/security/middleware)

## About Middleware

createMiddleware, covering request middleware, which is server-only, and server function middleware, which spans client and server.

Covers passing context along with next({ context }) and sendContext for transferring context from server to client, plus global middleware registered via createStart in src/start.ts.

Also covers middleware factories, method order enforcement, and fetch override precedence.

## What's inside

- SKILL.md - instructions

## Questions

### Is Middleware safe to install?

AIR scanned this exact version of Middleware and flagged nothing. AIR's verdict: safe. The verdict is named by the content that was read, at commit 179d9b9b5eec, so it cannot drift onto a version nobody scanned. The full report is at https://airmarket.ai/security/middleware.

### How do I install Middleware?

Open https://airmarket.ai/app/middleware on Air Market and use the install action: Air Market hands Claude a prompt naming this exact skill, and Claude sets it up. Source, pinned to the exact commit this listing describes: https://github.com/TanStack/router/tree/179d9b9b5eec50dc7833b4e2ef91b735d34bbc07/packages/start-client-core/skills/start-core/middleware. Install from that link, not the branch.

## Related on Air Market

- [More Developer Tools listings](/category/devtools)
- [Everything by TanStack](/@tanstack)

---

Canonical URL: <https://airmarket.ai/app/middleware>
