npx skills add ...
npx skills add triggerdotdev/skills --skill trigger-cost-savings
npx skills add triggerdotdev/skills --skill trigger-cost-savings
Analyze Trigger.dev tasks, schedules, and runs for cost optimization opportunities. Use when asked to reduce spend, optimize costs, audit usage, right-size machines, or review task efficiency. Requires Trigger.dev MCP tools for run analysis.
Analyze task runs and configurations to find cost reduction opportunities.
This skill requires the Trigger.dev MCP server to analyze live run data.
Before analysis, verify these MCP tools are available:
list_runs — list runs with filters (status, task, time period, machine size)get_run_details — get run logs, duration, and statusget_current_worker — get registered tasks and their configurationsIf these tools are not available, instruct the user:
Do NOT proceed with run analysis without MCP tools. You can still review source code for static issues (see Static Analysis below).
Before giving recommendations, fetch the latest guidance:
Use the fetched content to ensure recommendations are current. If the fetch fails, fall back to the reference documentation in references/cost-reduction.md.
Scan task files in the project for these issues:
large-1x or large-2x without clear needmaxDuration — tasks without execution time limits (runaway cost risk)maxAttempts > 5 without AbortTaskRunError for known failuressetTimeout/setInterval/sleep loops instead of wait.for()wait.for() with < 5 seconds (not checkpointed, wastes compute)triggerAndWait() calls that could use batchTriggerAndWait()Use MCP tools to analyze actual usage patterns:
Look for:
For high-failure tasks:
AbortTaskRunError for known non-retryable errorsCompare actual resource usage against machine preset:
large-2x consistently runs in < 1 second, it's over-provisionedFlag schedules that may be too frequent for their purpose.
Present findings as a prioritized list with estimated impact:
sync-user-data — 847 runs/day, often triggered in bursts.
maxDuration to generate-report — No timeout configured.