SKILL

start-middleware

Use when composing cross-cutting server logic in TanStack Start with createMiddleware — chaining, context, auth factories.

Target: Target not categorized. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original English text

Topics in the source

  • TanStack Start Middleware
  • Agent Workflow (MANDATORY)
  • Critical Rules (read first)
  • Overview
  • Architecture
  • Reference Guide
  • Concepts
  • Templates

Covers composing cross-cutting server logic in TanStack Start with createMiddleware: request middleware vs server-function middleware, chaining via .middleware([...]), sharing context with next({ context }), passing client-to-server context with sendContext, client-side middleware (.client()), global middleware declared via createStart in src/start.ts, parameterized authorization factories, and staticFunctionMiddleware ordering. Targets @tanstack/react-start v1.169.5. Critical rules enforced: the method chain order is fixed (.middleware() → .validator() → .client() → .server()); shape-validated sendContext data is NOT authorization — always re-check access against the server-trusted session before using a client-sent value as a query key, filter, or path param; client context is never sent to the server unless explicitly opted in, and the client can lie about anything it sends; .client() runs on the server during SSR, so browser-only APIs need a typeof window guard; and staticFunctionMiddleware must always be last in the chain. Includes templates for an auth + permission-based authorization factory and for client-side middleware (headers, custom fetch, telemetry). Do NOT use this s

This is an excerpt. Refer to the complete source and its current requirements.

Source repository
Fusengine/claude-plugins
Source file
plugins/tanstack-start-expert/skills/start-middleware/SKILL.md
Fixed revision
b9f82810cf3b5e3c4350332ac3ef618d60163cc0
Read the complete original documentation ↗

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: Fusengine/claude-plugins · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-11T11:01:45.987Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.