Agent skill

Optimizing Cloud Costs

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Execute use when you need to work with cloud cost optimization.

MITAuto-check passedDevOps & Cloud

Install Optimizing Cloud Costs

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-cloud-costs -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace optimizing-cloud-costs --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/optimizing-cloud-costs .claude/skills/optimizing-cloud-costs && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
optimizing-cloud-costs
GitHub stars
2.8k
Token cost
~1.1k tokens
SKILL.md length
468 words
Files
8 (incl. scripts, references, assets)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Execute use when you need to work with cloud cost optimization.

  • Works in 10 steps: Pull current cost data using cloud cost… → Identify the top 10 cost drivers by… → Detect idle resources: instances with <… → …
  • You need to work with cloud cost optimization
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 3 more sections
  • Runs Python scripts from its folder; calls aws and gcloud

What it does

Optimizing Cloud Costs is an agent skill from jeremylongshore/tons-of-skills-marketplace. Execute use when you need to work with cloud cost optimization. This skill provides cost analysis and optimization with comprehensive guidance and automation. Trigger with phrases like "optimize costs", "analyze spending", or "reduce costs".

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts, reference files and assets (for example `assets/README.md`, `assets/optimization_recommendation_template.json` and `references/README.md`). Compatibility notes: Designed for Claude Code

It sits in DevOps & Cloud, covering Cloud cost optimization. It works with Google Cloud, Amazon Web Services and Terraform. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • You need to work with cloud cost optimization
  • With phrases like optimize costs
  • Analyze spending

Example prompts

  • “optimize costs”
  • “analyze spending”
  • “reduce costs”
  • “/optimizing-cloud-costs”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Glob, Bash(aws:*), Bash(gcloud:*), Bash(az:*)

Workflow steps

10 steps, taken from the first numbered list in SKILL.md.

  1. Pull current cost data using cloud cost APIs (aws ce get-cost-and-usage, gcloud billing budgets list)
  2. Identify the top 10 cost drivers by service, region, and resource tag
  3. Detect idle resources: instances with < 5% average CPU over 14 days, unattached EBS volumes, unused Elastic IPs, orphaned snapshots
  4. Recommend rightsizing: compare instance utilization against available instance types and suggest downsizing
  5. Evaluate reserved instance or savings plan coverage against on-demand spend; recommend commitments for steady-state workloads
  6. Identify spot/preemptible candidates: stateless, fault-tolerant workloads (batch jobs, CI runners, dev environments)
  7. Review storage costs: recommend S3 Intelligent-Tiering, lifecycle policies for infrequent access, or Glacier for archives
  8. Generate Terraform/IaC changes to implement approved optimizations
  9. Set up budget alerts with thresholds at 50%, 80%, and 100% of monthly budget
  10. Create a cost optimization report summarizing findings, savings estimates, and implementation priority

What it can do on your machine

