What problem does it solve? TanStack Start developers need a reliable way to run server-only logic (database queries, secrets, file access) without leaking it into isomorphic loaders or misusing patterns from Next.js and Remix. This Skill provides the correct createServerFn patterns, including auth enforcement, validation, and caching rules. ## Core Features & Use Cases - Server Function Creation: Build GET/POST RPC endpoints with createServerFn, call them from loaders, components, or the useServerFn hook. - Validation & Error Handling: Validate inputs with Zod or plain functions, handle FormData, and throw errors, redirects, or notFound responses. - Security Guardrails: Enforce auth inside handlers via middleware, avoid public caching of authenticated responses, and organize code with .functions.ts and .server.ts files. - Use Case: When building a dashboard that loads user orders, wrap the database query in createServerFn with authMiddleware so the endpoint is protected even if called directly outside the route. ## Quick Start Create a TanStack Start server function that fetches a user by ID with Zod validation and proper auth middleware.