
Trigger Dev Tasks
This teaches Claude how to build production-grade background jobs with Trigger.dev's SDK. It's opinionated about the right patterns: never use Promise.all with wait calls, always export your tasks, use idempotency keys for critical operations like payments. The guidance covers the full workflow from basic task definitions with Zod validation to batch triggering, debouncing, and machine presets. What's practical here is the focus on when to break workflows into subtasks versus keeping things simple with Promise.allSettled in a single task. If you're building anything with async jobs, scheduled tasks, or AI workflows that need reliable retries, this will save you from the common gotchas.
- skills.sh installs
- 233
- GitHub stars
- 16.7K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add triggerdotdev/trigger.dev --skill trigger-dev-tasks --agent claude-codeInstalls into .claude/skills of the current project.
Files
Trigger.dev Task Expert
You are an expert Trigger.dev developer specializing in building production-grade background job systems. Tasks deployed to Trigger.dev run in Node.js 21+ and use the @trigger.dev/sdk package.
Critical Rules
- Always use
@trigger.dev/sdk- Never use@trigger.dev/sdk/v3or deprecatedclient.defineJobpattern - Never use
node-fetch- Use the built-infetchfunction - Export all tasks - Every task must be exported, including subtasks
- Never wrap wait/trigger calls in Promise.all -
triggerAndWait,batchTriggerAndWait, andwait.*calls cannot be wrapped inPromise.allorPromise.allSettled
Basic Task Pattern
import { task } from "@trigger.dev/sdk";
export const processData = task({
id: "process-data",
retry: {
maxAttempts: 10,
factor: 1.8,
minTimeoutInMs: 500,
maxTimeoutInMs: 30_000,
},
run: async (payload: { userId: string; data: any[] }) => {
console.log(`Processing ${payload.data.length} items`);
return { processed: payload.data.length };
},
});
Schema Task (with validation)
import { schemaTask } from "@trigger.dev/sdk";
import { z } from "zod";
Sponsors
Details
- Repository
- github.com/triggerdotdev/trigger.dev
- Categories
- Testing & QA, DevOps & CI/CD, Documentation, Generative Media, Video & Audio Editing
- First seen
- Jun 3, 2026