Communityコーディング&開発github.com

inngest/inngest-middleware

耐久性関数に横断的関心事(構造化ログ、トレーシング、Sentryエラー追跡、ペイロード暗号化、依存性注入、カスタムテレメトリーなど)を追加するためのInngestミドルウェアスキル。

inngest-middleware とは?

このスキルは、Inngestの耐久性関数に横断的関心事(cross-cutting concerns)を追加するためのミドルウェアを包括的に扱います。構造化ログやトレーシング、Sentryを使ったエラー追跡、機密データのペイロード暗号化、DBやStripeなどのクライアントを関数ハンドラーに注入する依存性注入、カスタムテレメトリーなど、複数の関数に統一して適用したい振る舞いを効率的に実装できます。対応プラットフォームはInngest(Node.js/TypeScript SDK)で、公式の`@inngest/middleware-encryption`や`@inngest/middleware-sentry`パッケージ、カスタムミドルウェアパターン、`dependencyInjectionMiddleware`の作成方法まで網羅しています。SKILL.mdには、ミドルウェアライフサイクル(ビフォア、アフター、エラー時)の解説、具体的なミドルウェア実装例、実運用でのベストプラクティスが記述されており、開発者はこれを参照してコードの重複を減らし、保守性とセキュリティを向上させることができます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/inngest/inngest-skills/tree/main/skills/inngest-middleware

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

inngest-middleware は何をしますか?

耐久性関数に横断的関心事(cross-cutting concerns)を追加する際に使用します — 全ての関数にわたる構造化ログやトレーシング、Sentryを使ったエラー追跡、機密データのペイロード暗号化、DBやStripeなどのクライアントを関数ハンドラーに注入する依存性注入、カスタムテレメトリー、または多くの関数に一律に適用すべき振る舞いを扱います。Inngestミドルウェアライフサイクル、カスタムミドルウェアの作成、dependencyInjectionMiddleware、@inngest/middleware-encryption、@inngest/middleware-sentry、およびカスタムミドルウェアパターンを網羅しています。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

inngest/inngest-durable-functions

Use when building functions that must survive process crashes, retry automatically on failure, run on a schedule, react to events, or maintain state across infrastructure failures — e.g., webhook handlers that drop events, flaky cron jobs, background jobs that fail mid-execution, or workflows that need to resume where they left off. Covers Inngest function configuration, triggers (events, cron, invoke), step execution and memoization, idempotency, cancellation, error handling, retries, logging, and observability.

inngest/inngest-events

Use when designing event-driven workflows, decoupling services, implementing fan-out patterns (one trigger, many downstream handlers), implementing idempotent event handling with IDs (24-hour dedupe window), or handling at-least-once delivery from external sources like Stripe webhooks. Covers Inngest event schema, payload format, naming conventions, IDs for idempotency, the ts param, fan-out patterns, and system events like inngest/function.failed.

inngest/inngest-setup

Use when adding durable execution to a TypeScript project — building retry-safe webhook handlers, background jobs that survive crashes, scheduled tasks, or long-running workflows that outlive a single request. Covers Inngest SDK installation, client config, environment variables, serve endpoints (Next.js, Express, Hono, Fastify), connect-as-worker mode, and the local dev server.

inngest/inngest-steps

Use when implementing delays that must survive process restarts (e.g., 24-hour cart abandonment, scheduled follow-ups), waiting for human approval or external events with timeouts (review gates, webhook callbacks, async API completion), polling external services without losing state on crashes, calling other functions and awaiting their results, memoizing expensive operations so they don't re-run on retry, or running async work in parallel inside a workflow. Covers Inngest step methods: step.run, step.sleep, step.waitForEvent, step.waitForSignal, step.sendEvent, step.invoke, step.ai, plus patterns for loops and parallel execution.

関連スキル