[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FD1GDPZG2GB09J3SM3416Z":3,"skill-same:01M6FD1GDPZG2GB09J3SM3416Z":51},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":24,"linkOnly":25,"markdownContent":26,"markdownBody":26,"frontMatter":27,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M6FD1GDPZG2GB09J3SM3416Z","azure-cost-optimization",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",66,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fmicrosoft\u002Fskills\u002Fazure-cost-optimization\u002FSKILL.md",[],[18,19,20,21,22,23],"cost optimization","azure","Optimization","cost","azure cost optimization","azure cost","2026-11-10 10:12:30",false,"# Azure Cost Optimization Skill\n\nAnalyze Azure subscriptions to identify cost savings through orphaned resource cleanup, rightsizing, and optimization recommendations based on actual usage data.\n\n## When to Use This Skill\n\nUse this skill when the user asks to:\n- Optimize Azure costs or reduce spending\n- Analyze Azure subscription for cost savings\n- Generate cost optimization report\n- Find orphaned or unused resources\n- Rightsize Azure VMs, containers, or services\n- Identify where they're overspending in Azure\n- **Optimize Redis costs specifically** - See [Azure Redis Cost Optimization](.\u002Freferences\u002Fazure-redis.md) for Redis-specific analysis\n\n## Instructions\n\nFollow these steps in conversation with the user:\n\n### Step 0: Validate Prerequisites\n\nBefore starting, verify these tools and permissions are available:\n\n**Required Tools:**\n- Azure CLI installed and authenticated (`az login`)\n- Azure CLI extensions: `costmanagement`, `resource-graph`\n- Azure Quick Review (azqr) installed - See [Azure Quick Review](.\u002Freferences\u002Fazure-quick-review.md) for details\n\n**Required Permissions:**\n- Cost Management Reader role\n- Monitoring Reader role\n- Reader role on subscription\u002Fresource group\n\n**Verification commands:**\n```powershell\naz --version\naz account show\naz extension show --name costmanagement\nazqr version\n```\n\n### Step 1: Load Best Practices\n\nGet Azure cost optimization best practices to inform recommendations:\n\n```javascript\n\u002F\u002F Use Azure MCP best practices tool\nmcp_azure_mcp_get_azure_bestpractices({\n  intent: \"Get cost optimization best practices\",\n  command: \"get_bestpractices\",\n  parameters: { resource: \"cost-optimization\", action: \"all\" }\n})\n```\n\n### Step 1.5: Redis-Specific Analysis (Conditional)\n\n**If the user specifically requests Redis cost optimization**, use the specialized Redis skill:\n\n? **Reference**: [Azure Redis Cost Optimization](.\u002Freferences\u002Fazure-redis.md)\n\n**When to use Redis-specific analysis:**\n- User mentions \"Redis\", \"Azure Cache for Redis\", or \"Azure Managed Redis\"\n- Focus is on Redis resource optimization, not general subscription analysis\n- User wants Redis-specific recommendations (SKU downgrade, failed caches, etc.)\n\n**Key capabilities:**\n- Interactive subscription filtering (prefix, ID, or \"all subscriptions\")\n- Redis-specific optimization rules (failed caches, oversized tiers, missing tags)\n- Pre-built report templates for Redis cost analysis\n- Uses `redis_list` command\n\n**Report templates available:**\n- [Subscription-level Redis summary](.\u002Ftemplates\u002Fredis-subscription-level-report.md)\n- [Detailed Redis cache analysis](.\u002Ftemplates\u002Fredis-detailed-cache-analysis.md)\n\n> **Note**: For general subscription-wide cost optimization (including Redis), continue with Step 2. For Redis-only focused analysis, follow the instructions in the Redis-specific reference document.\n### Step 1.6: Choose Analysis Scope (for Redis-specific analysis)\n\n**If performing Redis cost optimization**, ask the user to select their analysis scope:\n\n**Prompt the user with these options:**\n1. **Specific Subscription ID** - Analyze a single subscription\n2. **Subscription Name** - Use display name instead of ID\n3. **Subscription Prefix** - Analyze all subscriptions starting with a prefix (e.g., \"CacheTeam\")\n4. **All My Subscriptions** - Scan all accessible subscriptions\n5. **Tenant-wide** - Analyze entire organization\n\nWait for user response before proceeding to Step 2.\n\n### Step 2: Run Azure Quick Review\n\nRun azqr to find orphaned resources (immediate cost savings):\n\n? **Reference**: [Azure Quick Review](.\u002Freferences\u002Fazure-quick-review.md) - Detailed instructions for running azqr scans\n\n```javascript\n\u002F\u002F Use Azure MCP extension_azqr tool\nextension_azqr({\n  subscription: \"\u003CSUBSCRIPTION_ID>\",\n  \"resource-group\": \"\u003CRESOURCE_GROUP>\"  \u002F\u002F optional\n})\n```\n\n**What to look for in azqr results:**\n- Orphaned resources: unattached disks, unused NICs, idle NAT gateways\n- Over-provisioned resources: excessive retention periods, oversized SKUs\n- Missing cost tags: resources without proper cost allocation\n\n> **Note**: The Azure Quick Review reference document includes instructions for creating filter configurations, saving output to the `output\u002F` folder, and interpreting results for cost optimization.\n\n### Step 3: Discover Resources\n\nFor efficient cross-subscription resource discovery, use Azure Resource Graph. See [Azure Resource Graph Queries](references\u002Fazure-resource-graph.md) for orphaned resource detection and cost optimization patterns.\n\nList all resources in the subscription using Azure MCP tools or CLI:\n\n```powershell\n# Get subscription info\naz account show\n\n# List all resources\naz resource list --subscription \"\u003CSUBSCRIPTION_ID>\" --resource-group \"\u003CRESOURCE_GROUP>\"\n\n# Use MCP tools for specific services (preferred):\n# - Storage accounts, Cosmos DB, Key Vaults: use Azure MCP tools\n# - Redis caches: use mcp_azure_mcp_redis tool (see .\u002Freferences\u002Fazure-redis.md)\n# - Web apps, VMs, SQL: use az CLI commands\n```\n\n### Step 4: Query Actual Costs\n\nGet actual cost data from Azure Cost Management API (last 30 days):\n\n**Create cost query file:**\n\nCreate `temp\u002Fcost-query.json` with:\n```json\n{\n  \"type\": \"ActualCost\",\n  \"timeframe\": \"Custom\",\n  \"timePeriod\": {\n    \"from\": \"\u003CSTART_DATE>\",  \n    \"to\": \"\u003CEND_DATE>\"\n  },\n  \"dataset\": {\n    \"granularity\": \"None\",\n    \"aggregation\": {\n      \"totalCost\": {\n        \"name\": \"Cost\",\n        \"function\": \"Sum\"\n      }\n    },\n    \"grouping\": [\n      {\n        \"type\": \"Dimension\",\n        \"name\": \"ResourceId\"\n      }\n    ]\n  }\n}\n```\n\n> **Action Required**: Calculate `\u003CSTART_DATE>` (30 days ago) and `\u003CEND_DATE>` (today) in ISO 8601 format (e.g., `2025-11-03T00:00:00Z`).\n\n**Execute cost query:**\n```powershell\n# Create temp folder\nNew-Item -ItemType Directory -Path \"temp\" -Force\n\n# Query using REST API (more reliable than az costmanagement query)\naz rest --method post `\n  --url \"https:\u002F\u002Fmanagement.azure.com\u002Fsubscriptions\u002F\u003CSUBSCRIPTION_ID>\u002FresourceGroups\u002F\u003CRESOURCE_GROUP>\u002Fproviders\u002FMicrosoft.CostManagement\u002Fquery?api-version=2023-11-01\" `\n  --body '@temp\u002Fcost-query.json'\n```\n\n**Important:** Save the query results to `output\u002Fcost-query-result\u003Ctimestamp>.json` for audit trail.\n\n### Step 5: Validate Pricing\n\nFetch current pricing from official Azure pricing pages using `fetch_webpage`:\n\n```javascript\n\u002F\u002F Validate pricing for key services\nfetch_webpage({\n  urls: [\"https:\u002F\u002Fazure.microsoft.com\u002Fen-us\u002Fpricing\u002Fdetails\u002Fcontainer-apps\u002F\"],\n  query: \"pricing tiers and costs\"\n})\n```\n\n**Key services to validate:**\n- Container Apps: https:\u002F\u002Fazure.microsoft.com\u002Fpricing\u002Fdetails\u002Fcontainer-apps\u002F\n- Virtual Machines: https:\u002F\u002Fazure.microsoft.com\u002Fpricing\u002Fdetails\u002Fvirtual-machines\u002F\n- App Service: https:\u002F\u002Fazure.microsoft.com\u002Fpricing\u002Fdetails\u002Fapp-service\u002F\n- Log Analytics: https:\u002F\u002Fazure.microsoft.com\u002Fpricing\u002Fdetails\u002Fmonitor\u002F\n\n> **Important**: Check for free tier allowances - many Azure services have generous free limits that may explain $0 costs.\n\n### Step 6: Collect Utilization Metrics\n\nQuery Azure Monitor for utilization data (last 14 days) to support rightsizing recommendations:\n\n```powershell\n# Calculate dates for last 14 days\n$startTime = (Get-Date).AddDays(-14).ToString(\"yyyy-MM-ddTHH:mm:ssZ\")\n$endTime = Get-Date -Format \"yyyy-MM-ddTHH:mm:ssZ\"\n\n# VM CPU utilization\naz monitor metrics list `\n  --resource \"\u003CRESOURCE_ID>\" `\n  --metric \"Percentage CPU\" `\n  --interval PT1H `\n  --aggregation Average `\n  --start-time $startTime `\n  --end-time $endTime\n\n# App Service Plan utilization\naz monitor metrics list `\n  --resource \"\u003CRESOURCE_ID>\" `\n  --metric \"CpuTime,Requests\" `\n  --interval PT1H `\n  --aggregation Total `\n  --start-time $startTime `\n  --end-time $endTime\n\n# Storage capacity\naz monitor metrics list `\n  --resource \"\u003CRESOURCE_ID>\" `\n  --metric \"UsedCapacity,BlobCount\" `\n  --interval PT1H `\n  --aggregation Average `\n  --start-time $startTime `\n  --end-time $endTime\n```\n\n### Step 7: Generate Optimization Report\n\nCreate a comprehensive cost optimization report in the `output\u002F` folder:\n\n**Use the `create_file` tool** with path `output\u002Fcostoptimizereport\u003CYYYYMMDD_HHMMSS>.md`:\n\n**Report Structure:**\n```markdown\n# Azure Cost Optimization Report\n**Generated**: \u003Ctimestamp>\n\n## Executive Summary\n- Total Monthly Cost: $X (? ACTUAL DATA)\n- Top Cost Drivers: [List top 3 resources with Azure Portal links]\n\n## Cost Breakdown\n[Table with top 10 resources by cost, including Azure Portal links]\n\n## Free Tier Analysis\n[Resources operating within free tiers showing $0 cost]\n\n## Orphaned Resources (Immediate Savings)\n[From azqr - resources that can be deleted immediately]\n- Resource name with Portal link - $X\u002Fmonth savings\n\n## Optimization Recommendations\n\n### Priority 1: High Impact, Low Risk\n[Example: Delete orphaned resources]\n- ? ACTUAL cost: $X\u002Fmonth\n- ? ESTIMATED savings: $Y\u002Fmonth\n- Commands to execute (with warnings)\n\n### Priority 2: Medium Impact, Medium Risk\n[Example: Rightsize VM from D4s_v5 to D2s_v5]\n- ? ACTUAL baseline: D4s_v5, $X\u002Fmonth\n- ? ACTUAL metrics: CPU 8%, Memory 30%\n- ? VALIDATED pricing: D4s_v5 $Y\u002Fhr, D2s_v5 $Z\u002Fhr\n- ? ESTIMATED savings: $S\u002Fmonth\n- Commands to execute\n\n### Priority 3: Long-term Optimization\n[Example: Reserved Instances, Storage tiering]\n\n## Total Estimated Savings\n- Monthly: $X\n- Annual: $Y\n\n## Implementation Commands\n[Safe commands with approval warnings]\n\n## Validation Appendix\n\n### Data Sources and Files\n- **Cost Query Results**: `output\u002Fcost-query-result\u003Ctimestamp>.json`\n  - Raw cost data from Azure Cost Management API\n  - Audit trail proving actual costs at report generation time\n  - Keep for at least 12 months for historical comparison\n  - Contains every resource's exact cost over the analysis period\n- **Pricing Sources**: [Links to Azure pricing pages]\n- **Free Tier Allowances**: [Applicable allowances]\n\n> **Note**: The `temp\u002Fcost-query.json` file (if present) is a temporary query template and can be safely deleted. All permanent audit data is in the `output\u002F` folder.\n```\n\n**Portal Link Format:**\n```\nhttps:\u002F\u002Fportal.azure.com\u002F#@\u003CTENANT_ID>\u002Fresource\u002Fsubscriptions\u002F\u003CSUBSCRIPTION_ID>\u002FresourceGroups\u002F\u003CRESOURCE_GROUP>\u002Fproviders\u002F\u003CRESOURCE_PROVIDER>\u002F\u003CRESOURCE_TYPE>\u002F\u003CRESOURCE_NAME>\u002Foverview\n```\n\n### Step 8: Save Audit Trail\n\nSave all cost query results for validation:\n\n**Use the `create_file` tool** with path `output\u002Fcost-query-result\u003CYYYYMMDD_HHMMSS>.json`:\n\n```json\n{\n  \"timestamp\": \"\u003CISO_8601>\",\n  \"subscription\": \"\u003CSUBSCRIPTION_ID>\",\n  \"resourceGroup\": \"\u003CRESOURCE_GROUP>\",\n  \"queries\": [\n    {\n      \"queryType\": \"ActualCost\",\n      \"timeframe\": \"MonthToDate\",\n      \"query\": { },\n      \"response\": { }\n    }\n  ]\n}\n```\n\n### Step 9: Clean Up Temporary Files\n\nRemove temporary query files and folder after the report is generated:\n\n```powershell\n# Delete entire temp folder (no longer needed)\nRemove-Item -Path \"temp\" -Recurse -Force -ErrorAction SilentlyContinue\n```\n\n> **Note**: The `temp\u002Fcost-query.json` file is only needed during API execution. The actual query and results are preserved in `output\u002Fcost-query-result*.json` for audit purposes.\n\n## Output\n\nThe skill generates:\n1. **Cost Optimization Report** (`output\u002Fcostoptimizereport\u003Ctimestamp>.md`)\n   - Executive summary with total costs and top drivers\n   - Detailed cost breakdown with Azure Portal links\n   - Prioritized recommendations with actual data and estimated savings\n   - Implementation commands with safety warnings\n\n2. **Cost Query Results** (`output\u002Fcost-query-result\u003Ctimestamp>.json`)\n   - Audit trail of all cost queries and responses\n   - Validation evidence for recommendations\n\n## Important Notes\n\n### Data Classification\n- ? **ACTUAL DATA** = Retrieved from Azure Cost Management API\n- ? **ACTUAL METRICS** = Retrieved from Azure Monitor\n- ? **VALIDATED PRICING** = Retrieved from official Azure pricing pages\n- ? **ESTIMATED SAVINGS** = Calculated based on actual data and validated pricing\n\n### Best Practices\n- Always query actual costs first - never estimate or assume\n- Validate pricing from official sources - account for free tiers\n- Use REST API for cost queries (more reliable than `az costmanagement query`)\n- Save audit trail - include all queries and responses\n- Include Azure Portal links for all resources\n- Use UTF-8 encoding when creating report files\n- For costs \u003C $10\u002Fmonth, emphasize operational improvements over financial savings\n- Never execute destructive operations without explicit approval\n\n### Common Pitfalls\n- **Assuming costs**: Always query actual data from Cost Management API\n- **Ignoring free tiers**: Many services have generous allowances (e.g., Container Apps: 180K vCPU-sec free\u002Fmonth)\n- **Using wrong date ranges**: 30 days for costs, 14 days for utilization\n- **Broken Portal links**: Verify tenant ID and resource ID format\n- **Cost query failures**: Use `az rest` with JSON body, not `az costmanagement query`\n\n### Safety Requirements\n- Get approval before deleting resources\n- Test changes in non-production first\n- Provide dry-run commands for validation\n- Include rollback procedures\n- Monitor impact after implementation\n\n## SDK Quick References\n\n- **Redis Management**: [.NET](references\u002Fsdk\u002Fazure-resource-manager-redis-dotnet.md)\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fmicrosoft\u002Fskills\u002Fazure-cost-optimization",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill azure-cost-optimization",{"tool":43,"command":44},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill azure-cost-optimization",{"tool":46,"command":47},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill azure-cost-optimization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fmicrosoft\u002Fskills\u002Fazure-cost-optimization\u002FSKILL.md",true,[],[52,66,76,85,91,98],{"skillNo":53,"name":54,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":62,"publishedAt":24},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[57],{"categoryNo":58,"categoryName":59,"taxonomyType":60,"taxonomyTypeDesc":61},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[63,64,65],"model","model hierarchy","model hierarchy skill",{"skillNo":67,"name":68,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":72,"publishedAt":24},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[71],{"categoryNo":58,"categoryName":59,"taxonomyType":60,"taxonomyTypeDesc":61},[73,74,75],"MCP","zoom","zoom mcp",{"skillNo":77,"name":78,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":24},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[82,83,84,74],"sdk","zoom apps sdk","apps",{"skillNo":86,"name":87,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":24},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[87],{"skillNo":92,"name":93,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":97,"publishedAt":24},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[96],{"categoryNo":58,"categoryName":59,"taxonomyType":60,"taxonomyTypeDesc":61},[93],{"skillNo":99,"name":100,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":24},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[100]]