npx skills add ...
npx skills add axiomhq/cli --skill detect-anomalies
Detect anomalies in Axiom datasets using statistical analysis. Use when looking for unusual patterns, volume spikes, outliers, or new error types in observability data.
npx skills add axiomhq/cli --skill detect-anomalies
Detect anomalies in Axiom datasets by comparing recent patterns to historical baselines using statistical analysis.
When invoked with a dataset name (e.g., /detect-anomalies logs), it's available as $ARGUMENTS.
Statistical anomaly detection requires sufficient data:
If these aren't met, results may be misleading. Consider using simpler threshold-based alerting instead.
Always verify field names first:
Compare recent volume to baseline:
Calculate baseline (past 24h excluding last hour):
Check recent volume:
Z-score calculation:
z_score = (current - avg) / stdev|z_score| > 2 indicates anomalyFind values that appeared recently but weren't seen before:
Replace error_code with any categorical field (service, endpoint, status).
Find values outside normal distribution:
Calculate bounds:
Find outliers:
Find infrequent occurrences:
Compare error rate to baseline:
Track percentile changes:
| Type | Detection Method | Indicates |
|---|---|---|
| Volume Spike | Z-score on count | Traffic surge, attack, incident |
| Volume Drop | Z-score on count | Outage, data collection issue |
| New Values | Left anti-join | New errors, new services |
| Statistical Outlier | 3-sigma rule | Extreme performance issue |
| Rare Events | Count = 1 | Unusual conditions |
| Error Spike | Error rate increase | Service degradation |
| Latency Spike | Percentile increase | Performance issue |
For query syntax, invoke the axiom-apl skill which provides anomaly detection patterns and function documentation.