skillmake
← marketplace
engineerslibrarysha:4ba15907f46aaf19manual

inngest-workflows

Use when building durable, event-driven background jobs, crons, and saga/fan-out workflows with Inngest's step functions and automatic retries.

Install confidence
curl --create-dirs -fsSL https://skillmake.xyz/i/inngest-workflows -o ~/.claude/skills/inngest-workflows/SKILL.md
Pinned content
sha:4ba15907f46aaf19
Generated with
manual
Source
github.com

The file served at /api/marketplace/inngest-workflows-4ba15907/raw matches this hash. Inspect before install, then copy the command.

4,474 chars · ~1,119 tokens
---
name: inngest-workflows
description: "Use when building durable, event-driven background jobs, crons, and saga/fan-out workflows with Inngest's step functions and automatic retries."
source: https://github.com/inngest/inngest-js/blob/main/CLAUDE.md
generated: 2026-05-17T04:18:25.198Z
category: library
audience: engineers
---

## When to use

- Writing an Inngest function that survives crashes via step-based durable execution
- Triggering a workflow from an event like app/user.signup
- Scheduling a cron-based job that runs on a schedule
- Fan-out: dispatching many child events or invocations from one parent function
- Implementing a saga that waits for follow-up events with step.waitForEvent
- Plugging Inngest into Next.js, Express, or SvelteKit via a framework adapter

## Key concepts

### Durable execution

Inngest persists the result of each completed step, so when a function is retried after a crash or timeout, prior steps replay from memoized state instead of running again. This turns ordinary async code into a fault-tolerant workflow.

### Event-driven trigger

Functions declare triggers (events or crons) instead of being called directly. Sending an event with inngest.send fans the event out to every function whose trigger matches, decoupling producers from consumers.

### Step functions

Inside a function handler, step.run wraps a unit of work so it is retried independently with its own backoff. step.sleep, step.sleepUntil, step.waitForEvent, and step.invoke compose long-running flows without holding a process open.

### Automatic retries

Any throw inside a step triggers Inngest's retry policy with exponential backoff. Because steps are memoized, only the failing step re-runs, not the whole function.

### Framework adapters

The SDK ships adapters for 15+ frameworks (Next.js, Express, SvelteKit, etc.) that expose a single /api/inngest endpoint Inngest calls to invoke registered functions.

### Middleware plugin architecture

An extensible middleware system lets teams inject logging, auth, tracing, or custom serialization around every function and step without forking the SDK.

## API reference

```
inngest.createFunction({id, triggers}, async ({event, step}) => {...})
```

Defines a durable function bound to one or more event/cron triggers; the handler receives the triggering event and a step API.

```
export default inngest.createFunction(
  {
    id: "user-onboarding-communication",
    triggers: [{ event: "app/user.signup" }],
  },
  async ({ event, step }) => {
    await step.run("Send welcome email", async () => {
      await sendEmail({
        email: event.data.email,
        template: "welcome",
      });
    });
  }
);
```

```
inngest.send(eventName, {data})
```

Publishes an event into Inngest; every function whose trigger matches will be invoked durably.

```
inngest.send("app/user.signup", {
  data: { email: "text@example.com", user_id: "12345" },
});
```

```
step.run(name, async () => {...})
```

Wraps a unit of work in a memoized, independently retried step; the return value is persisted and replayed on re-invocation.

```
const user = await step.run("load-user", async () => {
  return await db.users.findById(event.data.user_id);
});
```

```
triggers: [{ cron: "0 * * * *" }]
```

Schedules a function to run on a cron expression instead of an event.

```
inngest.createFunction(
  { id: "hourly-rollup", triggers: [{ cron: "0 * * * *" }] },
  async ({ step }) => { await step.run("rollup", rollup); }
);
```

## Gotchas

- Do not call non-deterministic code (Date.now, Math.random, fetch) outside step.run; on retry the function replays and divergent values break memoization.
- Each step.run name must be stable and unique within a function; reusing names or building names from random values corrupts replay.
- step.sleep persists; if you sleep for 7 days the function stays addressable that long and event keys must keep working.
- Throwing outside step.run aborts the whole function without retry granularity; wrap risky work in steps to get per-step retries.
- The /api/inngest endpoint must be reachable from Inngest's control plane; local dev requires the Inngest dev server or a tunnel.
- Large step return values are persisted on every run; avoid returning huge blobs from step.run, store a reference instead.

---
Generated by SkillMake from https://github.com/inngest/inngest-js/blob/main/CLAUDE.md on 2026-05-17T04:18:25.198Z.
Verify against source before relying on details.

File: ~/.claude/skills/inngest-workflows/SKILL.md