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
npx skills add MicrosoftDocs/Agent-Skills --skill azure-carbon-optimization -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/azure-carbon-optimization/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/azure-carbon-optimization/
1Skills CLI (Vercel)
npx skills add MicrosoftDocs/Agent-Skills --skill azure-carbon-optimization -a codex2Manually: put the files in place
.agents/skills/azure-carbon-optimization/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add MicrosoftDocs/Agent-Skills --skill azure-carbon-optimization -a cursor2Manually: put the files in place
.cursor/skills/azure-carbon-optimization/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install MicrosoftDocs/Agent-Skills skills/azure-carbon-optimization2Manually: put the files in place
.github/skills/azure-carbon-optimization/SKILL.md1Skills CLI (Vercel)
npx skills add MicrosoftDocs/Agent-Skills --skill azure-carbon-optimization -a gemini-cli2Platform CLI
gemini skills install https://github.com/MicrosoftDocs/Agent-Skills --path skills/azure-carbon-optimizationManually: put the files in place
.devin/skills/azure-carbon-optimization/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add MicrosoftDocs/Agent-Skills --skill azure-carbon-optimization -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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