Agent skill

Trigger.dev Background Tasks

by papermark in papermark/papermark

Guides building durable background tasks, scheduled jobs and queues with Trigger.dev, including retries, waits, idempotency and concurrency limits.

Custom licenceAuto-check passedBackend & APIs

Install Trigger.dev Background Tasks

skills CLI
$ npx skills add papermark/papermark --skill trigger-tasks -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install papermark/papermark trigger-tasks --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/papermark/papermark.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/trigger-tasks .claude/skills/trigger-tasks && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
trigger-tasks
GitHub stars
9.2k
Token cost
~2.1k tokens
SKILL.md length
223 words
Files
4 (incl. references)
Skills in repo
6
Repo updated
First seen
Licence
Custom licence

At a glance

Guides building durable background tasks, scheduled jobs and queues with Trigger.dev, including retries, waits, idempotency and concurrency limits.

  • Works in 4 steps: Always use @trigger.dev/sdk — never use… → Check result.ok before accessing… → Never use Promise.all with… → …
  • Moving slow work such as email or webhook processing into background tasks
  • SKILL.md covers When to Use, Critical Rules, Basic Task and Schema Task (Validated Input), plus 11 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The skill covers writing tasks with the `@trigger.dev/sdk` package: basic tasks, schema tasks that validate input with Zod, and triggering from backend code or from inside other tasks. Its critical rules are to use the current SDK rather than the deprecated `client.defineJob`, to check `result.ok` before reading `result.output` from `triggerAndWait()`, never to wrap `triggerAndWait()` or wait calls in `Promise.all`, and to export tasks from files in the `trigger/` directory.

Further sections cover waits, with the note that waits over five seconds are checkpointed and do not count toward compute, shared queues and concurrency limits, debouncing of rapid triggers, idempotency keys, error handling and retries, cron schedules, metadata and progress, tags and machine presets. Reference files go deeper on basic, advanced and scheduled tasks.

When your agent uses it

  • Moving slow work such as email or webhook processing into background tasks
  • Scheduling recurring jobs with cron
  • Limiting concurrency or retrying a flaky task with Trigger.dev
  • Building long-running AI agent workflows that must not block the app

Example prompts

  • “Create a Trigger.dev task that processes an uploaded PDF and retries on failure.”
  • “Add a cron schedule that runs the cleanup task every night.”
  • “Limit this task to one run at a time per user with a queue.”

Requirements

  • A project that uses the Trigger.dev SDK, `@trigger.dev/sdk`

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Always use @trigger.dev/sdk — never use deprecated client.defineJob
  2. Check result.ok before accessing result.output from triggerAndWait()
  3. Never use Promise.all with triggerAndWait() or wait.* calls
  4. Export tasks from files in your trigger/ directory

What it can do on your machine

Read from SKILL.md and the folder at commit ed19717. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Trigger.dev Background Tasks loads about 2.1k tokens when it runs, and up to ~7.1k if it reads all its reference files. Until then it costs about 54 tokens; SKILL.md has 223 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 223 words (~2,055 tokens).

“Build durable background tasks that run reliably with automatic retries, queuing, and observability.”

— opening of SKILL.md by papermark, Custom licence
name
trigger-tasks

Read the full SKILL.md on GitHub

Files

SKILL.md and 3 other files (references) in .agents/skills/trigger-tasks of papermark/papermark.

  • SKILL.md
  • references/advanced-tasks.md
  • references/basic-tasks.md
  • references/scheduled-tasks.md

Open the folder on GitHubat commit ed19717

Compare with similar skills

Trigger.dev Background Tasks next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Trigger.dev Background Tasks compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Trigger.dev Background Tasks this skillpapermark/papermark9.2k—~2.1kAutomated safety check: PassCustom licence
Inngest SetupAsymmetric-al/core382—~3.3kAutomated safety check: NotesAGPL-3.0
Inngest Nextjs Patternspproenca/dot-skills214—~1.4kAutomated safety check: NotesMIT
Frappe App Devfrappe/skills146—~943Automated safety check: PassNone
Schkedbibendi/schked138—~454Automated safety check: PassMIT
Job Patternsdilolabs/nosia2131 repos~1.6kAutomated safety check: PassMIT

