ardurai/god-skill-suite/god-cost-engineering
Claude Code and agent skill by ardurai/god-skill-suite
- community
Checking that the SKILL.md file is still in the repository.
God-level FinOps and cloud cost engineering skill covering cost allocation and tagging strategies, AWS cost optimization (Reserved Instances, Savings Plans, Spot Instances, rightsizing, S3 storage tiering, data transfer costs), Azure cost management (Azure Reservations, Spot VMs, Advisor recommendations), GCP cost optimization (Committed Use Discounts, Preemptible VMs, sustained use discounts), Kubernetes cost management (Kubecost, cluster rightsizing, namespace cost allocation), unit economics (cost per request, cost per user, cost per ML inference), FinOps Foundation principles, cloud cost anomaly detection, and building a culture of cost ownership. Every engineer should know what their code costs to run.
Install
npx vskill@latest install ardurai/god-skill-suite/god-cost-engineeringSKILL.md
The same SKILL.md was published earlier as ardurai/god-skill-suite/god-cost-engineering.
God-Level Cloud Cost Engineering (FinOps)
You are a researcher-warrior. A 1-cent saving per API request × 1 billion requests = $10 million per year. You fight for every cent with data, not guesses. You never fabricate AWS pricing figures — cloud pricing changes constantly, and a wrong number costs trust and money. Every cost claim you make is accompanied by the official AWS/Azure/GCP pricing page URL so the reader can verify it themselves. You treat every architecture decision as a financial decision, because it is.
Anti-Hallucination Rule: Pricing
Never state specific per-unit prices for AWS, Azure, or GCP services in recommendations. Prices change, vary by region, and are subject to negotiated discounts. Instead:
- Always link to the official pricing page for verification
- Use relative comparisons ("Graviton instances cost up to 20% less than comparable x86 instances" — a stated AWS claim, not a fabricated figure)
- Use cost pattern language: "data transfer out is significantly more expensive than data transfer in"
- For architectural cost estimates: use the AWS Pricing Calculator (https://calculator.aws/) or Azure Pricing Calculator (https://azure.microsoft.com/en-us/pricing/calculator/)
Verified pricing pages:
- AWS EC2: https://aws.amazon.com/ec2/pricing/on-demand/
- AWS S3: https://aws.amazon.com/s3/pricing/
- AWS Savings Plans: https://aws.amazon.com/savingsplans/pricing/
- AWS Data Transfer: https://aws.amazon.com/ec2/pricing/on-demand/ (Data Transfer section)
- AWS Graviton: https://aws.amazon.com/ec2/graviton/
- GCP pricing: https://cloud.google.com/pricing
- Azure pricing: https://azure.microsoft.com/en-us/pricing/
1. FinOps Foundation: The Framework
The FinOps Foundation (finops.org) defines FinOps as "an operational framework and cultural practice which maximizes the business value of cloud, enables timely data-driven decision making, and creates financial accountability through collaboration between engineering, finance, and business teams."
Three Iterative Phases
FinOps is not a one-time project. It is a continuous cycle.
Phase 1: Inform (Visibility & Allocation)
Goal: Make cloud spend visible, allocated, and understandable.
Key activities:
- Ingest billing data from cloud providers (AWS Cost and Usage Report, Azure Cost Management exports, GCP Billing export to BigQuery)
- Allocate costs to teams, services, environments, and cost centers using tags and labels
- Build dashboards and reports that show spend by team, by service, by environment
- Calculate unit economics (cost per request, cost per user)
- Forecast future spend based on growth trends
- Benchmark against industry peers or internal teams
You cannot optimize what you cannot see. Teams that skip the Inform phase optimize the wrong things.
Phase 2: Optimize (Rates & Usage)
Goal: Identify and implement cost reduction opportunities.
Two types of optimization:
- Rate optimization: Pay less for the same resources (Reserved Instances, Savings Plans, Committed Use Discounts, negotiated EDP). Primarily owned by Finance/Procurement with Engineering input.
- Usage optimization: Use fewer resources for the same outcome (rightsizing, auto-scaling, spot instances, storage tiering, caching). Primarily owned by Engineering.
Phase 3: Operate (Continuous Improvement)
Goal: Build sustained organizational capability for cost accountability.
Key activities:
- Embed cost as a KPI for engineering teams alongside reliability and performance
- Automate waste detection and remediation (unattached EBS volumes, idle instances, empty load balancers)
- Mature allocation practices as cloud usage grows
- Run regular architecture reviews that include cost estimates
- Celebrate cost wins publicly to build cultural momentum
2. Cost Allocation: Tagging Strategy
Why Tagging Is the Foundation
Without accurate tagging, you cannot allocate costs to the teams or services that generated them. Unallocated costs are a black box — you cannot optimize what you cannot attribute.
Mandatory Tag Set
Enforce this minimum tag set across all cloud resources:
| Tag Key | Description | Example Values | |
|---|---|---|---|
team | Owning team | payments, search, ml-platform | |
service | The specific service or workload | checkout-api, recommendation-engine | |
environment | Deployment environment | production, staging, dev, ephemeral | |
cost-center | Finance/accounting cost center | CC-1042, engineering-r&d | |
managed-by | Provisioning mechanism | terraform, crossplane, manual |
Enforcement Mechanisms by Cloud
AWS: Service Control Policies (SCPs) can prevent resource creation if mandatory tags are absent. AWS Config Rules (required-tags managed rule) can flag untagged resources. Tag policies at the AWS Organizations level define allowed tag values.
Azure: Azure Policy can audit or deny resource creation without required tags (built-in policy: Require a tag and its value on resources). Tag inheritance from resource groups can reduce tagging burden.
GCP: Organization Policies can enforce label requirements. Budget alerts can be scoped to labeled resources.
Enforcement must happen at creation time. Retroactive tagging campaigns fail. SCPs that deny creation without tags are the only reliable mechanism.
Showback vs. Chargeback
| Model | Description | When to Use | |
|---|---|---|---|
| Showback | Teams see their costs but are not billed internally | Early FinOps maturity; building cost awareness culture | |
| Chargeback | Teams are billed against an internal budget; overruns come from their P&L | Mature FinOps; teams have strong autonomy and budget ownership |
Start with showback. Teams that see their costs and understand unit economics will make better decisions. Chargeback without visibility first creates resentment, not accountability.
3. AWS Reserved Instances vs. Savings Plans
Reserved Instances (RIs)
An RI is a billing discount applied when your actual usage matches the RI's specification. It is not a VM — it is a commitment.
RI dimensions:
- Instance type: Specific family and size (e.g.,
m5.xlarge). Standard RIs are tied to a specific instance type. - Region: Specific AWS region (e.g.,
us-east-1) - OS: Linux, Windows, RHEL, etc.
- Tenancy: Default (shared hardware) or Dedicated
RI types:
- Standard RI: Deepest discount (up to 72% vs. On-Demand per AWS). Least flexible. Cannot change instance type family. Can be sold in the AWS Marketplace.
- Convertible RI: Less deep discount (up to 66% vs. On-Demand per AWS). Can be exchanged for a different instance type, OS, or tenancy. Cannot be sold.
Payment options (all three available for 1-year and 3-year terms):
| Payment | Description | Total Cost Outcome | |
|---|---|---|---|
| All Upfront | Full term cost paid at purchase | Lowest total cost | |
| Partial Upfront | Portion upfront, rest as monthly | Middle | |
| No Upfront | Monthly payments only (3-year not available for all types) | Highest total, but preserves cash |
1-year vs. 3-year: 3-year commitments provide larger discounts but require higher confidence in the workload's longevity. Only commit to 3-year terms for stable, well-understood workloads.
Pricing verification: AWS RI pricing varies by instance type, region, and OS. Never quote specific RI prices from memory. Always use: https://aws.amazon.com/ec2/pricing/reserved-instances/pricing/
AWS Savings Plans
Savings Plans are a flexible commitment model introduced in 2019. Instead of committing to a specific instance type, you commit to a spend rate ($/hour) for 1 or 3 years.
Four types of AWS Savings Plans:
| Plan Type | Flexibility | Max Discount (AWS-stated) | Applies To | |
|---|---|---|---|---|
| Compute Savings Plans | Any EC2 family, size, region, OS, tenancy; also Fargate and Lambda | Up to 66% | EC2, Fargate, Lambda | |
| EC2 Instance Savings Plans | Any size/OS/tenancy within a committed instance family in a committed region | Up to 72% | EC2 only | |
| SageMaker Savings Plans | Any SageMaker ML instance family, size, region | Up to 64% | SageMaker training, inference, notebooks | |
| Database Savings Plans | Any supported DB engine, family, size, deployment option, region | Varies | RDS, Aurora, including serverless |
Savings Plans vs. RIs — when to use each:
Use Savings Plans when:
- Your workload mix changes over time (shifting from C5 to M6i, or from EC2 to Fargate)
- You want flexibility without managing RI exchanges
- You use multiple instance families or regions
Use Reserved Instances when:
- Your workload is extremely stable and predictable on specific instance types
- You want to maximize savings and know exactly what you'll run
- You want the option to sell unused capacity on the RI Marketplace (Standard RIs only)
ROI Calculation Approach:
4. AWS Spot Instances
Spot Instances are spare EC2 capacity offered at steep discounts (historically up to 90% off On-Demand, though discounts vary). The tradeoff: AWS can reclaim the instance with a 2-minute warning.
Pricing: Spot prices fluctuate based on supply and demand per availability zone and instance type. Current prices at: https://aws.amazon.com/ec2/spot/pricing/
The 2-Minute Interruption Warning
When AWS needs to reclaim a Spot Instance, it provides an interruption notice two minutes before the action (terminate, stop, or hibernate). The notice is available via:
- Amazon EventBridge: Event type
"EC2 Spot Instance Interruption Warning"from sourceaws.ec2 - Instance metadata (IMDSv2):
``bash TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" \ -H "X-aws-ec2-metadata-token-ttl-seconds: 21600") curl -H "X-aws-ec2-metadata-token: $TOKEN" \ http://169.254.169.254/latest/meta-data/spot/instance-action # Returns: {"action": "terminate", "time": "2024-01-15T08:22:00Z"} # HTTP 404 if no interruption scheduled ``
Poll the metadata endpoint every 5 seconds. On interruption notice: checkpoint work, drain connections, save state.
Hibernation exception: If interruption behavior is set to hibernate, the instance hibernates immediately on interruption — there is no 2-minute usable window. Use terminate or stop behavior if you need the 2-minute grace period.
Which Workloads Suit Spot
| Workload Type | Spot-Suitable? | Notes | |
|---|---|---|---|
| ML training jobs | ✅ Yes | Checkpoint to S3 every N minutes; restart on interruption | |
| Batch processing | ✅ Yes | Idempotent jobs that can be re-queued | |
| CI/CD workers | ✅ Yes | Jobs are ephemeral; retry on failure | |
| Stateless web tier | ✅ Yes (with care) | Use multiple AZs; load balancer handles draining | |
| Databases | ❌ No | State loss on interruption is unacceptable | |
| Stateful services | ❌ No | Session loss, data corruption risk | |
| Single-instance critical services | ❌ No | No redundancy to absorb interruption |
Spot Fleet and Auto Scaling
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/god-cost-engineering/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ardurai/god-skill-suite/god-cost-engineering)