What problem does it solve? Adding cross-cutting concerns like logging, error tracking, encryption, and shared service clients to every Inngest function individually leads to duplicated code and inconsistent behavior. This Skill shows how to centralize those concerns using Inngest's v4 middleware lifecycle hooks. ## Core Features & Use Cases - Custom Middleware Creation: Build middleware with InngestMiddleware using lifecycle hooks like onFunctionRun, beforeExecution, transformInput, and transformOutput. - Dependency Injection: Share clients like OpenAI, Prisma, Stripe, or Redis across all functions using the built-in dependencyInjectionMiddleware or custom patterns, including lazy, scoped, and conditional injection. - Official Middleware Packages: Integrate @inngest/middleware-encryption for payload encryption with key rotation and @inngest/middleware-sentry for error tracking and tracing. - Use Case: You need Sentry error capture, structured logging, and a shared database client across 30 durable functions. Register three middleware at the client level once instead of modifying every function handler. ## Quick Start Add Sentry error tracking and a shared Prisma client to all my Inngest functions using middleware.