Skip to content

Conversation

@ericallam
Copy link
Member

  • Add CLAUDE.md providing Claude Code guidance and documenting the Claude Code skill
  • Add trigger-dev-tasks skill to assist writing Trigger.dev tasks
  • Add SDK rules version 4.3.0 including batch trigger v2 and debouncing features

@changeset-bot
Copy link

changeset-bot bot commented Jan 11, 2026

⚠️ No Changeset found

Latest commit: de72a1a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 11, 2026

Walkthrough

Adds extensive Trigger.dev documentation and configuration files. New skill docs are added under .claude/skills/trigger-dev-tasks/ (SKILL.md, basic-tasks.md, advanced-tasks.md, config.md, realtime.md, scheduled-tasks.md) and corresponding reference files under rules/4.3.0/. Adds CLAUDE.md with repository development and Claude Code guidance. Updates rules/manifest.json to bump currentVersion to 4.3.0 and register new version entries. Adjusts .gitignore to ignore the Claude settings file pattern and adds .mcp.json. All changes are documentation, manifest, and config updates; no public API code modifications.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description provides the three key changes but does not follow the required template structure. It lacks the checklist, testing section, changelog detail, and issue reference that the template specifies. Update the description to follow the template: include the checklist items, add a Testing section describing verification steps, provide a more detailed Changelog, and reference the issue number with 'Closes #'.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main changes: adding CLAUDE.md documentation, a claude skill for Trigger.dev tasks, and a new SDK rules version 4.3.0 with specific features.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a245e6a and de72a1a.

📒 Files selected for processing (1)
  • .gitignore
🚧 Files skipped from review as they are similar to previous changes (1)
  • .gitignore
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (25)
  • GitHub Check: Cursor Bugbot
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: claude-review
  • GitHub Check: Analyze (javascript-typescript)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@claude
Copy link

claude bot commented Jan 11, 2026

PR Review: Add CLAUDE.md and Claude Code Skill for Writing Trigger.dev Tasks + Add 4.3.0 Rule Set

This PR adds comprehensive documentation and tooling for Claude Code to assist with Trigger.dev development. Overall, this is a well-structured and valuable addition. Here's my detailed review:

✅ Strengths

1. Excellent Documentation Quality

  • The CLAUDE.md file provides clear, actionable guidance for repository navigation
  • Build commands, testing patterns, and architecture overview are well documented
  • The testcontainers usage examples are particularly helpful

2. Well-Organized Skill Structure

  • The .claude/skills/trigger-dev-tasks/ skill is comprehensive with good separation of concerns
  • SKILL.md provides a quick reference, with detailed docs in separate files
  • Reference documentation pattern (basic-tasks.md, advanced-tasks.md, etc.) is logical

3. Good Versioning Strategy

  • The manifest.json versioning approach allows incremental updates
  • Version 4.3.0 correctly reuses unchanged files from previous versions (config.md from 4.1.0, scheduled-tasks.md from 4.0.0)

4. Valuable New Features Documented

  • Batch triggering v2 (1,000 items, 3MB payloads) is clearly explained
  • Debouncing feature with leading/trailing modes is well-documented with use cases

📝 Suggestions for Improvement

1. Minor Inconsistency in rules/4.3.0/basic-tasks.md

Line 3 says:

**MUST use `@trigger.dev/sdk`, NEVER `client.defineJob`**

But the 4.0.0 version says:

**MUST use `@trigger.dev/sdk` (v4), NEVER `client.defineJob`**

Consider keeping the (v4) suffix for consistency, as it clarifies which SDK version is being discussed.

2. Duplication Between Skill and Rules

The files in .claude/skills/trigger-dev-tasks/ and rules/4.3.0/ have significant overlap:

  • basic-tasks.md and advanced-tasks.md appear in both locations

Consider whether the skill files could reference or import from the rules directory to avoid maintaining duplicate content. If they must be separate, document the relationship between these directories.

3. manifest.json Token Counts

The token counts for 4.3.0 have been updated (1200 → 1400 for basic, 3000 → 3500 for advanced), which correctly reflects the added debouncing and batch v2 content. However, consider adding a comment or documentation about how these token counts are calculated/maintained.

4. Skill Files Missing from Rules Directory

These skill files don't have corresponding entries in rules/4.3.0/:

  • config.md - points to 4.1.0 version in manifest
  • scheduled-tasks.md - points to 4.0.0 version
  • realtime.md - points to 4.1.0 version

This is intentional per the versioning strategy, but the skill directory has its own copies. Ensure these are kept in sync with the rules they correspond to.

5. .gitignore Change

The change from ignoring .claude entirely to only ignoring .claude/settings.local.json is good - it allows the skill to be committed. Just verify this doesn't accidentally expose any other Claude-related files that should remain private.

🔒 Security Review

No security concerns identified. The documentation files contain only example code patterns without sensitive data.

🧪 Test Coverage

This PR adds documentation only - no code changes requiring tests.

📋 Summary

Recommendation: Approve with minor suggestions

This is a valuable addition that will significantly improve the Claude Code experience for Trigger.dev developers. The documentation is comprehensive, well-organized, and follows good practices. The minor inconsistencies noted above are cosmetic and don't block approval.

