Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计通过

cost-optimization成本优化

Agent Skill

用于围绕 GitHub 仓库、Issue、Pull Request、分支、提交和代码协作流程提供辅助能力。它适合让 Agent 查询项目状态、整理变更、辅助创建或检查协作事项,并把仓库中的信息转成可执行的下一步。使用时需要区分只读查询和写入操作;涉及创建 PR、修改 Issue、推送分支或访问私有仓库时,应确认 token 权限、目标仓库范围和用户授权。

总安装

259

周安装

11

GitHub Stars

162

下载量

91
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cost-optimization(成本优化)
来源仓库:https://github.com/thomast1906/github-copilot-agent-skills
仓库路径:skills/cost-optimization
安装命令:
npx skills add https://github.com/thomast1906/github-copilot-agent-skills --skill cost-optimization
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/thomast1906/github-copilot-agent-skills --skill cost-optimization

简介

成本优化用于围绕 GitHub 仓库和协作流程提供辅助能力。

  • 适合让 Agent 查询项目状态、整理变更或检查协作事项。
  • 使用时需区分只读查询和写入操作;涉及 PR 或私有仓库时应确认 token 权限。
  • 安装前建议检查权限范围和是否会触发网络或文件操作。
  • cost-optimization 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Cost Optimization Skill

Analyze Azure costs and identify optimization opportunities across compute, storage, networking, and data services. Provide actionable recommendations with savings estimates.

When to Use

  • Review architecture costs and identify waste
  • Optimize existing Azure deployments
  • Right-size over-provisioned resources
  • Implement reserved instances and savings plans
  • Set up cost monitoring and alerts
  • Reduce monthly Azure bills

Cost Optimization Categories

1. Right-Sizing

Adjust resource SKUs to match actual usage patterns.

Target Resources:

  • Virtual Machines
  • App Service Plans
  • SQL Databases
  • Cosmos DB throughput
  • Azure Cache for Redis

Analysis Method:

  1. Review 30-day metrics (CPU, memory, DTU utilization)
  2. Identify resources with < 40% average utilization
  3. Recommend smaller SKU or scaling adjustments

Typical Savings: 30-50%

2. Reserved Instances & Savings Plans

Commit to 1-year or 3-year terms for predictable workloads.

Eligible Services:

  • Virtual Machines
  • App Service Plans
  • Azure SQL Database
  • Cosmos DB
  • Azure Cache for Redis

Savings (typical ranges — always verify with the azure-pricing skill using price-type: Reservation):

  • 1-year: 20-40%
  • 3-year: 40-72%

When to Use: Workloads with consistent, predictable usage

To confirm exact RI rates: use tool_search_tool_regex with pattern pricing, then call the tool with price-type: Reservation and include-savings-plan: true for the specific SKU and region. Compare the returned retailPrice against the Consumption rate to calculate the actual saving percentage.

3. Auto-Scaling

Scale resources based on demand instead of static provisioning.

Applicable Services:

  • App Service
  • Virtual Machine Scale Sets
  • Container Apps
  • AKS node pools
  • Cosmos DB autoscale

Typical Savings: 20-40% (eliminates idle capacity during off-peak)

4. Storage Tiering

Move infrequently accessed data to cheaper storage tiers.

Blob Storage Tiers:

  • Hot: Frequent access (< 30 days old)
  • Cool: Infrequent access (30-90 days), 50% cheaper
  • Archive: Rare access (> 90 days), 90% cheaper

Implementation: Lifecycle management policies

Typical Savings: 50-90% on archived data

5. Eliminate Waste

Identify and remove unused resources.

Common Waste:

  • Unattached disks
  • Stopped (but not deallocated) VMs
  • Orphaned public IPs
  • Unused App Service Plans
  • Old snapshots and backups
  • Idle Load Balancers

Typical Savings: £200-2,000/month per environment

Cost Analysis Process

Step 0: Retrieve Live Pricing with Azure MCP Pricing Tool

Before estimating any costs, invoke the azure-pricing skill to fetch real retail prices.

First, use tool_search_tool_regex with pattern pricing to discover the exact tool name — do not hardcode it. Then call the tool with:

sku:      <ARM SKU e.g. Standard_D4ds_v5>
service:  <e.g. Virtual Machines, Azure Kubernetes Service>
region:   <ARM region slug e.g. uksouth, eastus>
currency: GBP
price-type: Consumption          # on-demand baseline
include-savings-plan: true       # returns 1yr/3yr rates in nested array

Then follow up with price-type: Reservation to retrieve exact reserved instance rates.

Monthly cost formula: hourly_price × 730

Important: The tool requires a specific SKU or service name — do not call it with only a broad category (e.g. "Virtual Machines"). Confirm the SKU before calling.

Build a three-column cost table per resource:

ResourcePay-as-you-go1-yr Reserved3-yr Reserved
(data from pricing tool)

Step 1: Gather Current Costs

Extract cost data from Azure Cost Management:

  • Last 30-60 days of spending by resource
  • Group by resource type and resource group
  • Identify top 10 cost contributors

Step 2: Analyze Resource Utilization

For each major resource:

  • Compute: Average CPU, memory utilization
  • Database: DTU/vCore usage, storage growth
  • Storage: Access patterns, growth rate
  • Networking: Bandwidth usage, idle resources

Step 3: Identify Opportunities

Categorize findings:

  • Quick Wins: < 1 hour, immediate savings (delete unused resources)
  • Right-Sizing: < 1 day, 30-50% savings
  • Reserved Instances: < 1 hour setup, 1-3 year commitment
  • Architecture Changes: > 1 week, significant redesign

Step 4: Calculate ROI

For each recommendation:

  • Current monthly cost
  • Optimized monthly cost
  • Monthly savings
  • Implementation effort (hours)
  • Break-even time

Output Format

Note: All cost figures in the template below are illustrative placeholders. Before populating any analysis, use the azure-pricing skill to retrieve actual retail prices per SKU and region (currency: GBP by default). Never copy heuristic amounts into a real recommendation — always fetch live prices.
# Cost Optimization Analysis
**Architecture**: [Name]
**Current Monthly Cost**: £X,XXX
**Optimized Monthly Cost**: £X,XXX
**Potential Savings**: £XXX/month (XX%)
**Annual Savings**: £X,XXX

---

## Executive Summary
[2-3 sentences on current spending, biggest opportunities, recommended priorities]

---

## Current Cost Breakdown

| Category | Monthly Cost | % of Total |
|----------|-------------|------------|
| Compute | £1,200 | 45% |
| Database | £800 | 30% |
| Storage | £300 | 11% |
| Networking | £250 | 9% |
| Monitoring | £150 | 5% |
| **Total** | **£2,700** | **100%** |

---

## Optimization Opportunities

### Priority 1: Quick Wins (< 1 day effort)

#### Opportunity #1: Delete Unattached Disks
**Current Cost**: £80/month
**Savings**: £80/month (100%)
**Effort**: 30 minutes
**Risk**: Low (verify not needed)
**Action**:
1. Identify unattached disks: `az disk list --query "[?diskState=='Unattached']"`
2. Verify with team (ensure not needed)
3. Delete: `az disk delete --ids <disk-id>`

#### Opportunity #2: Stop Unused Dev/Test VMs After Hours
**Current Cost**: £500/month (VM running 24/7)
**Savings**: £300/month (60%)
**Effort**: 2 hours (automation script)
**Risk**: Low (dev environment)
**Action**: Auto-shutdown policy: 7 PM - 7 AM weekdays, all day weekends

---

### Priority 2: Right-Sizing (< 1 week effort)

#### Opportunity #3: Downsize App Service Plan
**Current**: P2v3 (2 cores, 8GB RAM) - Avg CPU: 20%, RAM: 35%
**Current Cost**: £292/month
**Recommended**: P1v3 (2 cores, 4GB RAM)
**Optimized Cost**: £146/month
**Savings**: £146/month (50%)
**Effort**: 4 hours (testing + validation)
**Risk**: Medium (test performance after change)
**Action**:
1. Validate scaling limits in lower SKU
2. Scale down during low-traffic window
3. Monitor performance for 48 hours
4. Rollback if issues detected

#### Opportunity #4: SQL Database DTU Optimization
**Current**: S3 (100 DTU) - Avg DTU: 35%
**Current Cost**: £300/month
**Recommended**: S1 (20 DTU) with auto-scaling to S2
**Optimized Cost**: £120/month (avg)
**Savings**: £180/month (60%)
**Effort**: 1 day (testing + validation)
**Risk**: Medium (requires performance testing)

