← Repositories

momentum-diff

One search, two windows: re-scores a cached last30days report under a shorter lookback and diffs the rankings to separate breakouts from fading from sustained. Offline companion skill โ€” no extra API calls.

Language PythonStars โ˜… 1Updated 8/28/2026View on GitHub

agent-skillsai-agentsanalyticslast30daysmedia-monitoringmomentum-analysisnews-analysisresearch-toolstopic-researchtrend-detection

momentum-diff

Two-window momentum analysis for any topic. Runs last30days once (a 30-day sweep), then immediately re-scores the same corpus under a shorter window (default: 7 days) using the engine's own scoring math โ€” zero additional API calls, zero drift, because the short window is pure offline math over the exact snapshot the long window just gathered.

The diff between the two views is the product: it separates what's breaking out this week from what's fading from what's sustained evergreen โ€” a velocity signal no single-window research tool can show.

/momentum-diff local LLMs
# Momentum diff: local LLMs
- 30d window: 2026-07-28 -> 2026-08-27
- rescored:   2026-08-21 -> 2026-08-27 (7d)
- week-share of total engagement: 49%   โ† half the month's buzz landed this week

## Breakouts (climbed the most)
- Apple M6/M5 Ultra Mac mini + Studio refresh โ€” rank 17โ†’12 (2d old)
- "What Computer Should You Buy for Local AI" โ€” rank 16โ†’10

## Fading (slipping under the short window)
- "Best Local LLMs โ€“ August 2026" roundup โ€” rank 4โ†’20 (17d old)
- Unsloth desktop app buzz โ€” rank 7โ†’22 (11d old)

## Sustained (top-ranked in both)
- ...

How it works

  1. Sweep. last30days.py "<topic>" --days 30 gathers and ranks the corpus (Reddit, HN, GitHub, TikTok, Bluesky, YouTube, and more โ€” whatever the engine has configured). The engine saves the full ranked candidate list with every score component decomposed.
  2. Re-score. rescore.py --days 7 reloads that saved report, recomputes each candidate's final_score under the 7-day window using the engine's own lib.rerank scoring functions (same math, different freshness scale + out-of-window demotion), then diffs the two rankings.
  3. Read the quadrants. Breakouts (rank climbed โ‰ฅ5) / Fading (dropped โ‰ฅ5) / Sustained (top of both), plus week-share โ€” the fraction of the month's engagement that landed inside the short window (a steady field sits near the proportional baseline, ~23% for 7-of-30; ~50%+ means the field is moving fast).

Because both views come from one snapshot taken seconds apart, there is no freshness drift by construction. Any window pair works: 90โ†’30, 14โ†’3.

Install

Requires the last30days skill installed and set up (v3.21.1 tested). Then:

npx skills add Ozhiaki/momentum-diff

Hermes:

hermes skills install Ozhiaki/momentum-diff/skills/momentum-diff --force

The script auto-discovers the last30days engine across common install locations (~/.agents/skills, ~/.claude plugin cache, per-profile ~/.hermes installs); override with LAST30DAYS_SKILL_SCRIPTS.

Usage

last30days-style sweep, then:
python3 skills/momentum-diff/scripts/rescore.py --days 7 [--as-of YYYY-MM-DD] [--emit md|json] [--top N]

--as-of defaults to the report's own window end (back-to-back semantics); override it for retroactive analysis of a saved report.

--terse prints a sub-280-character pulse block โ€” local LLMs: 49% of 30d buzz L7d plus the top movers โ€” built for posting. Window tokens come from the run's actual ranges, never hardcoded.

Caveats

Credits

License

MIT โ€” see LICENSE.