inngest-middleware

Implement middleware lifecycle hooks for Inngest durable functions.

2|Updated May 28, 2026
One-click install
npx skills add https://github.com/inngest/inngest-codex-plugin --skill inngest-middleware-inngest
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: inngest-middleware
Source: https://github.com/inngest/inngest-codex-plugin/tree/main/plugins/inngest/skills/inngest-middleware
Command: npx skills add https://github.com/inngest/inngest-codex-plugin --skill inngest-middleware-inngest

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexity of managing cross-cutting concerns like observability, error tracking, and dependency injection across distributed, durable functions, ensuring consistent behavior without code duplication.

Core Features & Use Cases

  • Lifecycle Hooks: Execute custom logic at specific points in the function execution or event-sending lifecycle.
  • Dependency Injection: Share stateful clients like database connections or AI service instances across all functions.
  • Observability & Safety: Integrate Sentry for error tracking, encrypt sensitive payload data, and implement custom metrics or circuit breakers.

Quick Start

Ask the AI to configure a new middleware for your Inngest client that injects your database client and adds Sentry error tracking to all functions.

Frequently Asked Questions about inngest-middleware

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I share database connections across Inngest durable functions?

Share stateful clients like database connections across Inngest durable functions by implementing dependency injection through a standardized middleware lifecycle, ensuring consistent behavior without code duplication.

How do I add Sentry error tracking to TypeScript durable functions?

Add Sentry error tracking to TypeScript durable functions by integrating the optional @inngest/middleware-sentry package, which executes custom observability logic at specific points in the function execution lifecycle.

What is the best way to standardize observability in distributed event-driven workflows?

Standardize observability in distributed event-driven workflows by using middleware lifecycle hooks to execute custom tracking logic, ensuring consistent metrics and error reporting across all functions without code duplication.

Can I encrypt sensitive payload data in Inngest event-sending workflows?

Encrypt sensitive payload data in Inngest event-sending workflows by integrating the optional @inngest/middleware-encryption package into your client's middleware configuration.

Do I need the Inngest v4 TypeScript SDK to use middleware for durable functions?

Yes, implementing cross-cutting concerns like dependency injection and data encryption through the middleware lifecycle requires integration with the Inngest v4 TypeScript SDK.

When should I use middleware to manage cross-cutting concerns in durable functions?

Use middleware to manage cross-cutting concerns in durable functions when you need to consistently apply logic like observability, error tracking, or circuit breakers across distributed event-driven workflows without duplicating code.