Skip to main content

What are Trigger.dev agent rules?

Trigger.dev agent rules are comprehensive instruction sets that guide AI assistants to write optimal Trigger.dev code. These rules ensure your AI assistant understands best practices, current APIs, and recommended patterns when working with Trigger.dev projects.

Installation

Install the agent rules with the following command:
npx trigger.dev@latest install-rules

Available rule sets

We provide five specialized rule sets, each optimized for different aspects of Trigger.dev development:
Rule setTokensDescriptionGitHub
Basic tasks1,200Essential rules for writing basic Trigger.dev tasks and fundamental patternsView
Advanced tasks3,000Comprehensive rules for complex workflows, error handling, and advanced task patternsView
Scheduled tasks780Specialized guidance for cron jobs, scheduled workflows, and time-based triggersView
Configuration1,900Complete guide for trigger.config.ts setup, environment configuration, and project structureView
Realtime1,700Using Trigger.dev Realtime features and frontend integration patternsView

Claude Code subagent

For Claude Code users, we provide a subagent called trigger-dev-expert that’s an expert at writing well-structured Trigger.dev code.

Installation

The subagent is available as an option when running the rules installation command. Select “Claude Code” as your client and choose to include the subagent when prompted.