Skip to main content
rule CX Codex

trigger.basic — Claude Code rule for Trigger.dev tasks

trigger.basic is a Claude Code rule for writing Trigger.dev tasks. It applies to TypeScript files matching **/trigger/**/*.ts.

AGPL-3.0 ★ 1,120 updated 2026-11-16

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/trigger.basic.mdc
Open on GitHub

What trigger.basic does

The rule guides task creation with @trigger.dev/sdk, including regular tasks and schema-validated inputs. It also covers single and batch runs, debounce settings for repeated triggers, and child-task calls with result handling.

Waits can use a duration, a date, or a token. Waits longer than 5 seconds are checkpointed automatically and do not count toward compute usage. Do not put triggerAndWait, batchTriggerAndWait, or wait calls inside Promise.all or Promise.allSettled; the deprecated client.defineJob pattern is disallowed.

What it helps with

  • create a Trigger.dev task with the current SDK
  • validate and type task input
  • handle success and failure from child tasks
  • combine repeated triggers with a debounce key

Example prompts for the agent

  • Create a Trigger.dev task for processing data with the current SDK.
  • Add schema validation to this task's input.
  • Run a child task and handle its result or error.

How to install trigger.basic

Manually: put the files in place

.cursor/rules/trigger.basic.mdc

Frontmatter: description, globs, alwaysApply

Step by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules

Questions about trigger.basic

How do I install trigger.basic in Claude Code?

Add the rule file to the project at .claude/rules/trigger.basic.md.

What does trigger.basic do?

It guides task creation with the Trigger.dev SDK, input validation, child-task execution, and waits.

Which files does trigger.basic apply to?

It targets TypeScript files matching **/trigger/**/*.ts.

Similar IDE rules

All IDE rules for Backend and APIs →

From the same set25

The whole set →
server-actions This Claude Code rule guides the choice between Server Actions and API routes for reading or changing data. It applies when an agent writes server-side application logic. CX Codex +1 ★ 1,120repo stars input-label The input-label Claude Code rule sets how fields get their captions through the Input component. It applies to *.tsx files and disallows a separate caption above the field. CX Codex +1 ★ 1,120repo stars supabase-typed-mutations The supabase-typed-mutations Claude Code rule adds Database types to Supabase insert, update, and upsert calls. It applies while an agent works with these mutations. CX Codex +1 ★ 1,120repo stars use-shadcn This rule for Claude Code, Codex, and Cursor guides agents to reuse shadcn/ui components. When building UI, it directs them to look for existing project components first. CX Codex +1 ★ 1,120repo stars one-component-per-file The one-component-per-file Claude Code rule keeps each React component in its own file. It applies to *.tsx files. CX Codex +1 ★ 1,120repo stars realtime This Claude Code rule sets the pattern for Supabase Realtime subscriptions. It directs component code to useRealtimeSubscription instead of calling supabase.channel() directly. CX Codex +1 ★ 1,120repo stars dialog-trigger-pattern The dialog-trigger-pattern Claude Code rule defines how dialog components receive their trigger. It applies to .tsx files. CX Codex +1 ★ 1,120repo stars ai-sdk This Claude Code rule covers structured data generation with the Vercel AI SDK. It applies to TypeScript and TSX files. CX Codex +1 ★ 1,120repo stars

Project sponsors

Companies that keep this analytics open