Skip to main content
skill CX Codex

azure-carbon-optimization — Claude Code skill: Azure emissions export

Agent skill for Azure Carbon Optimization: emission exports, RBAC setup and fixes when carbon data stops arriving.

CC-BY-4.0 166 installs ★ 818 updated 2026-10-25

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add MicrosoftDocs/Agent-Skills --skill azure-carbon-optimization -a claude-code
Open on GitHub

What azure-carbon-optimization does

The skill gives the agent a compact reference on Azure Carbon Optimization. It covers broken data collection, the roles that unlock carbon metrics, exports over REST and Python, and the Advisor advice for cutting emissions.

A four-section index sits inside, with line ranges and links to Microsoft Learn. The agent reads the matching part of the local file, or pulls the article through mcp_microsoftdocs:microsoft_docs_fetch and falls back to fetch_webpage when that tool is missing.

Network access is required: offline there is nothing but the local notes. The mcp_microsoftdocs server is a separate install, described in the MicrosoftDocs/mcp repo. Cost Management, Impact Reporting, Monitor and Policy belong to their own skills — this one redirects there rather than covering them.

What it helps with

  • export carbon emissions through the REST API into your own reporting
  • grant a service principal the roles that read emission data
  • find out why a carbon report comes back empty
  • turn Advisor emission advice into concrete resource changes
  • build an emissions export script in Python

Example prompts for the agent

  • Export carbon emissions for this subscription over REST and show me the request body.
  • Which RBAC roles does a service principal need to read Carbon Optimization data?
  • Turn the Advisor emission recommendations for these resources into a checklist.

How to install azure-carbon-optimization

1Skills CLI (Vercel)

npx skills add MicrosoftDocs/Agent-Skills --skill azure-carbon-optimization -a claude-code

2Manually: put the files in place

~/.claude/skills/azure-carbon-optimization/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/azure-carbon-optimization/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about azure-carbon-optimization

How do I install azure-carbon-optimization in Claude Code?

Run npx skills add MicrosoftDocs/Agent-Skills --skill azure-carbon-optimization -a claude-code. The skill file lands at ~/.claude/skills/azure-carbon-optimization/SKILL.md.

What does azure-carbon-optimization do?

It hands the agent Azure Carbon Optimization material: RBAC configuration, REST and Python emission exports, Advisor recommendations, and diagnosis of collection failures.

Does the skill work without the Microsoft Docs MCP server?

It prefers mcp_microsoftdocs tools and falls back to fetch_webpage. Either way the agent needs network access to reach the documentation.

Source text

SKILL.md · CC-BY-4.0
---
name: azure-carbon-optimization
description: Expert knowledge for Azure Carbon Optimization development including troubleshooting, best practices, security, and integrations & coding patterns. Use when exporting emissions via REST/Python, setting RBAC, or applying Azure Advisor carbon optimization guidance, and other Azure Carbon Optimization related development tasks. Not for Cost Management (use azure-cost-management), Azure Impact Reporting (use azure-impact-reporting), Azure Monitor (use azure-monitor), Azure Policy (use azure-policy).
compatibility: Requires network access. Uses mcp_microsoftdocs:microsoft_docs_fetch or fetch_webpage to retrieve documentation.
metadata:
  generated_at: "2026-10-25"
  generator: "docs2skills/1.0.0"
---
# Azure Carbon Optimization Skill

This skill provides expert guidance for Azure Carbon Optimization. Covers troubleshooting, best practices, security, and integrations & coding patterns. It combines local quick-reference content with remote documentation fetching capabilities.

## How to Use This Skill

> **IMPORTANT for Agent**: Use the **Category Index** below to locate relevant sections. For categories with line ranges (e.g., `L35-L120`), use `read_file` with the specified lines. For categories with file links (e.g., `[security.md](security.md)`), use `read_file` on the linked reference file

