> 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. Combines static source analysis with live run analysis via the Trigger.dev MCP tools (list_runs, get_run_details, get_current_worker).
npx skills add https://github.com/triggerdotdev/trigger.dev --skill trigger-cost-savings
Analyze task runs and configurations to find cost reduction opportunities. This skill pairs static source analysis with live run analysis via the Trigger.dev MCP server.
The authoritative, version-pinned cost guidance ships beside this skill. Read it first so your recommendations match the installed SDK version:
@trigger.dev/sdk/docs/how-to-reduce-your-spend.mdx — the canonical "reduce your spend" guide (machine sizing, idempotency de-dup, parallelism, retries, maxDuration, checkpointed waits, debounce).@trigger.dev/sdk/docs/machines.mdx, runs/max-duration.mdx, queue-concurrency.mdx, idempotency.mdx, triggering.mdx (debounce + batch), errors-retrying.mdx (AbortTaskRunError).Live run analysis needs the Trigger.dev MCP server. Verify these 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 they're not available, tell the user to install the MCP server:
npx trigger.dev@latest install-mcp
Without the MCP tools you can still do the static source analysis below; do not fabricate run data.
Scan task files for:
large-1x/large-2x without clear need.maxDuration — no execution-time limit (runaway-cost risk).maxAttempts > 5 without AbortTaskRunError for known-permanent failures.setTimeout/setInterval/sleep loops instead of wait.for().wait.for() under 5 seconds (not checkpointed, wastes compute).triggerAndWait() calls that could be batchTriggerAndWait().list_runs over period: "30d"/"7d"; find high total compute (duration × count), high failure rates, and large machines with short durations (over-provisioned).list_runs with status: "FAILED"/"CRASHED"; separate transient (retryable) from permanent; suggest AbortTaskRunError for the latter; estimate wasted retry compute.get_run_details on sample runs; if a large-2x task consistently runs in under a second, or is I/O-bound (API/DB), it's over-provisioned.get_current_worker to list cron patterns; flag schedules that are too frequent for their purpose.Present a prioritized report with estimated impact:
## Cost Optimization Report
### High impact
1. **Right-size `process-images`** — currently `large-2x`, average run 2s. `small-2x` could cut this task's cost by ~16x.
`machine: { preset: "small-2x" }` // was "large-2x"
### Medium impact
2. **Debounce `sync-user-data`** — 847 runs/day, often bursty.
`debounce: { key: \`user-${userId}\`, delay: "5s" }`
### Low impact / best practice
3. **Add `maxDuration` to `generate-report`** — no timeout configured.
`maxDuration: 300` // 5 minutes
Larger machines cost proportionally more per second of compute:
| Preset | vCPU | RAM | Relative cost |
|--------|------|-----|---------------|
| micro | 0.25 | 0.25 GB | 0.25x |
| small-1x | 0.5 | 0.5 GB | 1x (baseline) |
| small-2x | 1 | 1 GB | 2x |
| medium-1x | 1 | 2 GB | 2x |
| medium-2x | 2 | 4 GB | 4x |
| large-1x | 4 | 8 GB | 8x |
| large-2x | 8 | 16 GB | 16x |
small-1x is right for most tasks.AbortTaskRunError stops wasteful retries — don't pay to retry permanent failures.This skill is bundled inside @trigger.dev/sdk and read directly from node_modules, so it always matches your installed SDK version (see the adjacent package.json). The full cost documentation ships alongside it under @trigger.dev/sdk/docs/.
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
Intelligently organizes your files and folders across your computer by understanding context, finding duplicates, suggesting better structures, and automating cleanup tasks. Reduces cognitive load and keeps your digital workspace tidy without manual effort.
Generates creative domain name ideas for your project and checks availability across multiple TLDs (.com, .io, .dev, .ai, etc.). Saves hours of brainstorming and manual checking.
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Implements Manus-style file-based planning for complex tasks. Creates task_plan.md, findings.md, and progress.md. Use when starting complex multi-step tasks, research projects, or any task requiring >5 tool calls.
Creative research ideation and exploration. Use for open-ended brainstorming sessions, exploring interdisciplinary connections, challenging assumptions, or identifying research gaps. Best for early-stage research planning when you do not have specific observations yet. For formulating testable hypotheses from data use hypothesis-generation.
Comprehensive GitHub project management with swarm-coordinated issue tracking, project board automation, and sprint planning
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
Take triggerdotdev/trigger.dev-trigger-cost-savings from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npx.
Without those the skill loads but fails at the first command.