Skip to content
Back to skills

Eval Drift

ASecurity

Detect quality drift in published briefings by comparing the trailing-7d median composite score against the trailing-30d median (MAD-scaled). Use when the user asks to "check drift", "compare last week to baseline", or "is briefing quality slipping".

  • 44 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 18, 2026
ai-agentspythongobash

Security analysis

A100/100

Scanned October 18, 2026

npx -y skills add hoangsonww/AI-News-Briefing --skill eval-drift --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Eval Drift?

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

Security grade badge for Eval Drift
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hoangsonww-eval-drift/badge)](https://www.skillsdirectory.com/skills/hoangsonww-eval-drift)

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
---
description: Detect quality drift in published briefings by comparing the trailing-7d median composite score against the trailing-30d median (MAD-scaled). Use when the user asks to "check drift", "compare last week to baseline", or "is briefing quality slipping".
---

# Eval — Drift Detection

Surface quality slides before readers notice them. Robust to small-sample outliers via median + MAD scaling.

## How to invoke

```bash
make eval-drift D=YYYY-MM-DD                    # status: ok / alert (informational)
make eval-drift D=YYYY-MM-DD ALERT_EXIT=1       # exit 3 on alert (cron-friendly)
```

Direct invocation supports tuning windows and thresholds:

```bash
python3 eval/drift.py --as-of YYYY-MM-DD \
    --short-window 7 --long-window 30 \
    --z-thresh 1.5 --streak 2 \
    --exit-nonzero-on-alert
```

## Algorithm

For each of the last `--streak` days (default 2):

```
short_med = median(last 7 days of composites)
long_med  = median(last 30 days of composites)
long_mad  = median(|x - long_med|)
scale     = max(long_mad, 0.05)         # floor avoids div-by-zero on flat history
z         = (short_med - long_med) / scale
```

A day is "bad" when `z < -1.5`. If every day in the streak is bad, status flips to `alert`.

## Output

JSON blob with `status` (`ok` / `alert` / `no_data`), the medians, the MAD, the z-score, and an `alerts` list of offending days.

## What to tell the user

Lead with the status. If `alert`, show the offending dates and the z-scores; recommend running `make eval-show` and inspecting the per-card notes to identify which axis is dragging quality down. If `ok`, report the rolling medians anyway so the user has a sense of current quality.

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.