Skip to content
Back to skills

Model Monitoring

ASecurity

Defines model monitoring dimensions and PSI-based drift detection; use when setting up monitoring for a deployed model or responding to drift alerts.

  • 19 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 19, 2026
ai-agentspython

Works with

  • cli

Security analysis

A100/100

Scanned October 19, 2026

npx -y skills add sawrus/agent-guides --skill model-monitoring --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Model Monitoring?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Model Monitoring
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sawrus-model-monitoring/badge)](https://www.skillsdirectory.com/skills/sawrus-model-monitoring)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: model-monitoring
description: "Defines model monitoring dimensions and PSI-based drift detection; use when setting up monitoring for a deployed model or responding to drift alerts."
---

# Skill: Model Monitoring

## When to load

When setting up monitoring for a deployed model or responding to drift alerts.

## Monitoring Dimensions

```
1. Operational health
   - Latency: p50, p95, p99
   - Error rate: prediction failures, input validation failures

2. Data drift (vs training baseline)
   - PSI (Population Stability Index) per feature
   - PSI > 0.2 = significant shift → retrain likely needed

3. Model quality (when labels available)
   - Accuracy metrics after ground truth arrives
   - Business outcome correlation
```

## PSI Drift Detection

```python
def calculate_psi(expected: np.ndarray, actual: np.ndarray, buckets: int = 10) -> float:
    """PSI < 0.1: stable. 0.1-0.2: monitor. > 0.2: retrain."""
    breakpoints = np.percentile(expected, np.linspace(0, 100, buckets + 1))
    exp_counts = np.clip(np.histogram(expected, breakpoints)[0] / len(expected), 1e-4, None)
    act_counts = np.clip(np.histogram(actual, breakpoints)[0] / len(actual), 1e-4, None)
    return np.sum((act_counts - exp_counts) * np.log(act_counts / exp_counts))
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.