Official agent skill

Cost Optimization

by microsoft in microsoft/GitHub-Copilot-for-Azure

Optimize existing Azure resources and analyze Reservations or Savings Plans.

OfficialMITAuto-check passedDevOps & Cloud

Install Cost Optimization

skills CLI
$ npx skills add microsoft/GitHub-Copilot-for-Azure --skill cost-optimization -a claude-code

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

GitHub CLI
$ gh skill install microsoft/GitHub-Copilot-for-Azure cost-optimization --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/microsoft/GitHub-Copilot-for-Azure.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/azure-cost/skills/cost-optimization .claude/skills/cost-optimization && 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
cost-optimization
GitHub stars
255
Token cost
~487 tokens
SKILL.md length
149 words
Files
10 (incl. references)
Skills in repo
56
Repo updated
First seen
Licence
MIT

At a glance

Optimize existing Azure resources and analyze Reservations or Savings Plans.

  • Works in 5 steps: Confirm scope, period, currency, and… → Load only the matching workflow above. → Never transform MCP results in a shell… → …
  • Pricing estimates
  • SKILL.md covers Quick Reference, When to Use This Skill, MCP Tools and Workflow, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Cost Optimization is an agent skill from microsoft/GitHub-Copilot-for-Azure, published by the product's own GitHub organization. Optimize existing Azure resources and analyze Reservations or Savings Plans. WHEN: "optimize Azure costs", "reduce cloud spending", "rightsize resources", "find idle resources", "orphaned disk", "deleted VM still charged", "public IP still charging", "reservation utilization", "Savings Plan coverage", "commitment recommendation", "why is pay-as-you-go still charged". DO NOT USE FOR: cost spikes, forecasts, pricing estimates, budgets, or governance.

Its SKILL.md is about 490 tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including reference files (for example `references/commitments.md`, `references/optimization.md` and `references/report-template.md`).

It sits in DevOps & Cloud, covering Cloud cost optimization. It works with Microsoft Azure. The repository describes itself as: GitHub Copilot for Azure. The licence is MIT.

When your agent uses it

  • Pricing estimates
  • Tasks that involve Cloud cost optimization

Example prompts

  • “optimize Azure costs”
  • “reduce cloud spending”
  • “rightsize resources”
  • “/cost-optimization”

Workflow steps

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

  1. Confirm scope, period, currency, and commitment intent.
  2. Load only the matching workflow above.
  3. Never transform MCP results in a shell or interpreter; request validated
  4. Separate measured cost, reported savings, and qualitative opportunities.
  5. Recommend changes only; do not delete, resize, purchase, or deploy resources.

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

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

  • Network

    No URLs in SKILL.md.

    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.

Context cost

Cost Optimization loads about 487 tokens when it runs, and up to ~5.4k if it reads all its reference files. Until then it costs about 118 tokens; SKILL.md has 149 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/GitHub-Copilot-for-Azure at commit d8f4f4e, republished under its MIT licence (© microsoft). 149 words, ~487 tokens.

Download SKILL.mdSave it as .claude/skills/cost-optimization/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
cost-optimization
description
Optimize existing Azure resources and analyze Reservations or Savings Plans. WHEN: "optimize Azure costs", "reduce cloud spending", "rightsize resources", "find idle resources", "orphaned disk", "deleted VM still charged", "public IP still charging", "reservation utilization", "Savings Plan coverage", "commitment recommendation", "why is pay-as-you-go still charged". DO NOT USE FOR: cost spikes, forecasts, pricing estimates, budgets, or governance.
license
MIT
metadata.author
Microsoft
metadata.version
0.0.0-placeholder

Azure Cost Optimization

Quick Reference

IntentWorkflowPrimary tools
Reduce waste or rightsizeOptimizationCost and Resource Graph tools
Review commitmentsCommitmentslist_benefit_utilization, list_reservation_transactions, get_benefit_recommendations

When to Use This Skill

Use for waste, rightsizing, and commitments.

MCP Tools

Use cost and Resource Graph tools for optimization and benefit tools for commitments. Validate queries. Fallback: API mappings.

Workflow

  1. Confirm scope, period, currency, and commitment intent.
  2. Load only the matching workflow above.
  3. Never transform MCP results in a shell or interpreter; request validated server-side projection, aggregation, or bounded follow-up queries.
  4. Separate measured cost, reported savings, and qualitative opportunities.
  5. Recommend changes only; do not delete, resize, purchase, or deploy resources.

Error Handling

ErrorAction
Access deniedName the scope and permission.
Multiple currenciesGroup and report each currency separately.
Missing evidenceState the gap; do not invent values.
Server errorRetry once; then report the trace ID.

© microsoft, 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 9 other files (references) in plugins/azure-cost/skills/cost-optimization of microsoft/GitHub-Copilot-for-Azure.

  • SKILL.md
  • references/commitments.md
  • references/optimization.md
  • references/report-template.md
  • references/resource-graph.md
  • references/services/redis.md
  • references/services/storage-lifecycle.md
  • references/services/storage.md
  • references/tool-fallback.md
  • version.json

Open the folder on GitHubat commit d8f4f4e

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders. This page covers the copy in microsoft/GitHub-Copilot-for-Azure, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Cost Optimization 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.

