What problem does it solve?
Writing background tasks with Trigger.dev involves many subtle API rules—Result objects from triggerAndWait, queue isolation for subtasks, idempotency scoping, and build configuration—and mistakes in these areas cause silent failures or incorrect behavior in production.
Core Features & Use Cases
- Task Definition Guidance: Covers task(), schemaTask(), the run function and its context, retries, waits, queues, concurrency, and scheduled/cron tasks.
- Common Mistake Prevention: Documents seven critical pitfalls such as treating wait results as raw output, wrapping triggerAndWait in Promise.all, and calling metadata.set outside run().
- Version-Pinned Documentation: Directs the AI to read only allowlisted doc pages bundled inside the installed @trigger.dev/sdk package.
- Use Case: When adding a new email-sequence background task to a /trigger directory, load this skill so the AI writes correct task definitions, triggers them properly from route handlers, and configures trigger.config.ts.
Quick Start
Ask the AI to write a Trigger.dev task that processes a payload with retries and a concurrency-limited queue inside your project's trigger directory.