| name | qovery-optimize |
| description | Reduces Kubernetes cluster and application costs on Qovery. Analyzes historical resource consumption, factors in the user's business context (seasonal patterns, growth stage, reliability requirements), estimates external resource costs from public cloud pricing, and proposes right-sizing, autoscaling, environment scheduling, spot instances, and database mode changes. Generates a cost report with CSV export and applies changes via CLI+API or Terraform. Use when the user asks to reduce costs, right-size, or optimize Qovery resource spend. |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"developers","workflow":"optimization"} |
Qovery Optimize Skill
This skill reduces Kubernetes infrastructure costs on Qovery via right-sizing, autoscaling, environment scheduling, spot instances, and database mode changes.
It is NOT about blindly reducing everything to minimum. It is intelligent optimization that:
- Understands the business context (seasonal peaks, growth expectations, reliability needs)
- Analyzes historical resource consumption, not just current allocation
- Respects safety margins appropriate for each environment
- Estimates external cloud resource costs from public pricing data
- Presents recommendations with expected savings AND risks
When to Use This Skill
Trigger phrases:
- "Optimize my Qovery costs"
- "Right-size my Kubernetes resources"
- "How can I reduce my cloud spending?"
- "My AWS bill is too high"
- "Make my cluster cheaper"
- "Audit my Qovery spending"
/qovery-optimize (slash command)
For slow deployments use qovery-speedup. For deployment failures use qovery-troubleshoot.
Workflow checklist
Cost Optimization Progress:
- [ ] Phase 1 — Context gathering (auth, business context, resource metrics)
- [ ] Phase 2 — Analysis across 7 optimization dimensions
- [ ] Phase 3 — Generate cost report (Markdown + CSV)
- [ ] Phase 4 — Apply approved changes (CLI+API or Terraform) + USER CONFIRMATION per change
- [ ] Phase 5 — Set up ongoing monitoring & follow-up
- [ ] Phase 6 — Document seasonal & special considerations
Reference materials (load on demand)
| Phase | File | Purpose |
|---|
| Console URL | reference/console-url-detection.md | Extract IDs from a Qovery Console URL |
| Auth | reference/auth.md | API token flow |
| Phase 1 | reference/phase1-context-gathering.md | Inventory, business context, resource metrics queries |
| Phase 2 | reference/phase2-optimization-dimensions.md | Right-sizing, autoscaling, DB mode, scheduling, cluster, build, external resources |
| Phase 3 | reference/phase3-cost-report.md | Report template (Markdown + CSV) |
| Phase 4 | reference/phase4-apply-changes.md | CLI+API + Terraform application paths, with per-change confirmation |
| Phase 5 | reference/phase5-monitoring.md | Ongoing dashboards, alert thresholds, follow-up cadence |
| Phase 6 | reference/phase6-seasonal.md | Black Friday / EOY / launch handling |
Cloud pricing reference
For external-resource cost estimation, consult the per-provider pricing tables. These are point-in-time public list prices — verify against the provider's pricing page before quoting savings.
Quick reference
MCP queries
# Cost analysis
"Show me monthly spending"
"What are my highest cost services?"
"Compare costs this month vs last month"
# Resource analysis
"Show CPU usage across all services"
"Find over-provisioned services"
"Find underutilized resources"
# Inactive resources
"Show environments inactive for 24 hours"
"List unused databases"
"Find idle applications"
# Actions
"Stop all development environments for the weekend"
"Scale down the backend to 250m CPU"
"Stop all non-production environments"
# Recommendations
"Should I scale up or down?"
"Optimize resource allocation for my-api"
API endpoints
# Base URL: https://api.qovery.com Auth: Authorization: Token $QOVERY_API_TOKEN
# Costs
GET /organization/{orgId}/currentCost
GET /organization/{orgId}/cluster/{clusterId}/currentCost
GET /organization/{orgId}/invoice
# Metrics
GET /cluster/{clusterId}/metrics?query={promql}&range={duration}&step={interval}
# Service configuration
GET /application/{appId} CPU, memory, instances
PUT /application/{appId} Update CPU, memory, instances
# Cloud provider instance types
GET /organization/{orgId}/cloudProvider/aws/instanceType
GET /organization/{orgId}/cloudProvider/gcp/instanceType
GET /organization/{orgId}/cloudProvider/azure/instanceType
GET /organization/{orgId}/cloudProvider/scaleway/instanceType
# Environment management
POST /environment/{envId}/deploy Redeploy after changes
POST /environment/{envId}/stop
POST /environment/{envId}/restart
CLI commands
qovery cluster list
qovery service list
qovery status
qovery application env list
Reference links