بنقرة واحدة
cost-audit
Review cloud costs against budget and identify optimization opportunities
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Review cloud costs against budget and identify optimization opportunities
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Recurring 23-domain enterprise/ISO repository audit — governance, traceability, security, supply chain, reproducibility, observability, architecture, technical debt, DX — produces a findings report with file:line evidence and risk ratings, and preserves the audit bar via anti-patterns Q-01…Q-08
Recurring 23-domain enterprise/ISO repository audit — governance, traceability, security, supply chain, reproducibility, observability, architecture, technical debt, DX — produces a findings report with file:line evidence and risk ratings, and preserves the audit bar via anti-patterns Q-01…Q-08 (Mode: AUTO — AGENTS.md Agent Behavior Protocol applies.)
Debug ML inference issues — latency spikes, wrong predictions, event loop blocking
Scan a service for edge-protection coverage (WAF, DDoS mitigation, rate limiting) against ADR-042/D-38 — produces a PASS/FAIL report with file:line evidence
Scan a service for edge-protection coverage (WAF, DDoS mitigation, rate limiting) against ADR-042/D-38 — produces a PASS/FAIL report with file:line evidence (Mode: AUTO — AGENTS.md Agent Behavior Protocol applies.)
Systematic root-cause diagnosis for any non-ML-serving bug (CI, infra, agentic tooling, drift scripts) — reproduce, minimize, hypothesize, instrument, fix, regression-test
استنادا إلى تصنيف SOC المهني
| name | cost-audit |
| description | Review cloud costs against budget and identify optimization opportunities |
| allowed-tools | ["Read","Grep","Glob","Bash(gcloud:*)","Bash(aws:*)","Bash(kubectl:*)"] |
| when_to_use | Use when reviewing monthly cloud costs, optimizing spend, or preparing FinOps reports. Examples: 'review monthly costs', 'cost optimization', 'FinOps report', 'budget review' |
| argument-hint | [month] [year] |
| authorization_mode | {"collect_billing":"AUTO","analyze_spend":"AUTO","propose_optimizations":"AUTO","push_cost_metric":"AUTO","apply_optimizations":"STOP","escalation_triggers":[{"cost_over_budget_120":"STOP"},{"new_resource_type":"CONSULT"}]} |
gcloud billing accounts list
gcloud billing budgets list --billing-account={ACCOUNT_ID}
# Or use the billing export in BigQuery
aws ce get-cost-and-usage \
--time-period Start=$(date -d '30 days ago' +%Y-%m-%d),End=$(date +%Y-%m-%d) \
--granularity MONTHLY \
--metrics BlendedCost \
--group-by Type=DIMENSION,Key=SERVICE
Compute serving (N APIs × 2 clouds): $___/mo
Compute training (Spot, monthly avg): $___/mo
Databases (Cloud SQL + RDS): $___/mo
Storage (GCS + S3): $___/mo
Registry (Artifact Registry + ECR): $___/mo
Monitoring and Logging: $___/mo
TOTAL: $___/mo
dashboard-business.json's "Monthly Cloud Cost vs. Budget" panel reads
<service>_monthly_cloud_cost_usd from Prometheus — this step is what
populates it. Monthly cadence, matching this skill's own review cycle
(intentionally NOT a real-time cost exporter — see
docs/observability/business-kpis.md for why that would be
over-engineering at this template's scale).
echo "{@ service_slug @}_monthly_cloud_cost_usd ${TOTAL_MONTHLY_COST_USD}" | \
curl --data-binary @- \
"${PUSHGATEWAY_URL:-http://pushgateway:9091}/metrics/job/cost-audit/service/{@ service_slug @}"
| Rule | Status | Action if Violated |
|---|---|---|
| Training on Spot/Preemptible | ✅/❌ | Switch to spot instances (70% savings) |
| Serving on On-Demand | ✅/❌ | Do not change — availability required |
| CPU-only HPA (no idle pods) | ✅/❌ | Fix HPA to avoid over-provisioning |
| Lifecycle policies on buckets | ✅/❌ | Archive after N days, delete after M |
| Budget alerts at 50%/90% | ✅/❌ | Configure in Terraform |
| Non-prod clusters destroyed | ✅/❌ | terraform destroy -var-file=staging.tfvars |
Update the TCO section in service READMEs and relevant ADRs with:
# GCP
terraform plan -target=google_billing_budget.ml_budget
# AWS
terraform plan -target=aws_budgets_budget.ml_budget
Verify alerts fire at 50% and 90% of monthly budget.
The audit is complete when ALL of the following hold:
<service>_monthly_cloud_cost_usd
(Step 2b) so dashboard-business.json reflects the current reviewops/audit.jsonl with operation=cost_review,
result=success, link to the reportIf apply_optimizations was invoked (STOP-class), an additional human
sign-off must be linked from the audit entry per ADR-005.
agentic/rules/01-mlops-conventions.md §FinOpsagentic/workflows/cost-review.md