Read from SKILL.md and the folder at commit 80f86df. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Bash(aws:*)
    • Bash(gcloud:*)
    • Bash(az:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • aws
    • gcloud

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.aws.amazon.com
    • cloud.google.com
    • learn.microsoft.com
    • finops.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Optimizing Cloud Costs loads about 1.1k tokens when it runs, and up to ~1.1k if it reads all its reference files. Until then it costs about 66 tokens; SKILL.md has 468 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 80f86df, republished under its MIT licence (© jeremylongshore). 468 words, ~1,103 tokens.

Download SKILL.mdSave it as .claude/skills/optimizing-cloud-costs/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
optimizing-cloud-costs
description
Execute use when you need to work with cloud cost optimization. This skill provides cost analysis and optimization with comprehensive guidance and automation. Trigger with phrases like "optimize costs", "analyze spending", or "reduce costs".
allowed-tools
Read, Write, Edit, Grep, Glob, Bash(aws:*), Bash(gcloud:*), Bash(az:*)
compatibility
Designed for Claude Code
version
1.27.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
devops, cost-optimization, optimizing-cloud

Optimizing Cloud Costs

Overview

Analyze cloud spending across AWS, GCP, and Azure to identify waste, recommend rightsizing, and generate cost-saving configurations. Covers reserved instances, spot/preemptible workloads, storage tiering, idle resource cleanup, and budget alerting using cloud-native cost management APIs.

Prerequisites

  • Cloud provider CLI authenticated with billing/cost-explorer read access
  • AWS: ce:GetCostAndUsage, ec2:DescribeInstances, cloudwatch:GetMetricData permissions
  • GCP: Billing Account Viewer and Compute Viewer roles
  • Azure: Cost Management Reader role
  • Access to current infrastructure-as-code (Terraform, CloudFormation) for rightsizing changes
  • At least 30 days of billing data for meaningful analysis

Instructions

  1. Pull current cost data using cloud cost APIs (aws ce get-cost-and-usage, gcloud billing budgets list)
  2. Identify the top 10 cost drivers by service, region, and resource tag
  3. Detect idle resources: instances with < 5% average CPU over 14 days, unattached EBS volumes, unused Elastic IPs, orphaned snapshots
  4. Recommend rightsizing: compare instance utilization against available instance types and suggest downsizing
  5. Evaluate reserved instance or savings plan coverage against on-demand spend; recommend commitments for steady-state workloads
  6. Identify spot/preemptible candidates: stateless, fault-tolerant workloads (batch jobs, CI runners, dev environments)
  7. Review storage costs: recommend S3 Intelligent-Tiering, lifecycle policies for infrequent access, or Glacier for archives
  8. Generate Terraform/IaC changes to implement approved optimizations
  9. Set up budget alerts with thresholds at 50%, 80%, and 100% of monthly budget
  10. Create a cost optimization report summarizing findings, savings estimates, and implementation priority

Output

  • Cost analysis report with per-service breakdown and savings recommendations
  • Terraform/CloudFormation changes for rightsizing and reserved instance purchases
  • S3 lifecycle policy configurations for storage tiering
  • Budget alert configurations (CloudWatch, GCP Budget, Azure Cost Alerts)
  • Cleanup scripts for idle resources (with dry-run mode for safety)
Show full SKILL.md (195 more words)Show less

Error Handling

ErrorCauseSolution
Access Denied on Cost Explorer APIMissing ce:* IAM permissionsAttach the AWSBillingReadOnlyAccess managed policy to the IAM user/role
No billing data availableAccount is too new or cost export not enabledEnable Cost Explorer (takes 24h to populate) or set up CUR (Cost and Usage Report)
Rightsizing recommendation breaks workloadInstance too small for peak loadBase sizing on P95 utilization, not average; keep a 20% headroom buffer
Spot instance terminated mid-jobSpot capacity reclaimed by providerUse spot fleet with diversified instance types and implement checkpointing
Budget alert not firingSNS topic or notification channel misconfiguredVerify SNS subscription is confirmed and test with a low threshold

Examples

  • "Analyze AWS costs for the last 3 months, identify the top waste areas, and generate a cleanup script for unattached EBS volumes and unused Elastic IPs."
  • "Compare on-demand EC2 spend against Savings Plans pricing and recommend 1-year commitments for steady-state workloads."
  • "Create S3 lifecycle policies to move objects older than 90 days to Glacier and delete after 365 days across all buckets tagged env:production."

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts, references, assets) in skills/.curated/optimizing-cloud-costs of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • assets/README.md
  • assets/cost_report_template.csv
  • assets/example_cost_report.csv
  • assets/optimization_recommendation_template.json
  • references/README.md
  • scripts/README.md
  • scripts/generate_cost_report.py

Open the folder on GitHubat commit 80f86df

Compare with similar skills

Optimizing Cloud Costs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Optimizing Cloud Costs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Optimizing Cloud Costs this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.1kAutomated safety check: PassMIT
Cloud ArchitectJeffallan/claude-skills12k—~1.9kAutomated safety check: PassMIT
Cloud Architectdavila7/claude-code-templates32k8 repos~1.9kAutomated safety check: PassMIT
Senior Cloud Architectborghei/Claude-Skills886—~1.4kAutomated safety check: PassMIT
Cloud Cost Optimizationwshobson/agents40k14 repos~1.7kAutomated safety check: PassMIT
Senior DevOps Toolkitmaslennikov-ig/claude-code-orchestrator-kit2606 repos~1.1kAutomated safety check: NotesCustom licence

Similar skills

  • Cloud Architect

    Jeffallan/claude-skills

    Designs cloud architectures, migration plans, cost optimization recommendations and disaster recovery strategies across AWS, Azure and GCP.

    12k GitHub stars~1.9k tokensUpdated 6 days ago
    DevOps & CloudAuto-check passed
  • Cloud Architect

    davila7/claude-code-templates

    Expert cloud architect specializing in AWS/Azure/GCP multi-cloud infrastructure design, advanced IaC (Terraform/OpenTofu/CDK), FinOps cost optimization, and modern architectural patterns.

    32k GitHub starsUsed in 8 repos~1.9k tokens
    DevOps & CloudAuto-check passed
  • Senior Cloud Architect

    borghei/Claude-Skills

    A skill your agent uses when the user asks to "design cloud architecture", "set up Terraform infrastructure", "optimize cloud costs", "plan disaster recovery", "configure multi-region failover"…

    886 GitHub stars~1.4k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Cuts cloud spend across AWS, Azure, GCP and OCI with cost tagging, rightsizing, commitment and spot pricing models, and architecture changes.

    40k GitHub starsUsed in 14 repos~1.7k tokens
    DevOps & CloudAuto-check passed
  • Senior DevOps Toolkit

    maslennikov-ig/claude-code-orchestrator-kit

    Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup…

    260 GitHub starsUsed in 6 repos~1.1k tokens
    DevOps & CloudAuto-check: notes
  • Terravision Cloud Diagrams

    patrickchugh/terravision

    Draw cloud architecture diagrams for AWS, Azure or GCP with the official provider icon sets, using TerraVision.

    1.6k GitHub stars~5.6k tokensUpdated 3 days ago
    DevOps & CloudAuto-check: notes

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Categories

Questions about Optimizing Cloud Costs

What does Optimizing Cloud Costs do?

Execute use when you need to work with cloud cost optimization. Optimizing Cloud Costs is an agent skill from jeremylongshore/tons-of-skills-marketplace. Execute use when you need to work with cloud cost optimization.

When should I use Optimizing Cloud Costs?

Optimizing Cloud Costs fits situations like: you need to work with cloud cost optimization; with phrases like optimize costs; analyze spending.

How do I install Optimizing Cloud Costs in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-cloud-costs -a claude-code`. Or copy the skill folder (skills/.curated/optimizing-cloud-costs in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/optimizing-cloud-costs in your project. Claude Code loads it when a task matches its description.

How do I install Optimizing Cloud Costs in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-cloud-costs -a codex`. Or copy the skill folder (skills/.curated/optimizing-cloud-costs in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/optimizing-cloud-costs in your project. Codex loads it when a task matches its description.

Can I use Optimizing Cloud Costs in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-cloud-costs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/optimizing-cloud-costs, .gemini/skills/optimizing-cloud-costs, .github/skills/optimizing-cloud-costs and .opencode/skills/optimizing-cloud-costs in your project.

What does Optimizing Cloud Costs need to run?

Going by SKILL.md and its folder, Optimizing Cloud Costs needs Python for the scripts in its folder and the command-line tools its instructions call (aws and gcloud). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(aws:*), Bash(gcloud:*), Bash(az:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Optimizing Cloud Costs access the network?

SKILL.md names 4 domains. As links in the text: docs.aws.amazon.com, cloud.google.com, learn.microsoft.com and finops.org. This is read from the text; nothing was executed.

Is Optimizing Cloud Costs safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Optimizing Cloud Costs use?

Optimizing Cloud Costs is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Optimizing Cloud Costs use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 16 tokens, read only when the agent opens those files.

What are the alternatives to Optimizing Cloud Costs?

Skills that share tags, products or a category with Optimizing Cloud Costs: Cloud Architect (Jeffallan/claude-skills, 12k stars), Cloud Architect (davila7/claude-code-templates, 32k stars), Senior Cloud Architect (borghei/Claude-Skills, 886 stars) and Cloud Cost Optimization (wshobson/agents, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Optimizing Cloud Costs?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,825 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 9, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.