regime-scanlisted
Install: claude install-skill mthli/skills
# regime-scan
A **market-level** daily read, the layer above the four name-level scans. It answers three questions that move at different speeds:
1. **Trend**: the direction of the primary trend (slow: weeks–months)
2. **Breadth**: whether the trend is healthy or narrowing (the early-warning layer; divergences show up here first)
3. **Sentiment / Credit**: whether fear/greed is stretched and positioning fragile (fast: days)
**A turn tends to show up as internals deteriorating while the index still prints highs.** The scan encodes that two ways: it raises **divergence flags** (breadth not confirming, equal-weight lagging, credit rolling over, defensive rotation, vol-curve inversion), and it logs each US market day once to `state/history.csv`, so the **slope** of breadth / VIX / credit across days (the real turn signal) stays visible beyond today's number.
This formalizes the "regime gate + cohort dashboard" idea from `methodology.md` (2026-06-03) and the breadth/narrowing observations in `macro.md` into one daily action.
## What it pulls (all yfinance, ~516 tickers, one batched download)
- **Indices**: SPY, QQQ vs 50/200DMA + 200DMA slope; RSP/SPY (equal- vs cap-weight = the narrowing proxy)
- **Breadth**: % of the **S&P 500 universe** (`state/breadth_universe.txt`, ~500 names across all 11 sectors, regenerated quarterly by `build_universe.py`) above their 50/200DMA, plus 52-week new-highs − new-lows
- **Vol / sentiment**: ^VIX level + 5-day change; ^VIX/^VIX3M **term st