Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add triggerdotdev/skills --skill trigger-cost-savings -a claude-code
Open on GitHub

What 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 maxDuration where 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-code

2Manually: put the files in place

~/.claude/skills/trigger-cost-savings/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/trigger-cost-savings/

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.

Similar skills

All skills for DevOps and infrastructure →

From the same set4

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor