ops-cost-optimization

v2026.09.24

Audits SaaS/PaaS, cloud commitment, and AI/LLM costs across Vercel, Supabase, AWS, and Cloudflare. Use when analyzing bills, right-sizing plans, or buying commitments.

GitHub
安装命令
npx skhub add vasilyu1983/ops-cost-optimization
Markdown
SKILL.md

SaaS/PaaS Cost Optimization

Use this skill to audit, reduce, and monitor infrastructure and SaaS spending. Keep the output operational: cost breakdown, waste identification, optimization actions, and monitoring setup.

Quick Reference

NeedStarting ReferenceNotes
audit Vercel billreferences/vercel-cost-guide.mdISR, Functions, Fast Origin Transfer, Image Optimization
audit Supabase billreferences/supabase-cost-guide.mdcompute, storage, bandwidth, Auth MAUs, Edge Functions
audit email costsreferences/resend-cost-guide.mdvolume tiers, batch efficiency, domain warm-up
audit domain costsreferences/domain-registrar-cost-guide.mdGoDaddy vs Cloudflare vs Namecheap, transfer savings
audit payment processingreferences/stripe-cost-guide.mdtransaction fees, Radar, Billing, volume negotiation
audit AI API spendreferences/ai-api-cost-guide.mdClaude, GPT, prompt caching, batch API, model routing
audit CI/CD costsreferences/github-cicd-cost-guide.mdActions minutes, Copilot, Codespaces, hosting alternatives
audit monitoring costsreferences/monitoring-analytics-cost-guide.mdPostHog, Sentry, Datadog, free tier maximization
audit CDN/edge costsreferences/cloudflare-cost-guide.mdWorkers, R2, Pages, DNS, free tier scope
quantify uncertain cost or budget riskreferences/cost-uncertainty-method.mdreproducible Monte Carlo, joint empirical dependence, Morris screening
decide on AWS/GCP/Azure commitments or K8s cost allocationreferences/cloud-commitment-and-k8s-cost-guide.mdSavings Plans vs RIs vs Spot, CUDs, Azure Reservations, when NOT to commit, OpenCost/Kubecost, GPU capacity
set up cost monitoringreferences/cost-monitoring-setup.mdbudget alerts, review cadence, annual cost calendar, FOCUS normalization
track unit economicsreferences/unit-economics-guide.mdcost per customer/feature/request, ARPC tracking, FOCUS standard
IaC cost guardrails in CIreferences/github-cicd-cost-guide.mdInfracost PR diffs, budget-threshold merge gates
monthly cost reviewassets/monthly-cost-review-checklist.mdreusable review template
automated cost audit from billing dataagents/cost-auditor.mdparses screenshots/API data, ranks top 5 cost drivers, outputs prioritized actions

Workflow

  1. inventory — list all paid services, current plans, billing cycles, and monthly spend
  2. audit — for each service: pull usage data, compare to plan limits, identify top cost drivers by dollar amount
  3. diagnose — classify each cost line:
    • necessary: directly supports revenue or product function
    • reducible: supports function but can be lowered via architecture or configuration
    • wasteful: unused, over-provisioned, or cheaper alternative exists
  4. optimize — load the platform-specific reference file and apply the highest-impact tactics first
  5. verify — keep the estimate as a forecast until a comparable usage export or closed bill shows the change; normalize for traffic, seats, storage, and billing-period length
  6. monitor — set up budget alerts, usage dashboards, and a monthly review cadence using references/cost-monitoring-setup.md

Uncertain cost decisions

Trigger this only when ranges or dependence can change the decision. Supply bounded distributions with units, dated provenance, distribution rationale, an auditable component formula, budget, draws, and seed; use the example as the input contract. Run python3 scripts/cost_uncertainty.py --input assets/cost-uncertainty-example.json --sensitivity. Read cost quantiles and modeled budget-exceedance probability separately from simulation_error; more draws reduce numerical error, not model uncertainty. Use deterministic arithmetic for fixed inputs, and fall back to low/base/high scenarios when probability weights or dependence cannot be defended.

ASCII Flow

Cost concern or bill review
  -> Inventory paid services, owners, plans, cycles, and spend
  -> Rank cost lines by monthly dollar impact
  -> Classify each line
     +-- necessary -> protect and monitor
     +-- reducible -> tune architecture, usage, seats, or plan tier
     +-- wasteful -> cancel, consolidate, or downgrade
  -> Load platform guide for top drivers
  -> Apply highest-impact optimizations first
  -> Add budget alerts, dashboards, and monthly review cadence

