← back to Last30 Skill

skills/last30/SKILL.md

147 lines

---
name: last30
description: 'Research what people actually said about any topic in the LAST 30 DAYS, ranked by real engagement (upvotes, points, GitHub stars, prediction-market money) and recency, then synthesize one grounded, cited brief. Runs a zero-dependency Python engine over free no-key APIs (Hacker News, arXiv, GitHub, Polymarket) and supplements social platforms (Reddit, X, YouTube, TikTok, Instagram) through the host web search. This skill should be used when the user asks what people are saying about a topic, the latest or recent buzz or current state of something, what is trending in a domain, wants a recency-scoped multi-source scan, or invokes /last30. Not for evergreen facts, code in the current repo, or single-site lookups.'
argument-hint: 'last30 nvidia earnings reaction | last30 AI video tools --days 7 | last30 doctor'
allowed-tools: Bash, Read, WebSearch, AskUserQuestion
homepage: https://github.com/mvanhorn/last30days-skill
license: MIT
user-invocable: true
metadata:
  type: reference
  inspired-by: mvanhorn/last30days-skill (MIT)
  engine: scripts/last30.py
  tags:
    - research
    - recency
    - trends
    - multi-source
    - engagement-ranked
    - hacker-news
    - arxiv
    - github
    - polymarket
    - reddit
    - tiktok
    - instagram
    - citations
---

# /last30

## Overview

`/last30` answers **"what have people actually been saying/betting/shipping about
this topic in the last N days?"** — not an editor's summary, but the real signal,
ranked by what people engaged with. It runs a deterministic Python engine over
free no-key APIs, layers in social platforms via the host's web search, and
synthesizes a single grounded, cited brief.

This is a **specific research contract**, not a keyword to improvise against.
Always run the engine (Step 2). Do not answer from web search or memory alone.

## When to use

- "What are people saying about `<topic>`?" / "latest on `<topic>`" / "recent buzz"
- "What's trending in `<domain>`?" / "current state of `<X>`"
- Any request scoped to **recency** ("this month", "past week", "right now") that
  benefits from multiple engagement signals converging.

Do **not** use for: evergreen/definitional facts, code in the current repo, or a
single known URL (use WebFetch for that).

## The pipeline

### Step 0 — Resolve host web search
Confirm a web-search tool exists this session. Prefer, in order: the **Exa MCP**
(`mcp__exa__web_search_exa`) if connected, else the built-in **WebSearch** tool.
This is what covers Reddit/X/YouTube/TikTok/Instagram in Step 3. If neither
exists, proceed with the engine-only sources and say so in the brief.

### Step 1 — Parse intent
- **Topic run** (default): a subject was named → Steps 2–4.
- **Doctor**: user said "doctor"/"is it working" → run `python3 scripts/last30.py doctor`
  and relay verbatim. Stop.
- Pick the window: default **30 days**; honor "past week" → `--days 7`, etc.

### Step 2 — Run the engine (REQUIRED)
From the skill directory, run the engine via Bash. Use `--emit markdown` for a
quick read, or `--emit json` when you want to re-rank/synthesize yourself:

```bash
python3 scripts/last30.py "<topic>" --days 30 --emit markdown
```

Common flags:
- `--days N` — lookback window (default 30)
- `--sources hn,arxiv,github,polymarket` — default set (all free, no keys)
- `--limit N` — items per source (default 12)
- `--emit json|markdown`
- `--min-relevance 0.4` — topic-token coverage gate (default 0.4) that kills
  keyword collisions (e.g. "Kimi" the F1 driver vs "Kimi K2" the model). Raise
  toward 0.6 to tighten, `--no-filter` (or `0`) to disable. Dropped counts are
  reported, never silent.
- add `reddit` to `--sources` only on networks where Reddit isn't IP-blocked

The engine is fault-isolated: a source that 429s/403s returns an `error` marker,
never crashes the run. Relay a **"nothing solid in the window"** result honestly —
do not pad it with fabricated items.

### Step 3 — Supplement social platforms via host web search
The engine deliberately omits key-gated / IP-blocked platforms. Fill the gaps
with the Step-0 tool, scoped to recency and domain. Run these **in parallel**:

- **Reddit** — `allowed_domains: ["reddit.com"]`, query `<topic>`. **Exa only** —
  the built-in WebSearch is blocked from `reddit.com` (400), so if Exa isn't the
  Step-0 tool, Reddit is unavailable this run; report that rather than implying it.
- **X / Twitter** — `allowed_domains: ["x.com","twitter.com","nitter.net"]`.
- **YouTube** — `allowed_domains: ["youtube.com"]` (look for reaction/deep-dive).
- **TikTok** — `allowed_domains: ["tiktok.com"]` (creator takes, trend clips). The
  web index for TikTok is **sparse — best-effort**; capture view/like counts only
  when the search snippet actually shows them, and don't invent them.
- **Instagram** — `allowed_domains: ["instagram.com"]` (Reels / posts). Also
  **best-effort** — login-walled, so expect thin coverage; keep what the index
  surfaces and move on.
- Optionally **news/web** — a broad Exa search for the freshest reporting.

Keep only results plausibly inside the window. Capture the engagement signal when
visible (upvotes, view counts). TikTok/Instagram are the thinnest layer — treat a
few relevant hits as a bonus, never pad the brief to force them in. See
`references/sources.md` for the full source matrix and the reasoning behind the
engine/web-search split.

### Step 4 — Synthesize one grounded brief
Merge engine output + web-search supplements into a single brief:

1. **Headline** — the 1–2 sentence "here's what matters" (not "here's what I found").
2. **What people are saying** — 4–8 bullets, each **grounded in a specific item**
   with its engagement number and an inline citation `([source](url))`.
3. **Signals & convergence** — where multiple sources agree; note Polymarket odds
   as *money-backed probability*, not opinion.
4. **New research / tools** — notable arXiv papers and fast-rising GitHub repos.
5. **Caveats** — sources that were unavailable this run, and thin windows.

Rank by the engine's `score` (engagement × recency) and cite every claim. For
long syntheses on Steve's stack, a local Ollama model (hermes3:8b / qwen3:14b)
can do the merge at **$0** — but the agent doing it directly is fine.

## Cost

Engine + host web search over free sources = **$0 (local/free)**. If the host
web search is the paid **Exa MCP**, note it: roughly a few cents per run for the
Step-3 supplements. Surface the cost line per Steve's standing rule.

## Examples

```bash
python3 scripts/last30.py "nvidia earnings reaction" --emit markdown
python3 scripts/last30.py "AI video tools" --days 14 --limit 8 --emit markdown
python3 scripts/last30.py "rust vs zig" --emit json          # then synthesize
python3 scripts/last30.py doctor                             # health check
```

## Files

- `scripts/last30.py` — the zero-dependency engine (stdlib only; Python 3.9+).
- `references/sources.md` — per-source config, the engine/web-search split
  rationale, optional keyed sources, and scoring details.