Skip to content

rshade/finfocus / agent-skills/cost-drift

cost-drift

Unverified

Compare actual and projected spend for a Pulumi stack with the FinFocus CLI, flag drifting resources against thresholds in .cost-check.yml, explain likely causes, track the trend, and write a COST_DRIFT.md report. Reads machine-readable JSON, checks the CLI version, and names what to do when the CLI, a billing plugin, credentials, or a Pulumi preview is missing. Use when investigating a cost overrun, validating projections against reality, or watching spend drift in CI. Triggers on: "cost drift", "actual vs projected", "why is spend higher than expected", "drift report", "COST_DRIFT.md".

FileKindSize
SKILL.mdskill md5.3 KB
cost-drift.skillbinary9.8 KB
references/cli-contract.mdmarkdown3.2 KB
references/drift-explanations.mdmarkdown4.6 KB
references/failure-modes.mdmarkdown2.3 KB
references/report-template.mdmarkdown1.9 KB
references/thresholds.mdmarkdown2.6 KB

references/failure-modes.md

View on GitHub
<!-- Copyright 2025-2026 Richard Shade. Licensed under Apache-2.0. -->
<!-- SPDX-License-Identifier: Apache-2.0 -->

# cost-drift failure modes

Name the failure in the report, do what the table says, and end with
`COST_DRIFT_RESULT: ERROR (<kind>)`.

| Kind | How it shows up | What the agent does |
| --- | --- | --- |
| `no-binary` | `command -v finfocus` prints nothing. | Stop. Point to the `finfocus-install` skill. |
| `old-version` | `finfocus --version` is below the required version. | Stop. Print both versions. |
| `no-plugin` | `plugin list --output json` prints `[]`, or no active plugin has `actual_costs`. | Stop. Point to `finfocus-install`. |
| `no-actuals` | Exit `0`, but no row has `actualCost`. | Stop. Point to `finfocus-diagnose`. A plugin that estimates from public prices does not supply billing actuals. |
| `no-credentials` | stderr or an `errors[]` message names a billing, backend, or secrets credential. | Stop. Say which credential is missing. Never ask for it, print it, or set it. Point to `finfocus-diagnose`. |
| `no-preview` | `pulumi` is missing from `PATH` or `preview` fails. | Retry once with `--state-only`. If it still fails, ask for `--pulumi-state` and `--pulumi-json` files. |
| `no-project` | No `Pulumi.yaml` or `Pulumi.yml`. | Stop. |
| `terraform` | The project is Terraform. | Stop. Say drift is Pulumi only as of v0.5.0. Suggest `cost-check`. |
| `insufficient-data` | Fewer than 2 days into the window, so no row has `costDrift`. | Report "insufficient data". Suggest `--from` an earlier date or rerun later. |
| `partial` | `errors[]` is not empty but some rows have data. | Continue. List the errors and the rows they affect. |
| `budget-exceeded` | Non-zero exit, `error_code` is `budget_exceeded`, and stdout holds JSON. | Parse stdout as usual. Add the budget breach to the report. |
| `bad-input` | Exit `2`. | Report `message`. Fix the flag or path and retry once. |
| `bad-thresholds` | `drift:` has a non-numeric or negative value. | Stop. Name the key. |
| `other` | Any other non-zero exit. | Stop. Print `error_code` and `message` verbatim. |

A report built on a partial result says which resources are missing.

An `actualCost` of `0` is a valid result: a plugin can return zero charges.
Zero alone shows neither missing data nor billing provenance, so it is not a
`no-actuals` case. The CLI omits `costDrift` when both sides are zero.
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 196kUpdated Claude CodeCodexVerifiedInstall