Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

spend-watch

БесплатноБез исполняемых скриптовНе проверен

Autonomous cloud-cost analyst across Neon, Vercel, Railway and GitHub Actions - pulls per-object usage, attributes it to the biggest drivers, root-causes…

aeonfunот aeonfun★ 801 звезда на GitHub

Об этом скилле

Today is ${today}.

${var} — scope selector + optional arm flag.

  • empty / all → sweep every platform whose secret is present, emit one combined digest.
  • neon | vercel | railway | actions → run one adapter only.
  • prepend arm: (e.g. arm:neon, arm:actions) → authorize the adapter's safe write levers for this run. Without arm: the skill is read-only: it recommends, never mutates.
  • dry-run appended anywhere → build the digest but do not ./notify (for testing).

Runs unattended — treat ${var} as final, no confirmation step, except a delete/mutation always re-reads the target's current state before acting (see each adapter's arm rules).

This skill is a cost analyst, not a bill alarm. Each run answers, per platform:

  1. Attribution — what is consuming the most? Rank drivers by dollars (or the resource unit that maps to dollars), down to the specific object: service, branch, route, RPC method, workflow. Top-N with each line's % share.
  2. Root cause — why is that line expensive?
  3. Recommendation — a ranked action list, each carrying: the concrete lever, an effort/risk tag, whether it's armable now, and a saving in real dollars ONLY when the platform's billing API returns real dollars (Railway currentUsage, Actions overage). Everywhere else there is no dollar figure — the line carries its real signal instead (idle-awake %, % over the included allowance, cache-miss rate, stale-preview count, failure rate). Never invent a $X/mo.

Dollars-only-when-real is the core rule. A fabricated "$5/mo" is worse than the true signal "idle-awake 71%". Rank each recommendation by: real-$ saving first (when known), then signal magnitude × how actionable it is (armable > 1-click > code-change > investigate). The recommendation is the deliverable; the signal justifies it; the dollar is a bonus only when the API hands it over.

Across platforms (all): a roll-up — the real spend where billing exposes it (Railway $, Actions $), the biggest signal-ranked driver anywhere, and the top actions fleet-wide. No synthetic grand total.

The monitoring (deltas, real budgets, signal thresholds) is the trend context and the trigger; the deliverable is the ranked recommendations.


Shared setup (every run)

  1. Read memory/MEMORY.md for context and memory/spend-config.md for real-$ budgets, signal thresholds, and ignore-lists (see the config schema at the bottom). If spend-config.md is missing, run with the built-in defaults and note NO_CONFIG in the log — recommendations still work; they rank by signal regardless.

  2. Read the last 7 days of memory/logs/ — used to detect newly expensive drivers vs ongoing, and to avoid repeat-nagging a recommendation already sent.

  3. Parse ${var} yourself, in these steps (not as a shell script; see Shell shape in the Network note):

    • RAW = ${var} lowercased, with leading and trailing spaces trimmed.
    • If RAW starts with arm:, set ARM=1 and drop that prefix; else ARM=0.
    • If RAW contains dry-run, set DRYRUN=1, remove every dry-run from it and squeeze repeated spaces; else DRYRUN=0. Trim RAW again.
    • SCOPE: RAW empty or all → all; neon, vercel, railway or actions → that value; anything else → all (unrecognized → full sweep, note it in the log).
  4. Run the matching adapter(s). Each adapter self-skips if its secret is absent — log <platform>: SKIP no-secret and continue. In all mode, run every adapter whose secret is present, then run the Synthesis section.

Common adapter contract

Every adapter produces the same intermediate shape (the model builds it in memory, one entry per cost driver):

{ platform, object, metric, amount, share_pct, signal, real_usd, saving_usd,
  trend, root_cause, recommendation, effort, armable }
  • effort ∈ armable | 1-click | code-change | investigate.
  • real_usd / saving_usd — populated only from a billing API that returns actual dollars (Railway customer.currentUsage, Actions summed netAmount/overage). Otherwise null — do not compute a dollar figure from a config rate. There is no cost-rate multiplication anywhere in this skill.
  • signal — the real, dollar-free magnitude that justifies the line and drives its rank when saving_usd is null: e.g. idle-awake 71%, 18% over included minutes, stale-previews 300, failure-rate 51%, RSS 4.6× working set. Always present.
  • metric/amount — the raw usage unit (compute-hours, minutes, GB-hrs, requests) behind the signal.
  • trend ∈ new | up | flat | down, computed against the prior snapshot.

State ledger

Each adapter reads and rewrites memory/state/spend-<platform>.json:

{
  "updated_at": "<ISO8601>",
  "drivers": [ { "object": "...", "metric": "...", "amount": 0, "signal": "idle-awake 71%", "real_usd": null } ],
  "recommendations_sent": [ { "id": "neon:tighten-timeout:ep-x", "sent": "<ISO8601>", "signal": "id
Полный SKILL.md на GitHub

Установить spend-watch в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл spend-watch?

Autonomous cloud-cost analyst across Neon, Vercel, Railway and GitHub Actions - pulls per-object usage, attributes it to the biggest drivers, root-causes each, and emits recommendations ranked by real signal (idle %, over-allowance, failure rate) with dollar figures only where the billing API returns real ones (and, armed, applies safe cost levers).

Как установить скилл spend-watch?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл spend-watch запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить spend-watch с