Agent Skillstriggerdotdev/trigger.dev › trigger-cost-savings

trigger-cost-savings

GitHub

分析 Trigger.dev 任务、调度及运行记录以优化成本。结合静态源码分析与 MCP 工具(如 list_runs)审计使用情况,提供机器配置调整、超时设置等降本建议。

packages/cli-v3/skills/trigger-cost-savings/SKILL.md triggerdotdev/trigger.dev

Trigger Scenarios

减少支出 优化成本 审计使用量 调整机器规格 审查任务效率

Install

npx skills add triggerdotdev/trigger.dev --skill trigger-cost-savings -g -y
More Options

Non-standard path

npx skills add https://github.com/triggerdotdev/trigger.dev/tree/main/packages/cli-v3/skills/trigger-cost-savings -g -y

Use without installing

npx skills use triggerdotdev/trigger.dev@trigger-cost-savings

指定 Agent (Claude Code)

npx skills add triggerdotdev/trigger.dev --skill trigger-cost-savings -a claude-code -g -y

安装 repo 全部 skill

npx skills add triggerdotdev/trigger.dev --all -g -y

预览 repo 内 skill

npx skills add triggerdotdev/trigger.dev --list

SKILL.md

Frontmatter
{
    "name": "trigger-cost-savings",
    "type": "core",
    "library": "trigger.dev",
    "description": "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).\n"
}

Trigger.dev Cost Savings Analysis

The full, version-pinned cost-audit workflow ships inside your installed @trigger.dev/sdk. Read it before giving recommendations so they match the SDK version in this project:

  • Skill: node_modules/@trigger.dev/sdk/skills/trigger-cost-savings/SKILL.md — the static-analysis checklist, the MCP run-analysis steps (list_runs, get_run_details, get_current_worker), the report format, and the machine-preset cost table.
  • Docs: the canonical guidance is bundled at node_modules/@trigger.dev/sdk/docs/how-to-reduce-your-spend.mdx, with supporting pages under node_modules/@trigger.dev/sdk/docs/ (machines.mdx, runs/max-duration.mdx, queue-concurrency.mdx, idempotency.mdx, triggering.mdx, errors-retrying.mdx).

If those paths don't exist, @trigger.dev/sdk isn't installed yet — install it first. In a non-hoisted layout, resolve the package with node -p "require.resolve('@trigger.dev/sdk/package.json')" and read skills/ + docs/ beside it.

Live run analysis needs the Trigger.dev MCP server (npx trigger.dev@latest install-mcp). Without it, do the static source analysis only — never fabricate run data.

Key principles

  • Waits > 5 seconds are free — checkpointed, no compute charge.
  • Start small, scale up — the default small-1x is right for most tasks; right-size down tasks stuck on large-* with short durations.
  • I/O-bound tasks don't need big machines — API calls and DB queries wait on the network.
  • Add maxDuration — cap runaway compute.
  • Debounce high-frequency triggers — consolidate bursts into single runs.
  • Idempotency keys prevent duplicate billed work.
  • AbortTaskRunError stops wasteful retries — don't pay to retry permanent failures.

References

Sibling skills: trigger-authoring-tasks (the task options these levers tune: machine, maxDuration, retry, queue, idempotency), trigger-realtime-and-frontend, trigger-authoring-chat-agent and trigger-chat-agent-advanced (AI agents).

Version History

  • 4474718 Current 2026-08-20 07:40

Same Skill Collection

.claude/skills/span-timeline-events/SKILL.md
.claude/skills/trigger-dev-tasks/SKILL.md
packages/trigger-sdk/skills/trigger-cost-savings/SKILL.md
.claude/skills/errors-api-e2e/SKILL.md
packages/cli-v3/skills/trigger-authoring-chat-agent/SKILL.md
packages/cli-v3/skills/trigger-authoring-tasks/SKILL.md
packages/cli-v3/skills/trigger-chat-agent-advanced/SKILL.md
packages/cli-v3/skills/trigger-getting-started/SKILL.md
packages/trigger-sdk/skills/trigger-authoring-chat-agent/SKILL.md
packages/trigger-sdk/skills/trigger-authoring-tasks/SKILL.md
packages/trigger-sdk/skills/trigger-chat-agent-advanced/SKILL.md

Metadata

Files
0
Version
4474718
Hash
3c5b38ea
Indexed
2026-08-20 07:40

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-27 15:43
浙ICP备14020137号-1 $Carte des visiteurs$