---

### Priority 3: Commitment Savings (< 1 hour setup)

#### Opportunity #5: Reserved Instances for Production VMs
**Current**: 2x Standard_D4s_v3 VMs (pay-as-you-go)
**Current Cost**: £280/month per VM = £560/month
**Recommended**: 1-year reserved instance
**Optimized Cost**: £392/month (2 VMs)
**Savings**: £168/month (30%)
**Effort**: 30 minutes (purchase reservation)
**Risk**: Low (production VMs run continuously)
**Commitment**: 1 year

#### Opportunity #6: Azure SQL Reserved Capacity
**Current**: Pay-as-you-go
**Current Cost**: £300/month
**Recommended**: 1-year reserved capacity
**Optimized Cost**: £210/month
**Savings**: £90/month (30%)
**Effort**: 15 minutes
**Commitment**: 1 year

---

### Priority 4: Architecture Optimization (> 1 week)

#### Opportunity #7: Migrate to Serverless Cosmos DB
**Current**: Provisioned 1000 RU/s (24/7)
**Current Cost**: £58/month
**Recommended**: Serverless (pay-per-request)
**Optimized Cost**: £20/month (estimated based on usage patterns)
**Savings**: £38/month (65%)
**Effort**: 1 week (code changes + testing)
**Risk**: Medium (requires application changes)

#### Opportunity #8: Implement Storage Lifecycle Policies
**Current**: 2TB in Hot tier
**Current Cost**: £40/month
**Recommended**: Hot (30 days) → Cool (90 days) → Archive
**Optimized Cost**: £22/month
**Savings**: £18/month (45%)
**Effort**: 4 hours (policy setup)
**Risk**: Low (automated)

---

## Implementation Roadmap

### Month 1: Quick Wins
- Delete unattached disks [£80/month]
- Configure auto-shutdown for dev VMs [£300/month]
- **Month 1 Savings**: £380

### Month 2: Right-Sizing
- Downsize App Service Plan [£146/month]
- Optimize SQL Database DTU [£180/month]
- **Month 2 Savings**: £326

### Month 3: Commitment Savings
- Purchase VM Reserved Instances [£168/month]
- Purchase SQL Reserved Capacity [£90/month]
- **Month 3 Savings**: £258

### Months 4-6: Architecture Changes
- Migrate to Serverless Cosmos DB [£38/month]
- Implement Storage Lifecycle [£18/month]
- **Months 4-6 Savings**: £56

---

## Total Savings Summary

| Timeframe | Cumulative Monthly Savings | Annual Savings |
|-----------|---------------------------|----------------|
| Month 1 | £380 | £4,560 |
| Month 2 | £706 | £8,472 |
| Month 3 | £964 | £11,568 |
| Months 4-6 | £1,020/month | £12,240 |

**Final Optimized Cost**: £1,680/month (from £2,700)
**Total Annual Savings**: £12,240 (38% reduction)

---

## Cost Governance Recommendations

### 1. Set Up Budgets & Alerts
- Monthly budget: £1,800 (10% buffer)
- Alert at 50%, 80%, 90%, 100%
- Auto-notification to team leads

### 2. Tag Resources for Cost Allocation

Environment: Production | Staging | Development CostCenter: IT-12345 Project: ProjectName Owner: teamname@company.com

### 3. Regular Reviews
- Weekly: Review anomalies (via Cost Management)
- Monthly: Cost optimization review
- Quarterly: Reserved instance optimization

### 4. Enable Azure Advisor Recommendations
- Automatically flags optimization opportunities
- Cost, security, reliability, performance recommendations

---

## Conclusion
[Summary with total savings, timeline, and priorities]

Cost Optimization Best Practices

Start with Quick Wins: Delete unused resources first Monitor Before Changing: 30-day metrics for right-sizing decisions Test Performance: Validate after SKU changes Use Automation: Auto-shutdown, lifecycle policies, auto-scaling Set Budgets: Prevent surprise bills Tag Everything: Enable cost allocation and tracking Review Regularly: Monthly cost reviews catch drift Document Decisions: Why resources are sized as they are

Avoid: Blind right-sizing, skipping performance validation, ignoring monitoring, missing reservations

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.46%
按下载量换算30

Claude

29.81%
按下载量换算27

Cursor

20.8%
按下载量换算19

Gemini CLI

8.93%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills