Agent skill · Data & Analytics

detect-metric-anomaly

Analyze a metric for statistical anomalies using z-score analysis and threshold checking. Detects spikes, drops, and trends. Use for proactive monitoring and early warning. Keywords: anomaly, detection, metric, z-score, threshold, alert, statistical.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill detect-metric-anomaly --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 3 KB
Bundled scripts: none
Version: 1.0.0
Path: skills/analysis/detect-metric-anomaly/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Detect Metric Anomaly ## Preconditions Before applying this skill, verify: - Metric name and current value available - Historical baseline exists (or can be established) - Threshold configuration available ## Actions ### 1. Retrieve Baseline Statistics Get or calculate baseline from history: ```yaml metric: $metric_name window_size: 1000 # Last N data points statistics: - mean - std_dev - percentile_95 ``` ### 2. Calculate Z-Score Determine how far current value deviates from baseline: ```python z_score = (current_value - baseline.mean) / baseline.std_dev ``` Interpret z-score: - |z| < 2: Normal variation - 2 <= |z| < 3: Warning (unusual) - |z| >= 3: Critical (anomaly) ### 3. Check Absolute Thresholds Compare against configured thresholds: ```yaml cpu_percent: warning: 80 critical: 95 memory_percent: warning: 80 critical: 90 error_rate: warning: 0.01 critical: 0.05 ``` ### 4. Detect Trends Analyze recent window for sustained deviation: ```python if 80% of last 10 values > baseline.mean: trend = "increasing" elif 80% of last 10 values < baseline.mean: trend = "decreasing" else: trend = "stable" ``` ### 5. Generate Alert If anomaly detected: ```yaml alert: metric: $metric_name seve

What's inside
Steps it walks through
  1. Preconditions
  2. Actions
  3. 1. Retrieve Baseline Statistics
  4. 2. Calculate Z-Score
  5. 3. Check Absolute Thresholds
  6. 4. Detect Trends
  7. 5. Generate Alert
  8. Success Criteria
  9. Failure Handling
  10. Examples
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the detect-metric-anomaly skill do?

Analyze a metric for statistical anomalies using z-score analysis and threshold checking. Detects spikes, drops, and trends. Use for proactive monitoring and early warning. Keywords: anomaly, detection, metric, z-score, threshold, alert, statistical.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill detect-metric-anomaly --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going