trigger-cost-savings — Claude Code skill: audit Trigger.dev spend
Reads your Trigger.dev tasks, schedules and runs, then points at what costs money: oversized machines, wasted retries, crons firing too often.
npx skills add triggerdotdev/skills --skill trigger-cost-savings -a claude-codeWhat trigger-cost-savings does
The skill runs in two passes. First it scans source files for tasks pinned to large-1x or large-2x without an obvious reason, missing maxDuration, maxAttempts above 5, triggers with no debounce, payment or critical tasks without idempotency keys, setTimeout/setInterval loops standing in for wait.for(), and sequential triggerAndWait() calls that could be batchTriggerAndWait(). Second, with the Trigger.dev MCP server connected, it looks at live runs through list_runs, get_run_details and get_current_worker: expensive tasks over a period, failures split into transient and permanent, machine utilisation, schedule frequency.
What comes back is a prioritised report with estimated impact — what to change, to what, and which line of code it touches. Fixes arrive as concrete values, like machine: { preset: "small-2x" } in place of large-2x, or debounce: { key: ..., delay: "5s" }.
Live run analysis needs the MCP server. Without those tools the skill tells you to install them with npx trigger.dev@latest install-mcp and falls back to static source review; it will not invent run data. One more thing worth knowing: the skill ships inside @trigger.dev/sdk and is read straight from node_modules, so its advice tracks the SDK version you actually have installed. Update the package and the recommendations update with it.
What it helps with
- spot tasks burning budget on oversized machines
- add
maxDurationwhere no timeout is set - cut retries on permanent failures with
AbortTaskRunError - replace sleep loops with
wait.for()so waiting stops costing compute - consolidate bursty triggers into single runs with debounce
Example prompts for the agent
- analyze my Trigger.dev tasks and tell me where I can cut spend
- why did my run costs go up? check the live runs via MCP
- review my schedules and flag the crons that fire too often
How to install trigger-cost-savings
1Skills CLI (Vercel)
npx skills add triggerdotdev/skills --skill trigger-cost-savings -a claude-code2Manually: put the files in place
~/.claude/skills/trigger-cost-savings/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/trigger-cost-savings/
1Skills CLI (Vercel)
npx skills add triggerdotdev/skills --skill trigger-cost-savings -a codex2Manually: put the files in place
.agents/skills/trigger-cost-savings/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add triggerdotdev/skills --skill trigger-cost-savings -a cursor2Manually: put the files in place
.cursor/skills/trigger-cost-savings/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install triggerdotdev/skills trigger-cost-savings2Manually: put the files in place
.github/skills/trigger-cost-savings/SKILL.md1Skills CLI (Vercel)
npx skills add triggerdotdev/skills --skill trigger-cost-savings -a gemini-cli2Platform CLI
gemini skills install https://github.com/triggerdotdev/skills --path trigger-cost-savingsManually: put the files in place
.devin/skills/trigger-cost-savings/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add triggerdotdev/skills --skill trigger-cost-savings -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about trigger-cost-savings
How do I install trigger-cost-savings in Claude?
Run npx skills add triggerdotdev/skills --skill trigger-cost-savings -a claude-code. The skill lands at ~/.claude/skills/trigger-cost-savings/SKILL.md.
What does trigger-cost-savings do?
It pairs static analysis of your Trigger.dev task files with live run data and returns a cost report covering machine sizing, retries, debounce, idempotency, waits and schedule frequency.
What do I need for the run analysis?
The Trigger.dev MCP server with list_runs, get_run_details and get_current_worker. Without it only static source analysis works; install it with npx trigger.dev@latest install-mcp.