# inngest-middleware

> Claude/Codex skill by [@inngest](https://omgskills.com/library/inngest/index.md) · 29 stars · Updated 2026-09-28

Use when adding cross-cutting concerns to durable functions — structured logging or tracing across all functions, error tracking with Sentry, payload encryption for sensitive data, dependency injection of clients (DB, Stripe, etc.) into function handlers, custom telemetry, or behavior that should apply uniformly across many functions. Covers Inngest middleware lifecycle, creating custom middleware, dependencyInjectionMiddleware, @inngest/middleware-encryption, @inngest/middleware-sentry, and custom middleware patterns.

Tags: agent-skill-repository, agent-skills, agentic-skills, ai-agents, claude-code-skills, cursor-skills, openclaw-skills

## Install

```sh
git clone https://github.com/inngest/inngest-skills /tmp/inngest-skills && ln -s /tmp/inngest-skills/skills/inngest-middleware ~/.claude/skills/inngest-middleware
```

## From README

Inngest Middleware Master Inngest middleware to handle cross-cutting concerns like logging, error tracking, dependency injection, and data transformation. Middleware runs at key points in the function lifecycle, enabling powerful patterns for observability and shared functionality. These skills are focused on TypeScript. For Python or Go, refer to the Inngest documentation for language-specific guidance. Core concepts apply across all languages. Note: The middleware system was significantly rewritten in v4. The lifecycle hooks documented here reflect the v4 API. If migrating from v3, consult the migration guide for details on breaking changes. ⚠ For Realtime use the inngest-realtime skill, NOT this one. Inngest v3 used realtimeMiddleware() from @inngest/realtime to inject a publish arg into function handlers. v4 ships realtime natively — step.realtime.publish is built-in, no middleware required.

## Links

- HTML page: https://omgskills.com/library/inngest/inngest-skills/skills/inngest-middleware/
- GitHub: https://github.com/inngest/inngest-skills
- Author: [@inngest](https://omgskills.com/library/inngest/index.md)

## More from this repo

- [inngest-durable-functions](https://omgskills.com/library/inngest/inngest-skills/skills/inngest-durable-functions/index.md) — Used when building functions that must survive process crashes, retry automatically on failure, run on a schedule,...
   - [@inngest](https://omgskills.com/library/inngest/index.md) · 29 stars
- [inngest-events](https://omgskills.com/library/inngest/inngest-skills/skills/inngest-events/index.md) — Used when designing event-driven workflows, decoupling services, implementing fan-out patterns (one trigger, many...
   - [@inngest](https://omgskills.com/library/inngest/index.md) · 29 stars
- [inngest-flow-control](https://omgskills.com/library/inngest/inngest-skills/skills/inngest-flow-control/index.md) — Used when handling external API rate limits (e.g., OpenAI 429s, HubSpot or Stripe rate limits), preventing duplicate...
   - [@inngest](https://omgskills.com/library/inngest/index.md) · 29 stars
