Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills Aโ€“Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Inngest Handler

ASecurity

Create and manage Inngest functions for reliable background jobs, workflows, and scheduled tasks.

416 stars
0 votes
0 copies
2 views
Added 2/7/2026
developmenttypescriptgoapidatabase

Works with

api

Security Analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned 2/12/2026

$npx -y skills add aiskillstore/marketplace --skill inngest-handler --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Inngest Handler?

Add the live security badge to your README โ€” it updates automatically with every re-scan.

Security grade badge for Inngest Handler
[![Security: A โ€” Skills Directory](https://www.skillsdirectory.com/api/skills/aiskillstore-inngest-handler/badge)](https://www.skillsdirectory.com/skills/aiskillstore-inngest-handler)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: inngest-handler
description: Create and manage Inngest functions for reliable background jobs, workflows, and scheduled tasks.
---

# Inngest Function Handler Skill

This skill defines the standards for building durable, multi-step workflows using Inngest.

## ๐Ÿšจ HARD RULES (Strictly Follow)

1.  **NO `setTimeout` / `setInterval`**:
    -   โŒ **Bad**: `await new Promise(r => setTimeout(r, 1000))`
    -   โœ… **Good**: `await step.sleep("wait-1s", "1s")`
    -   *Reason*: Serverless functions time out; Inngest sleeps persist for up to a year.

2.  **NO Side Effects Outside Steps**:
    -   Any database write, API call, or non-deterministic logic (random, date) **MUST** be wrapped in `step.run()`.
    -   *Reason*: Inngest functions execute multiple times (memoization). Code outside steps runs every time.

3.  **Deterministic Steps**:
    -   Steps are memoized by their ID (1st arg). IDs must be unique and stable.
    -   Do not dynamically generate step IDs unless you know what you are doing (e.g., inside loops with index).

4.  **Return Data from Steps**:
    -   If you need a value later, return it from the step.
    -   โŒ **Bad**: `let userId; await step.run(..., () => { userId = ... })`
    -   โœ… **Good**: `const userId = await step.run(..., () => { return ... })`

## Core Patterns

### 1. Multi-Step Execution
Wrap all logic in steps to ensure retriability and resumability.

```typescript
export const processOrder = inngest.createFunction(
  { id: "process-order" },
  { event: "shop/order.created" },
  async ({ event, step }) => {
    // 1. Step: Validate (Retriable)
    const user = await step.run("get-user", async () => {
      return await db.users.findById(event.data.userId);
    });

    // 2. Step: Sleep (Durable pause)
    await step.sleep("wait-for-payment", "1h");

    // 3. Step: Wait for Event (Human/System interaction)
    const payment = await step.waitForEvent("wait-payment", {
      event: "shop/payment.success",
      match: "data.orderId",
      timeout: "24h"
    });

    // 4. Step: Conditional Logic
    if (!payment) {
        await step.run("cancel-order", async () => { ... });
    }
  }
);
```

### 2. Parallelism
Run steps concurrently to speed up execution.

```typescript
const [user, subscription] = await Promise.all([
  step.run("fetch-user", () => db.users.find(...)),
  step.run("fetch-sub", () => stripe.subscriptions.retrieve(...))
]);
```

### 3. Working with Loops
Inside loops, ensure step IDs are unique.

```typescript
const items = event.data.items;
for (const item of items) {
  // Use dynamic ID to ensure uniqueness per item
  await step.run(`process-item-${item.id}`, async () => {
    await processItem(item);
    });
}
```

## Configuration & Flow Control

### Rate Limiting & Throttling
Prevent overwhelming 3rd party APIs.

```typescript
inngest.createFunction({
    id: "sync-crm",
    // Max 10 requests per minute per user
    rateLimit: { limit: 10, period: "1m", key: "event.data.userId" },
    // Drop events if queue is full
    throttle: { limit: 5, period: "1s" } 
}, ...);
```

### Debounce
Process only the latest event in a window (e.g., search indexing).

```typescript
inngest.createFunction({
    id: "index-product",
    // Wait 10s for more events; only run with the latest data
    debounce: { period: "10s", key: "event.data.productId" }
}, ...);
```

### Priority
Prioritize specific events (e.g., Paid users).

```typescript
inngest.createFunction({
    id: "generate-report",
    // High number = High priority
    priority: { run: "event.data.plan === 'enterprise' ? 100 : 0" }
}, ...);
```

## Error Handling

### Automatic Retries
Inngest retries steps automatically on error (default ~4-5 times with backoff).
-   **Customize**: `{ retries: 10 }` in config.

### Non-Retriable Errors
Stop execution immediately if the error is fatal (e.g., 400 Bad Request).

```typescript
import { NonRetriableError } from "inngest";

await step.run("validate", async () => {
  if (!isValid) throw new NonRetriableError("Invalid payload");
});
```

### Failure Handlers (Rollbacks)
Execute cleanup logic if the function fails after all retries.

```typescript
export const riskyFunc = inngest.createFunction(
  { 
    id: "risky-transfer",
    // Runs if main handler fails
    onFailure: async ({ error, event, step }) => {
      await step.run("rollback-funds", async () => {
        await reverseTransfer(event.data.transferId);
      });
      await step.run("notify-admin", async () => {
        await sendAlert(`Transfer failed: ${error.message}`);
      });
    }
  },
  { event: "bank/transfer.init" },
  async ({ step }) => { /* ... */ }
);
```

## Registration
**MANDATORY**: All functions must be imported and exported in `src/lib/inngest/functions/index.ts`.

Attribution

aiskillstoreaiskillstore
View sourceSee grades on GitHubMore from aiskillstore โ†’
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots ยท $299/mo ยท GSC-verified traffic ยท sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots ยท $299/mo ยท GSC-verified traffic ยท sponsors can never buy grades.

See placements

Related Skills

Clean Code

Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

304955 votes

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

285172 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch โ€” SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions โ€” even if they don't name TanStack Start specifically. No template repo โ€” Claude generates every file fresh per ...

10311 votes
View all in development โ†’