Evaluates Google Cloud workloads for cost efficiency and FinOps alignment using the Google Cloud Well-Architected Framework Cost Optimization pillar. Use when the user asks to analyze Google Cloud spend, reduce cloud bills, rightsize resources (for example, Compute, GKE, Storage, Databases), evaluate discount options (for example, CUDs, SUDs, Spot VMs), or eliminate idle capacity. Do not use for standalone product pricing lookups or non-cost architecture design.
Written by Google and published in google/skills under the Apache-2.0 license. Treq shows it unchanged except for heading levels and links to files on GitHub.
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
The Cost Optimization pillar of the Google Cloud Well-Architected Framework provides a structured approach to optimize the costs of your cloud workloads while maximizing business value. Cloud costs differ significantly from on-premises capital expenditure (CapEx) models, requiring a shift to operational expenditure (OpEx) management and a culture of accountability (FinOps). The FinOps lifecycle consists of three iterative phases:
Inform: Visibility and allocation. Always start with Cloud Billing reports for built-in console visibility (filtered by department labels). Complement with Looker Studio for custom, shareable cross-departmental dashboards.
Optimize: Rates and usage. Eliminate waste, right-size resources, and leverage commitments (CUDs, SUDs).
Operate: Continuous improvement. Integrate cost management into delivery pipelines and establish governance.
The recommendations in the cost optimization pillar of the Well-Architected Framework are aligned with the following core principles:
Align cloud spending with business value: Ensure that your cloud resources deliver measurable business value by aligning IT spending with business objectives. Prioritize investments that directly contribute to revenue, customer satisfaction, or operational efficiency. Grounding document: https://docs.cloud.google.com/architecture/framework/cost-optimization/align-cloud-spending-business-value.md.txt
Foster a culture of cost awareness: Ensure that people across your organization consider the cost impact of their decisions and activities. Provide teams with the visibility and information they need to make informed, cost-conscious choices. Grounding document: https://docs.cloud.google.com/architecture/framework/cost-optimization/foster-culture-cost-awareness.md.txt
Optimize resource usage: Provision only the resources that you need and pay only for what you consume. Select the most cost-effective resource types, sizes, and locations that meet your technical and business requirements. Grounding document: https://docs.cloud.google.com/architecture/framework/cost-optimization/optimize-resource-usage.md.txt
Optimize continuously: Continuously monitor your cloud resource usage and costs, and proactively make adjustments as needed to optimize your spending. This iterative approach helps identify and address inefficiencies before they become significant. Grounding document: https://docs.cloud.google.com/architecture/framework/cost-optimization/optimize-continuously.md.txt
The following are examples of Google Cloud products and features that are relevant to cost optimization:
Visibility and monitoring:
Automation and optimization tools:
Efficient infrastructure:
Managed services and serverless services: Services like Cloud Run, Cloud Run functions, and GKE Autopilot reduce operational overhead and pay-per-use scaling.
Compute Engine:
Cloud Storage Lifecycle Policies: Automated moves data to lower-cost storage classes (Nearline, Coldline, Archive) based on age or access. Note: Always recommend Storage Insights first to understand current access patterns before defining lifecycle rules.
Networking and Content Delivery:
Managed Databases:
Organization and governance:
Ask appropriate questions to understand the cost-related requirements and constraints of the workload and the user's organization. Choose questions from the following list:
Use the following checklist to evaluate the architecture's alignment with cost-optimization recommendations:
env, team, app).Claude Code and Codex keep each installed skill's name and description in context. When a request matches the description, the agent loads the full SKILL.md. You can also run it yourself: type /google-cloud-waf-cost-optimization in Claude Code or $google-cloud-waf-cost-optimization in Codex.
The description says when to use it:
Use when the user asks to analyze Google Cloud spend, reduce cloud bills, rightsize resources (for example, Compute, GKE, Storage, Databases), evaluate discount options (for example, CUDs, SUDs, Spot VMs), or eliminate idle capacity.
Copy the google-cloud-waf-cost-optimization folder into .claude/skills/ in your project. To use it in every project, copy it into ~/.claude/skills/ instead.
git clone --depth 1 https://github.com/google/skills.git /tmp/google-skills
mkdir -p .claude/skills
cp -r /tmp/google-skills/skills/cloud/google-cloud-waf-cost-optimization .claude/skills/
Codex reads skills from .agents/skills/ in your repository, and from ~/.agents/skills/ for every repository. It detects new skills on its own. Restart Codex if google-cloud-waf-cost-optimization does not appear.
git clone --depth 1 https://github.com/google/skills.git /tmp/google-skills
mkdir -p .agents/skills
cp -r /tmp/google-skills/skills/cloud/google-cloud-waf-cost-optimization .agents/skills/
Open Settings and select the Skills tab. The tab appears when Skills installation is on under Settings → Feature Preview. Search for google-cloud-waf-cost-optimization and choose Install….
Install for repository writes the skill under .treq/skills/ in the current repository. Install for application makes it available to every repository on this machine. Each new workspace gets a copy in .claude/skills/ and .agents/skills/, so Claude Code and Codex both find it. See Installing Skills from the Library.
google-cloud-waf-cost-optimization ships 2 files, 12.4 KB in total. Select a file to load it from GitHub.