rshade/finfocus / agent-skills/cost-drift
cost-drift
UnverifiedCompare 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".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.3 KB |
| cost-drift.skill | binary | 9.8 KB |
| references/cli-contract.md | markdown | 3.2 KB |
| references/drift-explanations.md | markdown | 4.6 KB |
| references/failure-modes.md | markdown | 2.3 KB |
| references/report-template.md | markdown | 1.9 KB |
| references/thresholds.md | markdown | 2.6 KB |
references/drift-explanations.md
View on GitHub<!-- Copyright 2025-2026 Richard Shade. Licensed under Apache-2.0. -->
<!-- SPDX-License-Identifier: Apache-2.0 -->
# Drift Explanations by Resource Type
Per-resource-type likely causes and investigation prompts for cost
drift. Used by cost-drift to generate human-readable explanations
for flagged resources.
Match the `type` of each flagged row against the headings below, using the
Pulumi type token exactly as the CLI prints it. An older alias such as
`aws:elasticloadbalancingv2/loadBalancer:LoadBalancer` maps to the same entry
as `aws:lb/loadBalancer:LoadBalancer`.
Each entry has two parts:
- **Likely cause** — a short hint based on resource type and drift
direction (overspend or underspend)
- **Investigate** — an actionable next step to confirm the cause
## AWS
### aws:ec2/instance:Instance (EC2)
**Overspend:**
- Likely cause: On-demand hours exceeding reservation coverage, or
instance type larger than projected
- Investigate: Check EC2 reservation utilization and instance
right-sizing in AWS Cost Explorer
**Underspend:**
- Likely cause: Instance stopped or terminated, or spot pricing
lower than on-demand projection
- Investigate: Check instance uptime in CloudWatch and verify spot
vs on-demand usage
### aws:rds/instance:Instance (RDS)
**Overspend:**
- Likely cause: Storage auto-scaling, increased IOPS, or Multi-AZ
failover events
- Investigate: Review RDS storage metrics and allocated vs consumed
IOPS in CloudWatch
**Underspend:**
- Likely cause: Reserved instance coverage applied, or lower
utilization than projected
- Investigate: Check RDS reserved instance utilization in AWS Cost
Explorer
### aws:s3/bucket:Bucket (S3)
**Overspend:**
- Likely cause: Higher request volume or data transfer than
projected, or storage class transitions not reducing costs as
expected
- Investigate: Check S3 request metrics and storage class
distribution in S3 analytics
**Underspend:**
- Likely cause: Lifecycle policies deleting data faster than
projected, or Intelligent-Tiering reducing costs
- Investigate: Check S3 lifecycle rules and storage class
transitions
### aws:lambda/function:Function (Lambda)
**Overspend:**
- Likely cause: Higher invocation count or longer execution duration
than projected
- Investigate: Check Lambda invocation count and duration metrics in
CloudWatch
**Underspend:**
- Likely cause: Lower traffic than projected, or provisioned
concurrency not fully utilized
- Investigate: Check Lambda invocation metrics and provisioned
concurrency utilization
### aws:lb/loadBalancer:LoadBalancer (ALB/NLB)
**Overspend:**
- Likely cause: Higher LCU (Load Balancer Capacity Units) usage
from increased traffic or connections
- Investigate: Check ALB/NLB consumed LCU metrics in CloudWatch
**Underspend:**
- Likely cause: Lower traffic than projected
- Investigate: Check load balancer request count and active
connection metrics
## GCP
### gcp:compute/instance:Instance (Compute Engine)
**Overspend:**
- Likely cause: Committed use discount not applied, or sustained
use discount lower than expected
- Investigate: Check committed use discount coverage in GCP Billing
**Underspend:**
- Likely cause: Instance stopped or preempted, or sustained use
discount higher than projected
- Investigate: Check instance uptime and preemption events in
Cloud Monitoring
### gcp:storage/bucket:Bucket (Cloud Storage)
**Overspend:**
- Likely cause: Higher egress or operations than projected
- Investigate: Check Cloud Storage request metrics and egress in
Cloud Monitoring
**Underspend:**
- Likely cause: Lifecycle rules deleting objects or transitioning
to cheaper storage classes
- Investigate: Check bucket lifecycle rules and storage class
distribution
## Azure
### azure:compute/virtualMachine:VirtualMachine (also azure-native:compute:VirtualMachine)
**Overspend:**
- Likely cause: On-demand pricing without reservation, or disk
costs exceeding projection
- Investigate: Check Azure Advisor for reservation recommendations
and disk utilization
**Underspend:**
- Likely cause: VM deallocated or reservation discount applied
- Investigate: Check VM uptime and reservation utilization in
Azure Cost Management
## Fallback
For resource types not listed above, use these generic explanations:
**Overspend:**
- Likely cause: Higher utilization or traffic than projected
- Investigate: Check the resource's usage metrics in the cloud
provider's monitoring console
**Underspend:**
- Likely cause: Lower utilization than projected, or discount
applied
- Investigate: Check the resource's usage metrics and verify
discount/reservation coverage
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| 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: 196k | Updated | Claude CodeCodex | Verified | Install |