Consider addressing the duplication between skill files and rules files in a follow-up to reduce maintenance burden.

@vibe-kanban-cloud
Copy link

Review Complete

Your review story is ready!

View Story

Comment !reviewfast on this PR to re-generate the story.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
rules/4.3.0/advanced-tasks.md (1)

3-3: Optional: Consider using heading syntax instead of bold text.

Line 3 uses emphasis (**Advanced patterns and features for writing tasks**) which could be formatted as a heading for better markdown structure and accessibility.

♻️ Proposed fix
-**Advanced patterns and features for writing tasks**
+## Advanced patterns and features for writing tasks
CLAUDE.md (1)

185-199: Clarify SDK import path deprecation.

The guidance to use @trigger.dev/sdk (not @trigger.dev/sdk/v3) is correct for v4. However, considering the retrieved learnings still reference trigger.dev/sdk/v3, it may be worth adding a brief note explaining this is a v4 change to help users migrating from v3.

💡 Suggested clarification
 ## Writing Trigger.dev Tasks

-Always import from `@trigger.dev/sdk`. Never use `@trigger.dev/sdk/v3` or deprecated `client.defineJob` pattern.
+Always import from `@trigger.dev/sdk`. Never use `@trigger.dev/sdk/v3` (v3 import path) or the deprecated `client.defineJob` pattern.
rules/4.3.0/basic-tasks.md (1)

163-164: Consider using a relative or future date in example.

The hardcoded date 2024-12-25 is in the past. While this is just an example, consider using a comment or a more generic pattern to avoid confusion.

💡 Suggested improvement
     // Wait until specific date
-    await wait.until({ date: new Date("2024-12-25") });
+    await wait.until({ date: new Date("2025-12-25") }); // Example: wait until next Christmas
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 839d5e8 and 5f35578.

📒 Files selected for processing (11)
  • .claude/skills/trigger-dev-tasks/SKILL.md
  • .claude/skills/trigger-dev-tasks/advanced-tasks.md
  • .claude/skills/trigger-dev-tasks/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/config.md
  • .claude/skills/trigger-dev-tasks/realtime.md
  • .claude/skills/trigger-dev-tasks/scheduled-tasks.md
  • .gitignore
  • CLAUDE.md
  • rules/4.3.0/advanced-tasks.md
  • rules/4.3.0/basic-tasks.md
  • rules/manifest.json
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,jsx,tsx,json,md,css,scss}

📄 CodeRabbit inference engine (AGENTS.md)

Format code using Prettier

Files:

  • rules/4.3.0/basic-tasks.md
  • CLAUDE.md
  • rules/manifest.json
  • rules/4.3.0/advanced-tasks.md
🧠 Learnings (41)
📓 Common learnings
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `task()` function from `trigger.dev/sdk/v3` to define tasks with id and run properties
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `schemaTask()` from `trigger.dev/sdk/v3` with Zod schema for payload validation
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `trigger.dev/sdk/v3` for all imports in Trigger.dev tasks
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Configure Trigger.dev project in `trigger.config.ts` using `defineConfig()` with project ref and task directories
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use logger methods (debug, log, info, warn, error) from `trigger.dev/sdk/v3` for structured logging in tasks
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Export tasks with unique IDs within the project to enable proper task discovery and execution
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `schedules.task()` for scheduled/cron tasks instead of regular `task()`
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Attach metadata to task runs using the metadata option when triggering, and access/update it inside runs using metadata functions
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Generate example payloads for tasks when possible
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `.withStreams()` to subscribe to realtime streams from task metadata in addition to run changes

Applied to files:

  • .claude/skills/trigger-dev-tasks/realtime.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Subscribe to run updates using `runs.subscribeToRun()` for realtime monitoring of task execution

Applied to files:

  • .claude/skills/trigger-dev-tasks/realtime.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `task()` function from `trigger.dev/sdk/v3` to define tasks with id and run properties

Applied to files:

  • .claude/skills/trigger-dev-tasks/realtime.md
  • rules/4.3.0/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/config.md
  • CLAUDE.md
  • .claude/skills/trigger-dev-tasks/scheduled-tasks.md
  • .claude/skills/trigger-dev-tasks/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/SKILL.md
  • rules/manifest.json
  • .claude/skills/trigger-dev-tasks/advanced-tasks.md
  • rules/4.3.0/advanced-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Attach metadata to task runs using the metadata option when triggering, and access/update it inside runs using metadata functions

Applied to files:

  • .claude/skills/trigger-dev-tasks/realtime.md
  • .claude/skills/trigger-dev-tasks/config.md
  • .claude/skills/trigger-dev-tasks/scheduled-tasks.md
  • .claude/skills/trigger-dev-tasks/SKILL.md
  • .claude/skills/trigger-dev-tasks/advanced-tasks.md
  • rules/4.3.0/advanced-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `trigger.dev/sdk/v3` for all imports in Trigger.dev tasks

Applied to files:

  • .claude/skills/trigger-dev-tasks/realtime.md
  • rules/4.3.0/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/config.md
  • CLAUDE.md
  • .claude/skills/trigger-dev-tasks/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/SKILL.md
  • rules/manifest.json
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `tasks.trigger()` with type-only imports to trigger tasks from backend code without importing the task implementation

Applied to files:

  • .claude/skills/trigger-dev-tasks/realtime.md
  • rules/4.3.0/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/scheduled-tasks.md
  • .claude/skills/trigger-dev-tasks/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/SKILL.md
  • rules/4.3.0/advanced-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use metadata methods (set, del, replace, append, remove, increment, decrement, stream, flush) to update metadata during task execution

Applied to files:

  • .claude/skills/trigger-dev-tasks/realtime.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `runs.subscribeToBatch()` to subscribe to changes for all runs in a batch

Applied to files:

  • .claude/skills/trigger-dev-tasks/realtime.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Generate example payloads for tasks when possible

Applied to files:

  • .claude/skills/trigger-dev-tasks/realtime.md
  • rules/4.3.0/basic-tasks.md
  • CLAUDE.md
  • .claude/skills/trigger-dev-tasks/scheduled-tasks.md
  • .claude/skills/trigger-dev-tasks/SKILL.md
  • rules/manifest.json
  • .claude/skills/trigger-dev-tasks/advanced-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `schemaTask()` from `trigger.dev/sdk/v3` with Zod schema for payload validation

Applied to files:

  • .claude/skills/trigger-dev-tasks/realtime.md
  • rules/4.3.0/basic-tasks.md
  • CLAUDE.md
  • .claude/skills/trigger-dev-tasks/scheduled-tasks.md
  • .claude/skills/trigger-dev-tasks/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/SKILL.md
  • rules/manifest.json
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Use `useRun`, `useRealtimeRun` and other SWR/realtime hooks from `trigger.dev/react-hooks` for data fetching

Applied to files:

  • .claude/skills/trigger-dev-tasks/realtime.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `runs.subscribeToRunsWithTag()` to subscribe to all runs with a specific tag

Applied to files:

  • .claude/skills/trigger-dev-tasks/realtime.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Use `trigger.dev/react-hooks` package for realtime subscriptions in React components

Applied to files:

  • .claude/skills/trigger-dev-tasks/realtime.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use lifecycle functions (init, cleanup, onStart, onSuccess, onFailure, handleError) for task event handling

Applied to files:

  • .claude/skills/trigger-dev-tasks/realtime.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `tasks.batchTrigger()` to trigger multiple runs of a single task with different payloads

Applied to files:

  • rules/4.3.0/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/scheduled-tasks.md
  • .claude/skills/trigger-dev-tasks/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/SKILL.md
  • .claude/skills/trigger-dev-tasks/advanced-tasks.md
  • rules/4.3.0/advanced-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Export tasks with unique IDs within the project to enable proper task discovery and execution

Applied to files:

  • rules/4.3.0/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/config.md
  • CLAUDE.md
  • .claude/skills/trigger-dev-tasks/scheduled-tasks.md
  • .claude/skills/trigger-dev-tasks/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/SKILL.md
  • rules/manifest.json
  • .claude/skills/trigger-dev-tasks/advanced-tasks.md
  • rules/4.3.0/advanced-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `batch.triggerByTaskAndWait()` to batch trigger tasks by passing task instances and wait for results

Applied to files:

  • rules/4.3.0/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/SKILL.md
  • .claude/skills/trigger-dev-tasks/advanced-tasks.md
  • rules/4.3.0/advanced-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `batch.triggerByTask()` to batch trigger tasks by passing task instances for static task sets

Applied to files:

  • rules/4.3.0/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/scheduled-tasks.md
  • .claude/skills/trigger-dev-tasks/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/SKILL.md
  • .claude/skills/trigger-dev-tasks/advanced-tasks.md
  • rules/4.3.0/advanced-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `schedules.task()` for scheduled/cron tasks instead of regular `task()`

Applied to files:

  • rules/4.3.0/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/scheduled-tasks.md
  • .claude/skills/trigger-dev-tasks/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/SKILL.md
  • rules/4.3.0/advanced-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `yourTask.batchTriggerAndWait()` to batch trigger tasks and wait for all results from a parent task

Applied to files:

  • rules/4.3.0/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/SKILL.md
  • .claude/skills/trigger-dev-tasks/advanced-tasks.md
  • rules/4.3.0/advanced-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `yourTask.trigger()` to trigger a task from inside another task with specified payload

Applied to files:

  • rules/4.3.0/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/scheduled-tasks.md
  • .claude/skills/trigger-dev-tasks/basic-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Never use `client.defineJob` - it is deprecated and will break the application

Applied to files:

  • rules/4.3.0/basic-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Use build extensions in trigger.config.ts (additionalFiles, additionalPackages, aptGet, prismaExtension, etc.) to customize the build

Applied to files:

  • .claude/skills/trigger-dev-tasks/config.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Configure build process in trigger.config.ts using `build` object with external packages, extensions, and JSX settings

Applied to files:

  • .claude/skills/trigger-dev-tasks/config.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Configure OpenTelemetry instrumentations and exporters in trigger.config.ts for enhanced logging

Applied to files:

  • .claude/skills/trigger-dev-tasks/config.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Configure Trigger.dev project in `trigger.config.ts` using `defineConfig()` with project ref and task directories

Applied to files:

  • .claude/skills/trigger-dev-tasks/config.md
  • CLAUDE.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Define global lifecycle functions (onStart, onSuccess, onFailure) in trigger.config.ts to apply to all tasks

Applied to files:

  • .claude/skills/trigger-dev-tasks/config.md
📚 Learning: 2025-11-27T16:26:58.661Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-11-27T16:26:58.661Z
Learning: Applies to apps/webapp/**/*.{ts,tsx} : Follow the Remix 2.1.0 and Express server conventions when updating the main trigger.dev webapp

Applied to files:

  • .claude/skills/trigger-dev-tasks/config.md
  • CLAUDE.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Specify task locations in trigger.config.ts using the `dirs` array, with automatic exclusion of .test and .spec files

Applied to files:

  • .claude/skills/trigger-dev-tasks/config.md
📚 Learning: 2025-11-27T16:26:47.602Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/repo.mdc:0-0
Timestamp: 2025-11-27T16:26:47.602Z
Learning: Refer to the monorepo structure documentation at repo.md before making changes or adding new files

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Run `npx trigger.devlatest init` to initialize a Trigger.dev project

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use logger methods (debug, log, info, warn, error) from `trigger.dev/sdk/v3` for structured logging in tasks

Applied to files:

  • CLAUDE.md
  • .claude/skills/trigger-dev-tasks/SKILL.md
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to packages/trigger-sdk/**/*.{ts,tsx} : In the Trigger.dev SDK (packages/trigger-sdk), prefer isomorphic code like fetch and ReadableStream instead of Node.js-specific code

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Attach cron schedules declaratively using the `cron` property or imperatively using `schedules.create()`

Applied to files:

  • .claude/skills/trigger-dev-tasks/scheduled-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `yourTask.batchTrigger()` to trigger multiple runs of a task from inside another task

Applied to files:

  • .claude/skills/trigger-dev-tasks/scheduled-tasks.md
  • .claude/skills/trigger-dev-tasks/basic-tasks.md
  • .claude/skills/trigger-dev-tasks/SKILL.md
  • .claude/skills/trigger-dev-tasks/advanced-tasks.md
  • rules/4.3.0/advanced-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `yourTask.triggerAndWait()` to trigger a task and wait for its result from a parent task

Applied to files:

  • .claude/skills/trigger-dev-tasks/basic-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `idempotencyKeys.create()` to create idempotency keys for preventing duplicate task executions

Applied to files:

  • .claude/skills/trigger-dev-tasks/SKILL.md
  • .claude/skills/trigger-dev-tasks/advanced-tasks.md
  • rules/4.3.0/advanced-tasks.md
📚 Learning: 2025-06-06T16:54:23.316Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 2155
File: docs/docs.json:179-183
Timestamp: 2025-06-06T16:54:23.316Z
Learning: In the docs.json configuration for the Trigger.dev documentation (Mintlify system), both "tags": ["v4"] and "tag": "v4" properties can be used together and work correctly, even though this behavior is undocumented and may not work in local development environments.

Applied to files:

  • rules/manifest.json
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Export every task, including subtasks

Applied to files:

  • rules/manifest.json
  • .claude/skills/trigger-dev-tasks/advanced-tasks.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `batch.trigger()` to trigger multiple different tasks at once from backend code

Applied to files:

  • .claude/skills/trigger-dev-tasks/advanced-tasks.md
  • rules/4.3.0/advanced-tasks.md
🪛 LanguageTool
.claude/skills/trigger-dev-tasks/config.md

[grammar] ~341-~341: Ensure spelling is correct
Context: ...nal packages**: Add modules with native addons to the build.external array - **Envir...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

CLAUDE.md

[grammar] ~93-~93: Ensure spelling is correct
Context: ...dev/core`): Shared code between SDK and webapp. Import subpaths only (never root). - *...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~109-~109: Ensure spelling is correct
Context: ...ges to the CLI, SDK, core packages, and webapp before submitting PRs. ## Webapp Devel...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~111-~111: Ensure spelling is correct
Context: ..., and webapp before submitting PRs. ## Webapp Development ### Key Locations - Trigg...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~160-~160: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...CONCURRENTLY** to avoid table locks - **CONCURRENTLY indexes must be in their own separate m...

(ADVERB_REPETITION_PREMIUM)

🪛 markdownlint-cli2 (0.18.1)
.claude/skills/trigger-dev-tasks/realtime.md

3-3: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

.claude/skills/trigger-dev-tasks/scheduled-tasks.md

3-3: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

rules/4.3.0/advanced-tasks.md

3-3: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (24)
  • GitHub Check: Cursor Bugbot
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (26)
.gitignore (1)

64-64: LGTM! Correctly narrows the ignore pattern to support versioned Claude skills.

The change from ignoring the entire .claude directory to only ignoring **/.claude/settings.local.json appropriately allows the Claude skills documentation (.claude/skills/trigger-dev-tasks/) to be version-controlled while keeping local user settings private.

.claude/skills/trigger-dev-tasks/realtime.md (1)

1-244: LGTM! Comprehensive realtime documentation.

The documentation provides clear, well-structured guidance on Trigger.dev's realtime features. Code examples are accurate and demonstrate proper usage patterns including authentication, backend subscriptions, React hooks, and stream handling. The progressive organization from core concepts through backend and frontend usage makes this accessible.

.claude/skills/trigger-dev-tasks/scheduled-tasks.md (1)

1-113: LGTM! Clear and accurate scheduled tasks documentation.

The documentation effectively covers both declarative and imperative scheduling approaches. The multi-tenant example (lines 59-85) demonstrates practical real-world usage, and the cron syntax reference is helpful. All code examples follow correct patterns and SDK usage.

.claude/skills/trigger-dev-tasks/SKILL.md (2)

13-13: Verify SDK import path change.

Line 13 states to use @trigger.dev/sdk and never use @trigger.dev/sdk/v3, which contradicts earlier learnings that specified using trigger.dev/sdk/v3 for imports. Given this PR introduces version 4.3.0 documentation, this likely reflects an intentional SDK evolution where the /v3 path is deprecated.

Please confirm this import path change is correct and aligns with the latest SDK version.

Based on learnings, which previously indicated v3 imports.


20-200: LGTM! Excellent skill documentation with comprehensive patterns.

The skill definition provides clear, actionable guidance for Trigger.dev task development. Strong points:

  • Critical rules section (lines 12-16) sets clear boundaries
  • Progressive examples from basic to advanced patterns
  • Idempotency guidance (lines 91-110) addresses critical reliability concerns
  • Debouncing examples (lines 131-154) demonstrate practical consolidation patterns
  • Design principles (lines 183-191) provide sound architectural advice
  • Reference documentation structure promotes discoverability

The code examples are accurate, well-typed, and demonstrate best practices.

.claude/skills/trigger-dev-tasks/basic-tasks.md (1)

1-199: Excellent documentation structure and clarity.

This basic tasks documentation is well-organized and comprehensive. The emphasis on using the v4 SDK (@trigger.dev/sdk), clear explanations of Result handling, debouncing modes, and explicit warnings about deprecated patterns and Promise.all usage are particularly valuable for developers.

The code examples are accurate and demonstrate best practices for the v4 SDK.

rules/4.3.0/advanced-tasks.md (1)

1-485: Comprehensive and well-structured advanced documentation.

This advanced tasks guide provides excellent coverage of complex patterns including batch triggering v2, debouncing strategies, concurrency control, and machine presets. The rate limit tables, machine specifications, and best practices section are particularly valuable reference material.

The code examples accurately demonstrate v4 SDK patterns and are consistent with the basic-tasks documentation.

.claude/skills/trigger-dev-tasks/config.md (1)

1-346: Excellent comprehensive configuration guide.

This configuration documentation provides thorough coverage of trigger.config.ts setup and build extensions. The organization by extension category (Database, Browser Automation, Media Processing, etc.), common combination examples, and clear warnings about usage (e.g., additionalPackages for CLI tools only, extensions affecting deployment not local dev) make this a valuable reference.

The code examples are accurate and demonstrate proper usage of the v4 configuration API.

CLAUDE.md (5)

1-29: LGTM! Well-structured development guidance.

The essential commands section provides clear, actionable instructions for setting up and running the monorepo. The filter patterns for Turborepo are correctly specified.


31-68: LGTM! Clear testing philosophy and patterns.

The testcontainers approach with redisTest, postgresTest, and containerTest helpers provides a clean, consistent testing pattern that avoids brittle mocks.


82-134: LGTM! Comprehensive architecture overview.

The separation between public and internal packages is clearly documented. The testable code pattern (separating realtimeClient.server.ts from realtimeClientGlobal.server.ts) is a sound approach for dependency injection.


157-161: Good emphasis on concurrent index creation.

The rule requiring CONCURRENTLY indexes to be in separate migration files is critical for avoiding table locks in production. This is a well-documented constraint.


201-218: LGTM! Clear SDK versioning strategy.

The approach of creating new version directories with only changed files and updating manifest.json to reference previous versions for unchanged files is maintainable and reduces duplication.

.claude/skills/trigger-dev-tasks/advanced-tasks.md (6)

1-38: LGTM! Comprehensive tags documentation.

The tags section clearly documents the 10 tag limit, character constraints, and the important note that tags don't propagate to child tasks. The example demonstrates both runtime tag addition and trigger-time tagging.


39-105: LGTM! Well-documented batch triggering v2 feature.

The limits, rate limiting tiers, and concurrent batch processing constraints are clearly specified. The per-item options example demonstrates the flexibility of the new batch API.


107-177: LGTM! Clear debouncing documentation.

The distinction between leading and trailing modes is well-explained with practical examples. The note about idempotency keys taking precedence over debounce settings is an important edge case to document.


221-269: LGTM! Comprehensive error handling patterns.

The catchError hook with AbortTaskRunError for non-retryable errors, combined with retry.onThrow and retry.fetch for operation-level retries, provides a complete error handling strategy.


305-400: LGTM! Thorough idempotency and metadata patterns.

The idempotency examples cover both key-based and payload-hash-based approaches. The metadata chaining API is intuitive, and documenting parent/root metadata access from child tasks is valuable.


444-471: LGTM! Clear hidden tasks pattern.

The non-exported internalProcessor demonstrates how to create internal-only tasks that aren't discoverable externally but can be used within the task graph.

rules/manifest.json (2)

4-4: Version 4.2.0 is skipped.

The versioning jumps from 4.1.0 to 4.3.0. If this is intentional (e.g., 4.2.0 was an internal release), no action needed. Otherwise, consider using 4.2.0 for consistency.


104-152: All 4.3.0 rule files verified.

Both new files (basic-tasks.md and advanced-tasks.md) exist at rules/4.3.0/. All reused files from previous versions are also in place. The manifest.json is properly formatted with valid JSON structure.

rules/4.3.0/basic-tasks.md (5)

1-25: LGTM! Clear basic task template.

The basic task example includes retry configuration with sensible defaults and demonstrates the essential pattern for task definition.


51-66: LGTM! Correct type-only import pattern.

Using import type { processData } for backend triggering avoids importing task implementation code and potential circular dependencies. The batch trigger limits (1,000 items, 3MB per payload) are correctly documented.


101-143: LGTM! Critical Result handling pattern.

The distinction between the Result object (with ok, output, error) and the direct task output is well-documented. The unwrap() convenience method and proper error handling patterns are clearly demonstrated.


147-178: LGTM! Clear wait API documentation.

The wait API examples cover duration-based, date-based, and token-based waits. The warning against wrapping waits in Promise.all is essential for correct task execution.


187-199: LGTM! Clear deprecation warning.

The explicit warning against client.defineJob with "BREAKS APPLICATION" comment effectively communicates the severity of using the deprecated v2 pattern.

…nce project together and trigger tasks and test them
@claude
Copy link

claude bot commented Jan 12, 2026

PR Review: Add CLAUDE.md and Claude skill for Trigger.dev tasks

This PR adds comprehensive documentation for Claude Code integration and introduces the 4.3.0 ruleset with batch trigger v2 and debouncing features. Overall, this is a well-structured and valuable addition to the codebase.

Summary

The PR includes:

  • CLAUDE.md - Repository-level guidance for Claude Code
  • .claude/skills/trigger-dev-tasks/ - Claude Code skill for Trigger.dev task expertise
  • rules/4.3.0/ - Updated SDK documentation with new features
  • Updated manifest.json to register the new version

Code Quality & Best Practices

Strengths:

  • Documentation is well-organized with clear examples and practical code snippets
  • The CLAUDE.md file provides excellent guidance for repository navigation, testing patterns, and development workflows
  • The skill structure follows the recommended pattern with a main SKILL.md and topic-specific reference files
  • Code examples are consistent and follow current SDK patterns

Suggestions:

  1. Minor inconsistency in basic-tasks.md headers: The 4.0.0 version uses (v4) in the title while the new 4.3.0 version uses the same (v4). Consider using (v4.3) for clarity:

    # Trigger.dev Basic Tasks (v4.3)
  2. Scheduled Task example removed from basic-tasks.md: The 4.0.0 version includes a scheduled task example in basic-tasks.md, but the 4.3.0 version removes it. This seems intentional since there's a dedicated scheduled-tasks.md, but worth confirming this is the desired behavior.


Documentation Accuracy

Verified correct:

  • Batch trigger v2 limits (1,000 items, 3MB per payload)
  • Debouncing with leading/trailing modes
  • Machine presets and specifications
  • SDK import patterns (@trigger.dev/sdk, never @trigger.dev/sdk/v3)

Minor items:

  1. Rate limiting table accuracy: The rate limiting table in advanced-tasks.md should be verified against current production limits:

    | Free | 1,200 runs | 100 runs/10 sec |
    | Hobby | 5,000 runs | 500 runs/5 sec |
  2. config.md truncation: The config.md file appears to be properly included in the skill but the full diff was truncated in my review - I verified it exists and looks complete.


Potential Issues

  1. .gitignore change: The change from .claude to **/.claude/settings.local.json is a good improvement - it allows the skill files to be committed while still ignoring user-specific settings. This is the correct pattern.

  2. Skill-to-rules synchronization: The CLAUDE.md correctly notes:

    Keep the skill in sync with the latest rules version when SDK features change.

    This is good guidance. The current skill files appear to be in sync with 4.3.0.

  3. No duplication concerns: While there's content overlap between .claude/skills/trigger-dev-tasks/*.md and rules/4.3.0/*.md, this is intentional - the skill files are for Claude Code users of this repository, while the rules files are distributed to SDK users.


Test Coverage

This PR is documentation-only, so no new tests are required. However, the CLAUDE.md includes excellent testing guidance:

  • Testcontainers patterns with redisTest, postgresTest, containerTest
  • Clear instructions to never mock anything
  • Local task testing workflow documentation

Security Considerations

No security concerns identified. The documentation:

  • Uses appropriate patterns for secrets (recommends syncEnvVars extension)
  • Doesn't expose any sensitive information
  • Follows secure coding practices in examples

Performance Considerations

Not applicable for documentation changes.


Recommendations

  1. Consider adding version tagging: The manifest.json correctly increments to 4.3.0, but consider adding a note in the CLAUDE.md about when to bump rule versions.

  2. Token counts: The manifest.json includes token counts for each rule file. Verify these are accurate:

    • basic-tasks.md: 1400 tokens (up from 1200 in 4.0.0) ✓
    • advanced-tasks.md: 3500 tokens (up from 3000 in 4.0.0) ✓
  3. Optional enhancement: The Local Task Testing Workflow section in CLAUDE.md references MCP tools (mcp__trigger__*). Consider adding a note that these require the Trigger.dev MCP server to be configured.


Verdict

Approve with minor suggestions. This is a high-quality documentation PR that will significantly improve the Claude Code experience for developers working on this repository. The new 4.3.0 ruleset properly documents batch trigger v2 and debouncing features, and the skill provides excellent guidance for task development.

The documentation is accurate, well-organized, and follows best practices for Claude Code integration.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
CLAUDE.md (1)

265-284: Consider adding a language identifier to the fenced code block.

The MCP tool examples are in a fenced code block without a language identifier. Consider adding a generic identifier like text or plaintext to satisfy markdown linters while keeping the content clear.

📝 Proposed fix
-```
+```text
 # Get current worker and registered tasks
 mcp__trigger__get_current_worker(projectRef: "proj_rrkpdguyagvsoktglnod", environment: "dev")
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f35578 and a245e6a.

📒 Files selected for processing (1)
  • CLAUDE.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,jsx,tsx,json,md,css,scss}

📄 CodeRabbit inference engine (AGENTS.md)

Format code using Prettier

Files:

  • CLAUDE.md
🧠 Learnings (12)
📓 Common learnings
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `task()` function from `trigger.dev/sdk/v3` to define tasks with id and run properties
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `trigger.dev/sdk/v3` for all imports in Trigger.dev tasks
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `schemaTask()` from `trigger.dev/sdk/v3` with Zod schema for payload validation
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use logger methods (debug, log, info, warn, error) from `trigger.dev/sdk/v3` for structured logging in tasks
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Configure Trigger.dev project in `trigger.config.ts` using `defineConfig()` with project ref and task directories
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 2155
File: docs/docs.json:179-183
Timestamp: 2025-06-06T16:54:23.316Z
Learning: In the docs.json configuration for the Trigger.dev documentation (Mintlify system), both "tags": ["v4"] and "tag": "v4" properties can be used together and work correctly, even though this behavior is undocumented and may not work in local development environments.
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Use build extensions in trigger.config.ts (additionalFiles, additionalPackages, aptGet, prismaExtension, etc.) to customize the build
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Attach metadata to task runs using the metadata option when triggering, and access/update it inside runs using metadata functions
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 2195
File: hosting/k8s/helm/templates/extra-manifests.yaml:1-4
Timestamp: 2025-06-25T13:18:04.827Z
Learning: In the Trigger.dev v4 Helm chart, the user prefers to rely on documentation and examples in values files rather than implementing defensive coding in templates, particularly for features like extraManifests where proper usage is documented.
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use metadata methods (set, del, replace, append, remove, increment, decrement, stream, flush) to update metadata during task execution
📚 Learning: 2025-11-27T16:26:47.602Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/repo.mdc:0-0
Timestamp: 2025-11-27T16:26:47.602Z
Learning: Refer to the monorepo structure documentation at repo.md before making changes or adding new files

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `task()` function from `trigger.dev/sdk/v3` to define tasks with id and run properties

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Configure Trigger.dev project in `trigger.config.ts` using `defineConfig()` with project ref and task directories

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Export tasks with unique IDs within the project to enable proper task discovery and execution

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `schemaTask()` from `trigger.dev/sdk/v3` with Zod schema for payload validation

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `trigger.dev/sdk/v3` for all imports in Trigger.dev tasks

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Attach metadata to task runs using the metadata option when triggering, and access/update it inside runs using metadata functions

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use logger methods (debug, log, info, warn, error) from `trigger.dev/sdk/v3` for structured logging in tasks

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Generate example payloads for tasks when possible

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Subscribe to run updates using `runs.subscribeToRun()` for realtime monitoring of task execution

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `tasks.batchTrigger()` to trigger multiple runs of a single task with different payloads

Applied to files:

  • CLAUDE.md
🪛 LanguageTool
CLAUDE.md

[grammar] ~93-~93: Ensure spelling is correct
Context: ...dev/core`): Shared code between SDK and webapp. Import subpaths only (never root). - *...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~109-~109: Ensure spelling is correct
Context: ...ges to the CLI, SDK, core packages, and webapp before submitting PRs. ## Webapp Devel...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~111-~111: Ensure spelling is correct
Context: ..., and webapp before submitting PRs. ## Webapp Development ### Key Locations - Trigg...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~160-~160: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...CONCURRENTLY** to avoid table locks - **CONCURRENTLY indexes must be in their own separate m...

(ADVERB_REPETITION_PREMIUM)


[grammar] ~237-~237: Ensure spelling is correct
Context: ...workflow enables Claude Code to run the webapp and trigger dev simultaneously, trigger...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~246-~246: Ensure spelling is correct
Context: ...npm run dev --filter webapp Verify webapp is running: bash curl -s http://loc...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.18.1)
CLAUDE.md

265-265: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


290-290: Bare URL used

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (25)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: Cursor Bugbot
  • GitHub Check: claude-review
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (7)
CLAUDE.md (7)

30-68: LGTM: Clear testing guidance with testcontainers pattern.

The testing approach is well-documented with concrete examples. The directive to avoid mocking in favor of testcontainers provides a consistent testing strategy.


124-131: LGTM: Excellent testability pattern for environment configuration.

The guidance to avoid importing env.server.ts in test files and instead pass configuration as options is a solid architectural practice that promotes testability.


136-156: LGTM: Valuable migration cleanup guidance.

The detailed instructions for removing extraneous changes from generated migrations (lines 144-151) capture important tribal knowledge about Prisma migration quirks.


157-161: LGTM: Critical index migration safety rule.

The emphasis on CONCURRENTLY and separate migration files is appropriate - this prevents production table locks. The repetition flagged by static analysis is intentional emphasis for this critical rule.


