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: 5f35578

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

This pull request introduces comprehensive documentation and configuration for Trigger.dev task development. It adds new skill documentation files in .claude/skills/trigger-dev-tasks/ covering basic tasks, advanced patterns, configuration, realtime features, and scheduled tasks. Parallel documentation files are added under rules/4.3.0/ for SDK reference purposes. A new CLAUDE.md file provides monorepo development guidance for contributors. Configuration changes include updating the manifest version from 4.1.0 to 4.3.0 with new version entries, and modifying .gitignore to specifically exclude local Claude settings rather than the entire .claude directory.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main changes: adding CLAUDE.md, a Claude skill for Trigger.dev tasks, and a new SDK rule set version 4.3.0.
Description check ✅ Passed The description covers the three main objectives and aligns with the PR changes, though it omits some template sections like Testing and Changelog details.
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.


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.

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.

2 participants