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.
Agent Rules are one of three AI tools we provide. You can also install Skills for portable cross-editor instruction sets or the MCP Server for live project interaction. See the comparison table for details.

Installation

Install the agent rules with the following command:

Available rule sets

We provide five specialized rule sets, each optimized for different aspects of Trigger.dev development:

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. Claude Code subagent installation

Usage

Activate the subagent in your prompts by requesting it explicitly:
The subagent works best when combined with the appropriate rule sets installed alongside it, providing both high-level architectural guidance and detailed implementation knowledge.

Supported AI clients

The Trigger.dev rules work across a wide range of AI coding assistants and editors:

Rule activation behavior

Different AI tools handle rules differently:
  • Automatic Activation: Cursor, Windsurf, VSCode Copilot, and Cline automatically apply relevant rules when working in Trigger.dev projects or when trigger.config.ts is detected
  • Context-Aware: Claude Code intelligently applies rules based on the current context and file types
  • Manual Integration: AGENTS.md clients and others append rules to configuration files for manual activation

Keeping rules updated

Trigger.dev rules are regularly updated to reflect new features, API changes, and best practices. The CLI includes automatic update detection.

Automatic update notifications

When running npx trigger.dev@latest dev, you’ll receive notifications when newer rule versions are available with a simple update command.

Manual updates

Update rules anytime with:
The update process replaces existing rules without creating duplicates, keeping your configuration files clean and organized.

Why updates matter

  • Current API patterns: Access the latest Trigger.dev APIs and features
  • Performance optimizations: Benefit from improved patterns and practices
  • Deprecated pattern avoidance: Prevent AI assistants from generating outdated code
  • New feature support: Immediate access to newly released capabilities

Getting started

  1. Install the rules:
  1. Follow the prompts to install the rules for your AI client.
  2. Consider installing the trigger-dev-expert subagent if using Claude Code.

Next steps

Skills

Portable instruction sets that work across all AI coding assistants.

MCP Server

Give your AI assistant direct access to Trigger.dev tools and APIs.

Complete AI setup

See all AI tools and how they compare.

Writing tasks

Learn the task patterns that agent rules teach your AI assistant.