Back to Skills

trigger-setup

Set up Trigger.dev in your project. Use when adding Trigger.dev for the first time, creating trigger.config.ts, or initializing the trigger directory.

27stars5forksUpdated 6/18/2026

Security Assessment

Low Risk(80/100)

Detected risks:

Sensitive File Access([references/environment-setup.md] .env, [SKILL.md] .env)
Security Score80/100

About trigger-setup

The trigger-setup skill provides comprehensive guidance for integrating Trigger.dev into your project from scratch. It streamlines the initial setup process by walking you through installation, configuration, and creating your first background task. This skill solves the common problem of getting started with asynchronous task execution in Node.js or Bun applications, eliminating the complexity of configuring job queues, worker processes, and task scheduling infrastructure.

The skill covers the complete setup workflow including SDK installation, project initialization with the CLI, configuration file creation, and development server setup. It provides working code examples for both task definition and task triggering, along with proper project structure guidelines. The skill also includes environment variable configuration and integration patterns for connecting your application code to the Trigger.dev cloud platform.

This skill is designed for developers adding background job processing to existing Node.js or Bun applications, teams migrating from other job queue systems, or anyone building applications that need reliable async task execution. It's particularly valuable for developers who want to quickly prototype task-based workflows, set up scheduled jobs, or build event-driven architectures without managing infrastructure. The skill serves as the foundation for more advanced Trigger.dev capabilities like AI workflows, real-time updates, and complex retry logic.

FAQ

What are the minimum requirements to use Trigger.dev?

You need Node.js 18 or higher (or Bun as an alternative runtime) and a Trigger.dev account from cloud.trigger.dev. The @trigger.dev/sdk package must be installed in your project.

Where do I find the project ID and secret key mentioned in the configuration?

Both values are available in your Trigger.dev dashboard. The project ID (starting with 'proj_') is shown in your project settings, and the secret key (starting with 'tr_dev_') can be found under the API Keys section.

Why aren't my tasks being detected after creation?

Tasks must be exported from files located in directories specified in the 'dirs' array of trigger.config.ts. Additionally, you need to restart the 'npx trigger dev' server after adding new task files for them to be registered.

Can I use Trigger.dev with existing projects or only new ones?

Trigger.dev works with both new and existing projects. The setup process is designed to integrate smoothly into existing Node.js or Bun codebases without requiring major architectural changes.

How do I trigger tasks from my application code?

Import the tasks object from @trigger.dev/sdk and use tasks.trigger() with the task ID and payload. You can also test tasks directly from the Trigger.dev dashboard's Test tab during development.

All Files

3 files
references/project-structure.md1.8 KB
View
references/environment-setup.md1.9 KB
View
SKILL.md2.6 KB
View

Install trigger-setup

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill