-
-
Notifications
You must be signed in to change notification settings - Fork 954
chore(claude): add CLAUDE.md and claude skill for writing trigger.dev tasks + add 4.3.0 rule set #2867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ericallam
commented
Jan 11, 2026
- 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
|
WalkthroughAdds 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)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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)
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. Comment |
PR Review: Add CLAUDE.md and Claude Code Skill for Writing Trigger.dev Tasks + Add 4.3.0 Rule SetThis 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: ✅ Strengths1. Excellent Documentation Quality
2. Well-Organized Skill Structure
3. Good Versioning Strategy
4. Valuable New Features Documented
📝 Suggestions for Improvement1. Minor Inconsistency in Line 3 says: But the 4.0.0 version says: Consider keeping the 2. Duplication Between Skill and Rules The files in
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. 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
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. The change from ignoring 🔒 Security ReviewNo security concerns identified. The documentation files contain only example code patterns without sensitive data. 🧪 Test CoverageThis PR adds documentation only - no code changes requiring tests. 📋 SummaryRecommendation: 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. |
Review CompleteYour review story is ready! Comment !reviewfast on this PR to re-generate the story. |
There was a problem hiding this 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 tasksCLAUDE.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 referencetrigger.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-25is 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
📒 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.gitignoreCLAUDE.mdrules/4.3.0/advanced-tasks.mdrules/4.3.0/basic-tasks.mdrules/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.mdCLAUDE.mdrules/manifest.jsonrules/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.mdrules/4.3.0/basic-tasks.md.claude/skills/trigger-dev-tasks/config.mdCLAUDE.md.claude/skills/trigger-dev-tasks/scheduled-tasks.md.claude/skills/trigger-dev-tasks/basic-tasks.md.claude/skills/trigger-dev-tasks/SKILL.mdrules/manifest.json.claude/skills/trigger-dev-tasks/advanced-tasks.mdrules/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.mdrules/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.mdrules/4.3.0/basic-tasks.md.claude/skills/trigger-dev-tasks/config.mdCLAUDE.md.claude/skills/trigger-dev-tasks/basic-tasks.md.claude/skills/trigger-dev-tasks/SKILL.mdrules/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.mdrules/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.mdrules/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.mdrules/4.3.0/basic-tasks.mdCLAUDE.md.claude/skills/trigger-dev-tasks/scheduled-tasks.md.claude/skills/trigger-dev-tasks/SKILL.mdrules/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.mdrules/4.3.0/basic-tasks.mdCLAUDE.md.claude/skills/trigger-dev-tasks/scheduled-tasks.md.claude/skills/trigger-dev-tasks/basic-tasks.md.claude/skills/trigger-dev-tasks/SKILL.mdrules/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.mdrules/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.mdCLAUDE.md.claude/skills/trigger-dev-tasks/scheduled-tasks.md.claude/skills/trigger-dev-tasks/basic-tasks.md.claude/skills/trigger-dev-tasks/SKILL.mdrules/manifest.json.claude/skills/trigger-dev-tasks/advanced-tasks.mdrules/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.mdrules/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.mdrules/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.mdrules/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.mdrules/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.mdCLAUDE.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.mdCLAUDE.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.mdrules/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.mdrules/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.mdrules/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
.claudedirectory to only ignoring**/.claude/settings.local.jsonappropriately 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/sdkand never use@trigger.dev/sdk/v3, which contradicts earlier learnings that specified usingtrigger.dev/sdk/v3for imports. Given this PR introduces version 4.3.0 documentation, this likely reflects an intentional SDK evolution where the/v3path 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, andcontainerTesthelpers 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.tsfromrealtimeClientGlobal.server.ts) is a sound approach for dependency injection.
157-161: Good emphasis on concurrent index creation.The rule requiring
CONCURRENTLYindexes 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.jsonto 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
catchErrorhook withAbortTaskRunErrorfor non-retryable errors, combined withretry.onThrowandretry.fetchfor 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
internalProcessordemonstrates 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.mdandadvanced-tasks.md) exist atrules/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
Resultobject (withok,output,error) and the direct task output is well-documented. Theunwrap()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.allis essential for correct task execution.
187-199: LGTM! Clear deprecation warning.The explicit warning against
client.defineJobwith "BREAKS APPLICATION" comment effectively communicates the severity of using the deprecated v2 pattern.
…nce project together and trigger tasks and test them
PR Review: Add CLAUDE.md and Claude skill for Trigger.dev tasksThis 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. SummaryThe PR includes:
Code Quality & Best PracticesStrengths:
Suggestions:
Documentation AccuracyVerified correct:
Minor items:
Potential Issues
Test CoverageThis PR is documentation-only, so no new tests are required. However, the CLAUDE.md includes excellent testing guidance:
Security ConsiderationsNo security concerns identified. The documentation:
Performance ConsiderationsNot applicable for documentation changes. Recommendations
VerdictApprove 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. |
There was a problem hiding this 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
textorplaintextto 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
📒 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.tsin 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.
PR Review: Add CLAUDE.md and Claude Code SkillThis 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
Suggestions & Minor Issues
Code Quality
Security
Test Coverage
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. |