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
.cursor/rules/trigger.basic.mdcWhat 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.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/trigger.basic.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/trigger.basic.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/trigger.basic.mdManually: put the files in place
.clinerules/trigger.basic.mdStep 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.