skills/inngest-brownfield-audit/SKILL.md
Use when analyzing an existing TypeScript or JavaScript codebase to decide where and how to introduce Inngest. Covers repository discovery, framework and package detection, finding durability gaps in HTTP handlers, webhooks, cron jobs, queues, long-running jobs, AI agents, polling loops, and side-effect-heavy code, then producing and implementing an incremental integration plan.
npx skillsauth add inngest/inngest-skills inngest-brownfield-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when asked to inspect an existing codebase, add Inngest "where it makes sense", migrate fragile background work, or find durability gaps before making changes.
This is an agent-first workflow. Do the audit from evidence in the repo, name the specific files and call sites that drove each conclusion, and make small integration moves that preserve current behavior.
Use this skill for requests like:
If the user is starting from scratch instead of a brownfield repo, use
inngest-setup, inngest-durable-functions, inngest-events,
inngest-steps, and, for AI workflows, the agent patterns in this skill.
Map the project shape.
package.json, workspace files, app/router structure, server entry
points, deployment config, and test scripts.Find existing Inngest usage.
inngest, createFunction, serve(, /api/inngest,
INNGEST_, step.run, step.sleep, step.waitForEvent,
step.sendEvent, step.invoke, step.ai, inngest.send, and
@inngest/realtime.Find durability gaps.
void someAsync(), un-awaited promises,
.then( chains, setTimeout, setInterval, detached jobs after HTTP
response, and background work in route handlers.cron, node-cron, agenda, bull,
bullmq, bee-queue, qstash, sqs, temporal, trigger.dev,
deployment cron config, and scheduled API routes.webhook.Classify each candidate.
Choose the smallest safe integration.
step.run one boundary at a time.Run commands that fit the repo. Prefer rg; keep output focused.
rg -n "inngest|createFunction|step\\.|serve\\(|/api/inngest|INNGEST_" .
rg -n "setTimeout|setInterval|Promise\\.all|void [a-zA-Z0-9_]+\\(|\\.then\\(" .
rg -n "cron|node-cron|schedule|bull|bullmq|bee-queue|agenda|qstash|sqs" .
rg -n "webhook|stripe|svix|clerk|github|shopify|slack|hubspot|linear" .
rg -n "retry|backoff|poll|status|timeout|429|rate limit|rate-limit" .
rg -n "openai|anthropic|ai\\.|generateText|streamText|tool|agent|embedding" .
When the repo is large, narrow searches to app source directories and exclude generated/vendor folders.
| Existing shape | Inngest fit | Primary primitives |
|---|---|---|
| HTTP handler does slow side effects before responding | Emit event, return fast | inngest.send, event trigger, step.run |
| Webhook must acknowledge quickly but process reliably | Verify signature, emit idempotent event | Event ID, step.run, retries |
| Cron job loses progress midway | Cron-triggered durable function | Cron trigger, page-level step.run, flow control |
| Polling loop waits for external async work | Durable wait or durable poll | step.waitForEvent, step.sleep, step.run |
| Large fan-out exceeds request/serverless limits | Split orchestration and item work | step.sendEvent, per-item function, concurrency |
| External API hits 429s | Move limits to function config | throttle, rateLimit, concurrency |
| Human review can take days | Persist the wait in Inngest | step.waitForEvent, timeout, realtime |
| AI agent/tool loop needs retry-safe progress | One step per tool/model boundary | step.ai, step.run, step.sleep, realtime |
| Existing queue only hides fragile work | Replace queue boundary gradually | Event trigger, idempotency, function-level retries |
Before editing, summarize findings in this compact shape:
Inngest audit:
- Existing Inngest: none / partial / healthy / risky
- Framework: <framework and evidence>
- Best first slice: <file + workflow>
- Why: <loss/timeout/retry/idempotency failure>
- Proposed primitives: <event, steps, flow control, waits, realtime>
- Idempotency key: <source of truth>
- Files likely touched: <short list>
- Tests/checks: <commands or focused cases>
Then implement unless the user asked for audit-only.
If Inngest is already present, verify:
id is a stable slug and is not derived from deploy-specific data.INNGEST_DEV=1; production uses
INNGEST_SIGNING_KEY./api/inngest.domain/noun.verb.inngest/realtime, not the v3
@inngest/realtime package.Use Inngest when an AI or agent workflow needs durable progress across model calls, tool calls, waits, approvals, or streaming UI updates.
Good candidates:
Recommended shape:
id.step.run.step.ai or step.run boundary.step.waitForEvent or step.waitForSignal with a timeout.step.realtime.publish between steps, or
inngest.realtime.publish inside an existing step.run.concurrency, throttle, or rateLimit, not
ad hoc in-process throttlers.Avoid:
setTimeout or a cron poller for follow-ups and approvals.Pick checks that prove the integration path:
tools
Use when upgrading an existing TypeScript codebase from Inngest SDK v3 to v4, or when fixing mixed v3/v4 API usage. Covers detecting current SDK usage, moving triggers into createFunction options, replacing EventSchemas with eventType/staticSchema, moving serve options to the client, updating realtime imports, rewriting step.invoke string IDs, checkpointing/serverless runtime settings, Connect option changes, and verification.
tools
Use when installing or running the Inngest CLI and Dev Server for local development, local testing, serve endpoint debugging, Docker or Docker Compose setup, MCP configuration, self-hosted `inngest start`, or deployment workflow checks. Covers `inngest dev`, `inngest start`, auto-discovery, config files, environment variables, `@inngest/test`, local event sending, platform gotchas, and production/self-hosted server flags.
tools
Use when the user explicitly asks for the Inngest REST API v2, raw HTTP, OpenAPI, API docs, API authentication, or an endpoint that the Inngest CLI does not expose. Covers api-docs.inngest.com, llms.txt, the OpenAPI v2 spec, Bearer authentication with API keys or signing keys, production and local base URLs, raw curl/fetch requests, request-shape discovery, pagination, secret redaction, and when to prefer the `inngest-api-cli` skill instead.
tools
Use when operating Inngest API resources from the terminal with `npx inngest-cli@latest api`: Cloud/local run debugging, event-run lookup, function traces, function invocation, app syncs, webhooks, environments, keys, account checks, and Insights queries. Provides prescriptive command routing for agents: which CLI command to run for a run ID, event ID, app ID, function ID, Cloud environment, API key, missing ID, or potentially mutating operation. Use `inngest-cli` for dev server setup/general CLI workflows and `inngest-api` only when raw REST API v2 docs or OpenAPI fallback are needed.