AGENT SKILL

云成本分析审计

cost-analysis

当运维人员或定时任务请求对 Zava Learning 资源组进行周期性云成本/支出审计时使用——识别主要成本驱动因素、周环比趋势、闲置或规格过大的资源,以及具体的节省机会。只读;生成用于报告的结论。

适用职业云架构师
License 许可
MIT
最近更新
2026-11-10
Stars
★ 189
Forks
198

01 前言 Front Matter

name
cost-analysis
tools
[ "RunAzCliReadCommands", "GetAzCliHelp", "SearchMemory", "ExecutePythonCode", "microsoft-learn_microsoft_docs_search" ]
metadata
{ "kind": "Skill", "api_version": "azuresre.ai/v2" }
description
Use when an operator or a scheduled task requests a periodic cloud-cost / spend audit of the Zava Learning resource group — identify the top cost drivers, week-over-week trend, idle or oversized resources, and concrete savings opportunities. Read-only; produces findings for a report.

03 SKILL.md 正文

Zava Learning — Cloud Cost Analysis

Resource Group: @@RG@@. Read-only audit — never resize, deallocate, or delete a resource. This is a weekly spend posture review. Recommend optimisations for a human to apply; change nothing.

1. Pull actual spend (preferred path)

Use Cost Management for real billed amounts, scoped to the RG:

  • This week vs. last week by resource: az costmanagement query --type ActualCost --timeframe Custom --time-period from=<start> to=<end> --scope "/subscriptions/<sub>/resourceGroups/@@RG@@" --dataset-grouping name=ResourceId type=Dimension --dataset-aggregation totalCost.name=Cost totalCost.function=Sum (run it for the current 7-day window and the prior 7-day window, then diff per ResourceId).
  • Or month-to-date by service: same query grouped by ServiceName. If az costmanagement is missing or returns an auth error (the agent identity lacks Cost Management Reader), FALL BACK to az consumption usage list --start-date <d> --end-date <d> filtered to the RG. Record which data source you used so the report is honest about provenance.

2. If billing data is unavailable, estimate from inventory

As a last resort (no Cost Management and no consumption access), build an estimate:

  • Inventory the RG: az resource list -g @@RG@@ --query "[].{name:name,type:type,sku:sku}".
  • Note the cost-bearing resources (PostgreSQL Flexible Server SKU, the reporting VM SKU + managed disks, Container Apps environments + per-app replicas/scale, Application Gateway tier + capacity units, Log Analytics ingestion, Key Vault, ACR SKU, public IPs).
  • Use microsoft-learn_microsoft_docs_search / known Azure retail pricing to produce a rough, clearly-labelled estimate, not a billed figure. State the assumption explicitly.

3. Find waste and right-sizing opportunities (read-only signals)

  • Idle/oversized: VMs that are deallocated yet still incurring disk cost; disks not attached to any VM (az disk list -g @@RG@@ --query "[?managedBy==null]"); over-provisioned VM/DB SKUs vs. observed CPU/memory; Container Apps with high min-replicas but low traffic.
  • Orphaned: unattached public IPs, empty App Gateway backend pools, unused NICs, old ACR images.
  • Trend: any ResourceId whose week-over-week cost rose sharply — flag it with the Δ%.

4. Produce the findings table

For each driver/opportunity output a row: Resource (type) · This week $ · Last week $ · Δ% · Finding · Severity · Recommendation. Severity is impact-based: a sharp WoW spike or a clearly idle/ oversized paid resource is SEV2; smaller tidy-ups are SEV3. Sort by this-week spend (and severity). Also produce a posture summary (total RG spend this week, WoW delta, the single biggest saving) and a prioritized recommendations list with rough monthly savings where you can estimate them.

5. Hand off to the branded report

This skill does not remediate. Pass the posture summary, the findings rows (each with its severity), the spend numbers, and the recommendations to the zava-audit-report skill, which renders the single branded, downloadable PowerPoint deck (top cost drivers chart + findings table) and returns its download link. Surface that link to the operator.

04 同仓库更多 Skills

microsoft
microsoft/sre-agent

Zava 事件分析报告生成

zava-reporting

用于将已完成的 Zava Learning 事件分析打包呈现给受众。首先呈现带品牌标识的线程内执行摘要(内联前后对比视觉效果的 markdown),然后生成可下载的交付物——PowerPoint 演示文稿、HTML 电子邮件和 Teams 通知,使用 Zava 企业模板。调用的 agent 可将其缩小为子集(例如仅 HTML 报告)。产出内容和工件;它不负责发送。组装 rca-analysis、evidence-before-after、recommendations-next-steps 和 pr-delivery 的输出。

SRE 工程师安全事件响应与威胁狩猎
★ 189
microsoft
microsoft/sre-agent

Zava 治理审计报告生成

zava-audit-report

用于将已完成的 Zava Learning 每周治理审计(NSG/网络安全、RBAC/最小权限或云成本)打包成一份采用 Zava 企业风格、带品牌标识的可下载 PowerPoint 演示文稿。调用的审计 agent 传入其发现结果(带严重级别的条目列表)和简短的安全态势摘要;本技能渲染演示文稿、应用脱敏处理,并返回附件下载链接。产出工件本身;它不负责发送。

云架构师云合规与数据边界管理
★ 189
microsoft
microsoft/sre-agent

ServiceNow 变更请求管理

servicenow-change-management

当 Zava Learning 调查产生了需要变更管理的持久性修复时使用——在为基础设施即代码或应用代码的根本原因打开 GitHub PR 之后,提出引用该 PR 的 ServiceNow 变更请求并附上 RCA 报告。是 ServiceNow 变更请求及附件操作的唯一负责方。

SRE 工程师部署与发布管理
★ 189
microsoft
microsoft/sre-agent

敏感信息脱敏

redaction-guard

每当要输出操作员可见的内容时使用——聊天/话题消息、PagerDuty 或 ServiceNow 记录、提交信息或拉取请求正文,或任何报告制品(HTML、PowerPoint、Teams 卡片)。确定性地屏蔽密钥、凭证、令牌、私钥、URI 中嵌入的密码以及个人身份信息(PII),确保它们不会出现在对话或任何交付物中。这是一项横切护栏,由产生输出的技能调用,而非一个操作手册步骤。

安全工程师凭证与密钥管理
★ 189
microsoft
microsoft/sre-agent

事件改进建议

recommendations-next-steps

用于为 Zava Learning 事件生成前瞻性的建议和后续步骤——包括按优先级排序的预防性、检测性和流程性行动,并附带负责人、目标日期和不采取行动的风险。其输出用于 zava-reporting 交付物。

SRE 工程师安全事件响应与威胁狩猎
★ 189
microsoft
microsoft/sre-agent

事件根因分析

rca-analysis

用于为已解决或已缓解的 Zava Learning 事件生成根因分析叙述——包括事件时间线、触发因素与潜在根因(5-Whys)、促成因素以及如何呈现这些内容。定义 RCA 章节格式;其输出用于前后对比、建议和报告等交付物。

SRE 工程师安全事件响应与威胁狩猎
★ 189