Skip to main content

Optimizing Cloud Cost

Plugin: TSH Platform Engineering
Invoke: /tsh-platform-engineering:optimizing-cloud-cost, or loaded automatically when a request matches its description
Used by: devops-engineer, infrastructure-auditor. Also named by auditing-aws-cost, auditing-gcp-cost and auditing-azure-cost as the home of the cost framework and tagging governance.

The framework applied when provisioning and when estimating what a change will cost: which pricing model fits a workload shape, which storage tier fits an access pattern, and what every resource must be tagged with.

It does not audit a live account. That job is cloud-specific, because it needs the provider's service families, CLI verbs and billing API. Where the cloud's plugin is installed, auditing-aws-cost (tsh-stack-aws), auditing-gcp-cost (tsh-stack-gcp) or auditing-azure-cost (tsh-stack-azure) owns it.

Key Areas​

AreaCoverage
PrecedenceReads the shared context file. A project's own tagging convention outranks the standard in the skill; the project's keys are used and the difference is reported.
Pricing modelsSteady-state 24/7 workloads: reserved or committed capacity (30 to 72% saving). Variable or bursty: on-demand plus auto-scaling. Fault-tolerant batch: spot (up to 90%). Event-driven: serverless. Reserved or committed capacity pays off above roughly 70% sustained utilization.
Storage tieringHot, infrequent (30+ days), rare (90+ days) and archive (365+ days) tiers mapped across AWS, Azure and GCP, always paired with a lifecycle policy. Minimum storage duration per tier is checked first, because deleting early from a cold tier still bills the remainder.
Right-sizingBased on observed utilization, sized to the peak the workload must serve, one dimension at a time (family, then size), and re-measured afterwards. A recommendation with no utilization behind it is labelled a guess.
Cost-impact estimateNew monthly run-rate itemized, the delta against current spend as a percentage, what is estimated versus measured, and the line items people forget: NAT and egress processing, cross-zone and cross-region transfer, idle load balancers, log ingestion, non-production managed-service charges and orphaned storage. Above a 10% projected increase the response opens with ⚠️ FINOPS ALERT: High Cost Impact.
TaggingThe mandatory Core 5 tags: CostCenter, Environment, Service, Owner and DataClass, with DataClass mandatory on all storage and database resources. GCP uses a lowercase label dialect (cost_center, data_class). Workload tags exist for AI and ML (ModelID, TrainingJobId, InferenceType) and for lifecycle (Schedule, Temporary, TTL). Enforcement is preventive through organization-level policy, injected by IaC modules, with detective and corrective controls as fallbacks.
Provisioning checklistTags injected by the module, right-sizing on metrics, reserved capacity for sustained load, spot for batch, lifecycle policies, budget alerts at 50%, 80% and 100%, cost anomaly detection, auto-scaling and non-production scheduled off outside business hours.
RulesEvery proposal carries a cost estimate. Current instance families, machine types and pricing are verified against provider documentation before a size is recommended. Never report an estimated saving as measured, and never propose deleting a resource whose purpose is not established.

Automated deletion of untagged resources is described as a policy decision for the account owner; the skill says to propose it and never implement it unasked.

How it works​

The skill has no numbered procedure. It is applied as a framework while provisioning: choose the pricing model and storage tier, right-size on measured utilization, tag at provisioning time, and state the cost-impact estimate with its estimated-versus-measured split.

References​

ReferenceLoad when
tagging-standards.mdProvisioning anything, or setting up cost governance. Covers the mandatory tag set, workload-specific tags, the GCP label dialect, the compliance checks and the enforcement patterns.

Source​