metrics-query
Installation
SKILL.md
Metrics Query Skill
Use this skill to investigate production issues, answer performance questions, and explore metrics data using the cx metrics CLI commands. The workflow guides metric discovery, label exploration, and PromQL query construction.
CLI Commands
All metrics operations use cx metrics with four subcommands:
| Command | Purpose | Key flags |
|---|---|---|
cx metrics search --name <pattern> |
Find metrics by name (wildcard or substring) | --name |
cx metrics get-labels <metric> |
List available label names for a metric | — |
cx metrics query '<expr>' |
Instant PromQL query (single point in time) | --time <timestamp> |
cx metrics query-range '<expr>' |
Range PromQL query (time series) | --start, --end, --step |
Output format: append --output json or --output agents to any command for machine-readable output.