200-218: LGTM: Clear SDK documentation versioning strategy.

The incremental versioning approach (creating new version directories with only changed files) is efficient and maintains a clear history of SDK feature evolution.


235-293: LGTM: Comprehensive local testing workflow.

The step-by-step workflow for running webapp and trigger dev in the background, then using MCP tools to trigger and monitor tasks is thorough and actionable. This provides Claude Code with a clear path for end-to-end local testing.


86-86: Version numbers in architecture documentation are accurate.

The documented Remix 2.1.0 (line 86) and Prisma 6.14.0 (line 100) match the actual versions in apps/webapp/package.json and internal-packages/database/package.json respectively. No updates needed.

@claude
Copy link

claude bot commented Jan 12, 2026

PR Review: Add CLAUDE.md and Claude Code Skill

This PR adds comprehensive Claude Code guidance and a skill for writing Trigger.dev tasks. Overall, this is excellent documentation work that will help both Claude Code users and developers working with the codebase.

Strengths

  1. Well-structured CLAUDE.md: The file provides clear, actionable guidance covering build commands, testing conventions, architecture overview, and database migrations. The testcontainers pattern examples are particularly useful.

  2. Comprehensive skill documentation: The trigger-dev-tasks skill files cover all major Trigger.dev features with practical code examples - basic tasks, advanced patterns, scheduling, realtime, and configuration.

  3. Good versioning strategy: The manifest.json properly references files across versions (e.g., 4.3.0 reuses 4.1.0/config.md and 4.0.0/scheduled-tasks.md), following the documented pattern of "only create new version directories for files that changed."

  4. Critical warnings emphasized: Important patterns like "Never mock anything," "Never use @trigger.dev/sdk/v3," and "Never wrap triggerAndWait in Promise.all" are prominently highlighted.