Cost Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cost Optimization this skillmicrosoft/GitHub-Copilot-for-Azure255—~487Automated safety check: PassMIT
Cloud Cost Optimizationwshobson/agents40k13 repos~1.7kAutomated safety check: PassMIT
Spotinfoalexei-led/spotinfo164—~1.8kAutomated safety check: PassApache-2.0
FrugalyuanboP/frugal198—~2.1kAutomated safety check: PassMIT
SkyPilot Multi-Cloud OrchestrationOrchestra-Research/AI-Research-SKILLs13k4 repos~2.4kAutomated safety check: PassMIT
Azure Pricing Lookupthomast1906/github-copilot-agent-skills202—~4.9kAutomated safety check: PassNone

Similar skills

  • 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 13 repos~1.7k tokens
    DevOps & CloudAuto-check passed
  • Spotinfo

    alexei-led/spotinfo

    Query Spot/preemptible VM prices, savings and interruption risk across AWS, GCP and Azure with the spotinfo CLI.

    164 GitHub stars~1.8k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Frugal

    yuanboP/frugal

    Cloud cost awareness for agents. An agent skill from yuanboP/frugal.

    198 GitHub stars~2.1k tokensUpdated 2 mo ago
    DevOps & CloudAuto-check passed
  • SkyPilot Multi-Cloud Orchestration

    Orchestra-Research/AI-Research-SKILLs

    Runs ML training and batch jobs across clouds with SkyPilot, using spot instances, automatic region selection and managed recovery to cut GPU cost.

    13k GitHub starsUsed in 4 repos~2.4k tokens
    DevOps & CloudAuto-check passed
  • Azure Pricing Lookup

    thomast1906/github-copilot-agent-skills

    Looks up live Azure retail prices by SKU, service or region through the Azure MCP pricing tool, estimates template costs and compares regions, price types and savings plans.

    202 GitHub stars~4.9k tokensUpdated 2 mo 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 7 repos~1.9k tokens
    DevOps & CloudAuto-check passed

More from microsoft/GitHub-Copilot-for-Azure

All 56 skills in this repo
  • Capacity

    microsoft/GitHub-Copilot-for-Azure

    Official

    Discovers available Azure OpenAI model capacity across regions and projects.

    255 GitHub starsUsed in 2 repos~1.7k tokens
    Auto-check passed
  • Deploy Model

    microsoft/GitHub-Copilot-for-Azure

    Official

    Unified Azure OpenAI model deployment skill with intelligent intent-based routing.

    255 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Entra Agent Id

    microsoft/GitHub-Copilot-for-Azure

    Official

    Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant)…

    255 GitHub starsUsed in 3 repos~4k tokens
    Auto-check passed
  • Microsoft Foundry

    microsoft/GitHub-Copilot-for-Azure

    Official

    Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end.

    255 GitHub starsUsed in 1 repo~6.7k tokens
    Auto-check passed
  • Azure Storage

    microsoft/GitHub-Copilot-for-Azure

    Official

    Azure Storage Services including Blob Storage, File Shares, Queue Storage, Table Storage, and Data Lake.

    255 GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check passed
  • Azure Diagnostics

    microsoft/GitHub-Copilot-for-Azure

    Official

    Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage.

    255 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed

Works with

Categories

Questions about Cost Optimization

What does Cost Optimization do?

Optimize existing Azure resources and analyze Reservations or Savings Plans. Cost Optimization is an agent skill from microsoft/GitHub-Copilot-for-Azure, published by the product's own GitHub organization. Optimize existing Azure resources and analyze Reservations or Savings Plans.

When should I use Cost Optimization?

Cost Optimization fits situations like: pricing estimates; tasks that involve Cloud cost optimization.

How do I install Cost Optimization in Claude Code?

Run `npx skills add microsoft/GitHub-Copilot-for-Azure --skill cost-optimization -a claude-code`. Or copy the skill folder (plugins/azure-cost/skills/cost-optimization in microsoft/GitHub-Copilot-for-Azure) into .claude/skills/cost-optimization in your project. Claude Code loads it when a task matches its description.

How do I install Cost Optimization in Codex?

Run `npx skills add microsoft/GitHub-Copilot-for-Azure --skill cost-optimization -a codex`. Or copy the skill folder (plugins/azure-cost/skills/cost-optimization in microsoft/GitHub-Copilot-for-Azure) into .agents/skills/cost-optimization in your project. Codex loads it when a task matches its description.

Can I use Cost Optimization 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 microsoft/GitHub-Copilot-for-Azure --skill cost-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cost-optimization, .gemini/skills/cost-optimization, .github/skills/cost-optimization and .opencode/skills/cost-optimization in your project.

What does Cost Optimization need to run?

SKILL.md names no scripts, command-line tools or credentials: Cost Optimization is instructions for the agent only.

Does Cost Optimization access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cost Optimization 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. Review the folder before installing.

What licence does Cost Optimization use?

Cost Optimization 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 Cost Optimization use?

About 487 tokens (SKILL.md is roughly 1.9k 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 5k tokens, read only when the agent opens those files.

What are the alternatives to Cost Optimization?

Skills that share tags, products or a category with Cost Optimization: Cloud Cost Optimization (wshobson/agents, 40k stars), Spotinfo (alexei-led/spotinfo, 164 stars), Frugal (yuanboP/frugal, 198 stars) and SkyPilot Multi-Cloud Orchestration (Orchestra-Research/AI-Research-SKILLs, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cost Optimization?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/GitHub-Copilot-for-Azure, which has 255 GitHub stars. The repository holds 56 skills in this directory. The repository was last updated on October 7, 2026.

Source: microsoft/GitHub-Copilot-for-Azure on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.