# trigger-tasks

Guides backend task authoring with @trigger.dev/sdk. Helps configure retries, cron schedules, waits, and concurrency inside your /trigger directory.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3200 installs · ★ 35
- Author: triggerdotdev
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/triggerdotdev/skills/tree/HEAD/trigger-tasks/SKILL.md
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/skills/trigger-tasks

## What it does

This skill guides your coding agent when writing background jobs using `@trigger.dev/sdk`. It covers defining tasks with `task()` or `schemaTask()` alongside validation schemas like Zod or ArkType. It also sets up retry strategies. While runs default to 3 attempts, throwing `AbortTaskRunError` cancels retries instantly.

Execution control includes durable pauses with `wait.for` and run metadata storage up to 256KB. For task orchestration, the skill applies `triggerAndWait` and unpacks Result objects safely. When triggering from external backend routes, it enforces type-only imports to keep task bundles out of backend outputs.

Imports must come directly from `@trigger.dev/sdk`, because loading deprecated paths like `@trigger.dev/sdk/v3` or `@trigger.dev/core` breaks builds. The skill concentrates strictly on backend routines; React hooks and AI chat flows are excluded.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add triggerdotdev/skills --skill trigger-tasks -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/trigger-tasks/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/trigger-tasks/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add triggerdotdev/skills --skill trigger-tasks -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/trigger-tasks/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add triggerdotdev/skills --skill trigger-tasks -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/trigger-tasks/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install triggerdotdev/skills trigger-tasks
```

2. **Manually: put the files in place**
- File: `.github/skills/trigger-tasks/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add triggerdotdev/skills --skill trigger-tasks -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/triggerdotdev/skills --path trigger-tasks
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/trigger-tasks/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add triggerdotdev/skills --skill trigger-tasks -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/triggerdotdev/skills/tree/HEAD/trigger-tasks/SKILL.md

## When to use it
- author background jobs with schema validation
- configure retry strategies and abort errors
- trigger child tasks and handle Result shapes
- schedule cron tasks with custom timezones

## Example prompts
- Create a schemaTask for invoice generation using Zod in /trigger
- Set up a daily cron task in Tokyo timezone that runs at 5 AM
- Trigger a background task from an API handler using an idempotency key

## Similar
- [inngest-durable-functions](https://affpapa.org/en/nevibecode/skills/inngest-durable-functions.md) — skill · 3800 installs
- [huawei-cloud-functiongraph-trigger-create](https://affpapa.org/en/nevibecode/skills/huawei-cloud-functiongraph-trigger-create.md) — skill · 16900 installs
- [inngest-steps](https://affpapa.org/en/nevibecode/skills/inngest-steps.md) — skill · 3800 installs
- [iii-core-primitives](https://affpapa.org/en/nevibecode/skills/iii-core-primitives.md) — skill · 4000 installs
- [netlify-functions](https://affpapa.org/en/nevibecode/skills/netlify-functions.md) — skill · 3200 installs
- [convex-cron-jobs](https://affpapa.org/en/nevibecode/skills/convex-cron-jobs.md) — skill · 2800 installs

From the same set: [triggerdotdev/skills](https://affpapa.org/en/nevibecode/by/triggerdotdev/skills.md) — 3 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