> **IMPORTANT for Agent**: If `metadata.generated_at` is more than 3 months old, suggest the user pull the latest version from the repository. If `mcp_microsoftdocs` tools are not available, suggest the user install it: [Installation Guide](https://github.com/MicrosoftDocs/mcp/blob/main/README.md)

This skill requires **network access** to fetch documentation content:
- **Preferred**: Use `mcp_microsoftdocs:microsoft_docs_fetch` with query string `from=learn-agent-skill`. Returns Markdown.
- **Fallback**: Use `fetch_webpage` with query string `from=learn-agent-skill&accept=text/markdown`. Returns Markdown.

## Category Index

| Category | Lines | Description |
|----------|-------|-------------|
| Troubleshooting | L32-L36 | Diagnosing and resolving Azure Carbon Optimization issues, including data collection problems, configuration errors, and troubleshooting carbon reporting or optimization results. |
| Best Practices | L37-L41 | Using Azure Advisor to identify, prioritize, and implement recommendations that reduce carbon emissions by optimizing resource usage and configuration. |
| Security | L42-L46 | Configuring role-based access control (RBAC) for Azure Carbon Optimization, including permissions, roles, and access setup for users and service principals. |
| Integrations & Coding Patterns | L47-L51 | Exporting Azure carbon optimization data via REST and Python, including endpoints, auth, payload formats, and sample code for integrating emissions data into external systems. |

### Troubleshooting
| Topic | URL |
|-------|-----|
| Diagnose and fix Azure Carbon optimization issues | https://learn.microsoft.com/en-us/azure/carbon-optimization/troubleshooting |

### Best Practices
| Topic | URL |
|-------|-----|
| Apply Azure Advisor recommendations to cut emissions | https://learn.microsoft.com/en-us/azure/carbon-optimization/reduce-emissions |

### Security
| Topic | URL |
|-------|-----|
| Configure RBAC access for Azure Carbon optimization | https://learn.microsoft.com/en-us/azure/carbon-optimization/permissions |

### Integrations & Coding Patterns
| Topic | URL |
|-------|-----|
| Export Azure Carbon optimization data via REST API | https://learn.microsoft.com/en-us/azure/carbon-optimization/api-export-data |
| Export Azure carbon data via Python REST integration | https://learn.microsoft.com/en-us/azure/carbon-optimization/tutorial-export-python |

© MicrosoftDocs · CC-BY-4.0 · MicrosoftDocs/Agent-Skills

Similar skills

All skills for Cloud: AWS, Azure, GCP →

From the same set144

The whole set →
azure-extended-zones This skill guides Azure Extended Zones work with quotas, security, and configuration. Use it for subscription access, policy, firewall, and disk encryption tasks. CX Codex +1 166installs azure-sovereign-us azure-sovereign-us — a skill for Azure US Government development. Covers architecture, security, FedRAMP and DoD IL5, SACA patterns, and deployment in sovereign clouds on Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode. CX Codex +1 166installs azure-confidential-ledger A skill for Claude Code, Codex, and Cursor that guides Azure Confidential Ledger development. Supplies architectures, quota checks, and deployment templates directly into agent context. CX Codex +1 166installs azure-metrics-advisor azure-metrics-advisor is a Claude Code skill for configuring Azure AI Metrics Advisor, from data feeds and anomaly detection to alerts and REST API integrations. CX Codex +1 166installs azure-education-hub This skill covers Azure Education Hub tasks, including Azure for Students credits, yearly quotas, and Dev Tools for Teaching sign-in issues. CX Codex +1 165installs azure-impact-reporting Guides agents through Azure Impact Reporting setup, connecting Monitor alerts, Logic Apps, and HPC Guest Health reporting. CX Codex +1 165installs azure-peering-service Check Azure Peering Service prefix and routing requirements, including BGP, RPKI status, and AS number criteria. Useful when reviewing a peering configuration. CX Codex +1 165installs azure-data-science-vm Skill adds Azure Data Science VM expertise: troubleshooting, architecture, security, Bicep/ARM deployment, MLflow integration. CX Codex +1 165installs

Project sponsors

Companies that keep this analytics open