Suggestions & Minor Issues

  1. Gitignore change reversal: The previous gitignore had .claude fully ignored. This PR changes it to only ignore .claude/settings.local.json. This is intentional to check in the skill files, but worth confirming this is the desired behavior for all .claude contents.

  2. Token count accuracy: The manifest.json shows updated token counts for 4.3.0 (basic: 1400, advanced: 3500). It would be good to verify these are accurate for the new content sizes.

  3. Skill SKILL.md allowed-tools: The skill declares allowed-tools: Read, Write, Edit, Glob, Grep, Bash. Consider if Task tool should be included for spawning subagents if needed during complex task creation.

  4. Missing rules/4.3.0/config.md reference: The manifest.json for 4.3.0 points to 4.1.0/config.md rather than 4.3.0/config.md. If there's a 4.3.0-specific config file that should exist, it's missing. If intentional (no config changes in 4.3.0), this is fine.

  5. Minor duplication: Content in .claude/skills/trigger-dev-tasks/ files largely mirrors rules/4.3.0/ files. This is likely intentional (skill for Claude Code, rules for SDK installer), but worth noting for future maintenance.

  6. Example date in basic-tasks.md: Line with await wait.until({ date: new Date("2024-12-25") }) uses a past date. Consider using a relative example or future date.

Code Quality

  • All markdown files are well-formatted
  • Code examples use consistent TypeScript patterns
  • Examples properly show both success and error handling paths
  • Good use of informative comments in code samples

Security

  • No security concerns - this is documentation-only with no executable code changes

Test Coverage

  • N/A for documentation files

Verdict: Approve. This is high-quality documentation that will significantly improve the Claude Code experience for Trigger.dev developers. The minor suggestions above are non-blocking.

@ericallam ericallam merged commit 2c30c2d into main Jan 12, 2026
27 of 31 checks passed
@ericallam ericallam deleted the add-claude-md branch January 12, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants