Templates and conventions for adding Inngest event-driven background jobs, cron tasks, and durable workflows to a Next.js App Router project. Scaffolds client, route handler, typed events, and functions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pproenca-dot-skills-1:inngest-nextjs-patternsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Templates and conventions for building event-driven, durable background work on Inngest from a Next.js App Router project. The skill enforces the conventions Inngest's own docs use (decentralized `eventType()` schemas, kebab-case stable function IDs, idempotent steps) so that retries, replays, and concurrency controls actually do what they advertise.
Templates and conventions for building event-driven, durable background work on Inngest from a Next.js App Router project. The skill enforces the conventions Inngest's own docs use (decentralized eventType() schemas, kebab-case stable function IDs, idempotent steps) so that retries, replays, and concurrency controls actually do what they advertise.
Read this skill when you are:
setTimeout / a queue library / a cron service to Inngest's durable execution modelreferences/conventions.md before writing anything. The conventions explain why event names take a specific shape, why function IDs must be stable, and why every step.run must be idempotent — once you understand the reasoning, the templates make sense.src/inngest/functions/index.ts (the registry the route handler reads). The conventions doc shows the registry pattern.| Template | Output Path | Use When |
|---|---|---|
client.ts.template | src/inngest/client.ts | One-time setup: create the singleton Inngest client. Generate once per app. |
route-handler.ts.template | src/app/api/inngest/route.ts | One-time setup: the App Router endpoint Inngest hits to invoke your functions. Generate once per app. |
event.ts.template | src/inngest/events/{domain}.ts | Defining a new typed event (with Zod schema) that producers send and functions consume. |
function.ts.template | src/inngest/functions/{name}.ts | Standard event-triggered durable function with steps. Parameterized retries, concurrency, throttle, debounce, cancelOn, onFailure. |
function-cron.ts.template | src/inngest/functions/{name}.ts | Scheduled function — runs on a cron expression (with timezone). Optionally also accepts a manual event trigger for ad-hoc invocation. |
function-fan-out.ts.template | src/inngest/functions/{name}.ts | Orchestrator that receives one event and fans out work — via step.sendEvent (fire-and-forget) or Promise.all(step.invoke(...)) (wait for results). |
domain/entity.verb_past — e.g., app/user.created, shop/order.placed, billing/invoice.paid. The conventions doc has the full rule.id: stable kebab-case, never rename it after deploy — Inngest uses it as the durable state key.id: descriptive kebab-case, also durable; changing one re-runs that step on replay.step.run must be safely retryable. If it calls a third-party API that mutates state, pass an idempotency key.npx inngest-cli@latest dev, then UI at http://localhost:8288. Set INNGEST_DEV=1 in .env.local to point the SDK at it.Templates assume a src/ directory with App Router:
src/
├── app/api/inngest/route.ts # generated by route-handler template
└── inngest/
├── client.ts # generated by client template
├── events/ # one file per domain (events.shop.ts, events.user.ts)
│ └── {domain}.ts # generated by event template
└── functions/
├── index.ts # registry: re-exports all functions as an array
└── {name}.ts # generated by function/cron/fan-out templates
If your project uses a different layout (no src/, or Pages Router), override the output paths in config.json. The conventions doc explains the trade-offs.
config.json controls path overrides. On first use, check whether its fields are filled in — if not, ask the user before generating (project root differs from the default assumption).
vercel:ai-sdk — if your Inngest functions invoke LLMs, the AI SDK gives you streaming + provider abstraction; pair them with step.run for retry safety.vercel:vercel-functions — Inngest's serve() adapter for Next.js runs as a Vercel Serverless Function by default; the AI SDK skill has notes on Fluid Compute and timeout extension for long agent runs.npx claudepluginhub pproenca/dot-skillsBuilds and manages Inngest serverless background jobs, event-driven workflows, and durable execution patterns without managing queues or workers.
Builds serverless background jobs, event-driven workflows, and durable execution with Inngest. Useful for batch processing, scheduled functions, and fan-out patterns without managing queues or workers.