What problem does it solve?
Writing valid Google Cloud Monitoring dashboard widget definitions by hand is error-prone: the google.monitoring.dashboard.v1.Widget protobuf schema has strict field rules, mutually exclusive query types, and UCUM unit conventions. This Skill converts resolved PromQL or ListTimeSeries queries into validated Server-Driven UI (SDUI) Widget textprotos ready for the Dashboards API, gcloud CLI, or declarative dashboard pipelines.
Core Features & Use Cases
- Widget textproto generation: Assembles complete XyChart Widget textprotos with titles, axis labels, plot types, and unit overrides from a PromQL query or ListTimeSeries JSON payload.
- Label and unit synthesis: Computes baseline chart titles, y-axis labels, and UCUM unit overrides from metric metadata, resource types, aligners, and PromQL structure.
- Built-in validation: Parses and validates generated textprotos against the Widget schema, enforcing rules such as the mutual exclusivity of prometheus_query and time_series_filter.
- Use Case: Given a PromQL query like rate(compute_googleapis_com:instance_cpu_utilization[1m]) and its metric metadata, produce a validated dashboard widget textproto with the correct "%" unit override for direct use with the Cloud Monitoring Dashboards API.
Quick Start
Ask the agent to generate a Cloud Monitoring dashboard chart widget from your resolved PromQL query or ListTimeSeries filter along with the metric display name, resource type, and unit.