Similar skills

  • Inngest Setup

    Asymmetric-al/core

    A skill your agent uses when adding durable execution to a TypeScript project — building retry-safe webhook handlers, background jobs that survive crashes, scheduled tasks, or long-running workflows…

    382 GitHub stars~3.3k tokensUpdated today
    Backend & APIsAuto-check: notes
  • Inngest Nextjs Patterns

    pproenca/dot-skills

    Inngest event-driven functions in a Next.js (App Router) project — creating the client, the /api/inngest route handler, typed events with Zod schemas, durable event-triggered functions, scheduled…

    214 GitHub stars~1.4k tokensUpdated 1 mo ago
    Backend & APIsAuto-check: notes
  • Frappe App Dev

    frappe/skills

    Builds full-stack Frappe Framework applications end-to-end. An agent skill from frappe/skills.

    146 GitHub stars~943 tokensUpdated 7 days ago
    Backend & APIsAuto-check passed
  • Schked

    bibendi/schked

    Guide for working with Schked, a Ruby recurring-job scheduler built on top of rufus-scheduler.

    138 GitHub stars~454 tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Job Patterns

    dilolabs/nosia

    Implements shallow background jobs with later/now conventions using Solid Queue.

    213 GitHub starsUsed in 1 repo~1.6k tokens
    Backend & APIsAuto-check passed
  • Sap Btp Job Scheduling

    secondsky/sap-skills

    This skill provides comprehensive guidance for SAP BTP Job Scheduling Service development, configuration, and operations.

    460 GitHub stars~3.6k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed

More from papermark/papermark

  • Trigger.dev Agent Patterns

    papermark/papermark

    Patterns for building LLM agents on Trigger.dev tasks: prompt chaining, routing, parallel workers, orchestrator-workers, evaluator loops and human approval gates.

    9.2k GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed
  • Trigger.dev Configuration

    papermark/papermark

    Configures Trigger.dev projects through trigger.config.ts, with build extensions for Prisma, Playwright, Puppeteer, FFmpeg, Python and system packages.

    9.2k GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Audits Trigger.dev tasks, schedules and run history for wasteful machine sizes, retries, polling and cron frequency to cut spend.

    9.2k GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Trigger.dev Realtime

    papermark/papermark

    Shows how to subscribe to Trigger.dev task runs from the backend and from React for progress indicators, live dashboards, AI response streams and approval waits.

    9.2k GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • GitHub CLI Reference

    papermark/papermark

    Reference for the gh command line tool covering repositories, issues, pull requests, Actions, releases, gists and codespaces, with install and login steps.

    9.2k GitHub starsUsed in 4 repos~9.8k tokens
    Auto-check: warnings

Works with

Questions about Trigger.dev Background Tasks

What does Trigger.dev Background Tasks do?

Guides building durable background tasks, scheduled jobs and queues with Trigger.dev, including retries, waits, idempotency and concurrency limits. dev/sdk` package: basic tasks, schema tasks that validate input with Zod, and triggering from backend code or from inside other tasks.all`, and to export tasks from files in the `trigger/` directory.

When should I use Trigger.dev Background Tasks?

Trigger.dev Background Tasks fits situations like: moving slow work such as email or webhook processing into background tasks; scheduling recurring jobs with cron; limiting concurrency or retrying a flaky task with Trigger.dev; building long-running AI agent workflows that must not block the app.

How do I install Trigger.dev Background Tasks in Claude Code?

Run `npx skills add papermark/papermark --skill trigger-tasks -a claude-code`. Or copy the skill folder (.agents/skills/trigger-tasks in papermark/papermark) into .claude/skills/trigger-tasks in your project. Claude Code loads it when a task matches its description.

How do I install Trigger.dev Background Tasks in Codex?

Run `npx skills add papermark/papermark --skill trigger-tasks -a codex`. Or copy the skill folder (.agents/skills/trigger-tasks in papermark/papermark) into .agents/skills/trigger-tasks in your project. Codex loads it when a task matches its description.

Can I use Trigger.dev Background Tasks in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add papermark/papermark --skill trigger-tasks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/trigger-tasks, .gemini/skills/trigger-tasks, .github/skills/trigger-tasks and .opencode/skills/trigger-tasks in your project.

What does Trigger.dev Background Tasks need to run?

SKILL.md names no scripts, command-line tools or credentials: Trigger.dev Background Tasks is instructions for the agent only. Our summary lists: A project that uses the Trigger.dev SDK, `@trigger.dev/sdk`.

Does Trigger.dev Background Tasks access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Trigger.dev Background Tasks safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Trigger.dev Background Tasks use?

Trigger.dev Background Tasks has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Trigger.dev Background Tasks use?

About 2.1k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5k tokens, read only when the agent opens those files.

What are the alternatives to Trigger.dev Background Tasks?

Skills that share tags, products or a category with Trigger.dev Background Tasks: Inngest Setup (Asymmetric-al/core, 382 stars), Inngest Nextjs Patterns (pproenca/dot-skills, 214 stars), Frappe App Dev (frappe/skills, 146 stars) and Schked (bibendi/schked, 138 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Trigger.dev Background Tasks?

papermark (a GitHub organization) maintains it in papermark/papermark, which has 9,242 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on August 28, 2026.

Source: papermark/papermark on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.