Decision Rules

  • start with the highest-cost service and work down
  • distinguish usage-based charges (optimizable) from flat subscriptions (right-size or cancel)
  • check if the free tier covers actual usage before paying for a plan
  • prefer architecture changes (caching, CDN, SSG, on-demand ISR) over plan upgrades
  • compare annual vs monthly pricing — annual often saves 15-20%
  • consolidate services when one platform covers multiple needs (e.g., Cloudflare for DNS + CDN + storage)
  • never optimize a $2/month line before a $20/month line
  • when in doubt, measure for one billing cycle before cutting
  • never buy a commitment (Savings Plan, RI, CUD, Reservation) against usage that hasn't been stable for 4-6+ weeks, or during an active migration/re-platform — see references/cloud-commitment-and-k8s-cost-guide.md
  • separate zero-risk waste elimination from margin/durability trade-offs before cutting — a cut that reduces headroom or DR posture needs an explicit risk owner, not just a plan-tier downgrade
  • weigh implementation and ongoing operational cost (engineer-time, new on-call burden) against savings before recommending a migration — a cheaper service that costs six weeks to adopt often doesn't pay back for a year
  • mark each result forecast, observed, or realized; only realized means the saving appeared on a closed bill without an unacceptable SLO, support, security, or recovery regression

Cost Categories

CategoryExamplesOptimization Lever
computeVercel Functions, Supabase database, edge workersreduce invocations, optimize cold starts, right-size memory
bandwidthFast Origin Transfer, database egress, CDN transfercaching, compression, image optimization, SSG
storageSupabase storage, R2, S3, blob storeslifecycle policies, compression, deduplication
per-requestISR writes/reads, API calls, email sendsbatching, caching, debouncing, on-demand invalidation
subscriptionsPro plans, seats, add-onsright-size plan tier, remove unused seats/add-ons
transaction feesStripe processing, dispute feesvolume negotiation, reduce disputes, batch payouts
AI tokensClaude API, OpenAI API, fine-tuning, self-hosted GPU inferenceprompt caching, model routing, batch API, shorter prompts, spot/reserved GPU capacity
cloud commitmentsAWS Savings Plans/RIs, GCP CUDs, Azure Reservationscommit only against a verified stable usage floor, layer flexible + rigid instruments, never commit mid-migration
K8s cluster costshared node pools, control plane, storage, load balancersnamespace/label cost allocation (OpenCost/Kubecost), request-vs-usage rightsizing

When to Use This Skill

  • monthly bill is higher than expected and you want to find what's driving it
  • launching new projects and want to forecast infrastructure costs
  • comparing free tier vs paid tier for a service
  • setting up cost alerts and budget monitoring
  • annual cost review and plan right-sizing
  • evaluating whether to switch or consolidate services
  • deciding whether to buy a Savings Plan, Reserved Instance, or Committed Use Discount, and how much
  • allocating shared Kubernetes cluster cost back to teams or features
  • governing AI/LLM spend before a new model-backed feature ships

Route Elsewhere


Optimization Playbook

Quick wins (do first)

  • remove unused projects, environments, and preview deployments
  • switch time-based ISR revalidation to on-demand revalidation
  • enable image optimization and compression
  • check for services still on paid plans but no longer used
  • consolidate DNS to a provider that includes it free (Cloudflare)

Architecture changes (do next)

  • move static content to CDN or SSG to reduce function invocations
  • add response caching at edge to reduce origin transfer
  • batch API calls and email sends instead of per-request
  • use prompt caching for repeated AI API calls
  • implement connection pooling to reduce database compute

Plan optimization (do quarterly)

  • compare current usage against plan tier limits
  • evaluate annual vs monthly billing
  • check if usage has dropped below the free tier threshold
  • negotiate volume pricing when crossing tier boundaries
  • remove unused seats and add-ons

Anti-Patterns

  • optimizing $1 costs while ignoring $50 costs
  • switching to a cheaper service without accounting for migration effort
  • cutting costs that directly support revenue-generating features
  • skipping monitoring setup — costs drift back up within months
  • over-provisioning "just in case" without measuring actual usage
  • paying for annual plans on services you might stop using

Navigation

Platform references

Cross-platform

Agents

Related Skills

Fact-Checking

  • Verify current pricing, tier limits, and free-tier inclusions before final recommendations.
  • Pricing changes frequently — prefer official pricing pages over cached knowledge.
  • If web access is unavailable, mark pricing-sensitive guidance as unverified and include the official pricing URL from data/sources.json.

Learnings Loop

When prior decisions or pitfalls are relevant, consult learnings.consolidated.md if present; use learnings.md only for needed history or as the available fallback. Otherwise skip both.

After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.

发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

2026年9月24日

分类

未分类

许可证

MIT

源路径

frameworks/shared-skills/skills/ops-cost-optimization

默认分支

main

最新提交

8dc5de4

Tree SHA

700bf67