by mvanhorn
AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
# Add to your Claude Code skills
git clone https://github.com/mvanhorn/last30days-skillPermissions overview: Reads public web/platform data and optionally saves research briefings to
~/Documents/Last30Days/. X/Twitter search uses optional user-provided tokens (AUTH_TOKEN/CT0 env vars). Bluesky search uses optional app password (BSKY_HANDLE/BSKY_APP_PASSWORD env vars - create at bsky.app/settings/app-passwords). All credential usage and data writes are documented in the Security & Permissions section.
Research ANY topic across Reddit, X, YouTube, and other sources. Surface what people are actually discussing, recommending, betting on, and debating right now.
Before running any last30days.py command in this skill, resolve a Python 3.12+ interpreter once and keep it in LAST30DAYS_PYTHON:
for py in python3.14 python3.13 python3.12 python3; do
command -v "$py" >/dev/null 2>&1 || continue
"$py" -c 'import sys; raise SystemExit(0 if sys.version_info >= (3, 12) else 1)' || continue
LAST30DAYS_PYTHON="$py"
break
done
if [ -z "${LAST30DAYS_PYTHON:-}" ]; then
echo "ERROR: last30days v3 requires Python 3.12+. Install python3.12 or python3.13 and rerun." >&2
exit 1
fi
An AI agent-led search engine scored by upvotes, likes, and real money - not editors.
This README tracks the current v3 pipeline. The runtime skill spec lives in skills/last30days/SKILL.md, which is the source of truth for the latest command and setup behavior.
Claude Code:
/plugin marketplace add mvanhorn/last30days-skill
OpenClaw:
clawhub install last30days-official
Zero config. Reddit, HN, Polymarket, and GitHub work immediately. Run it once and the setup wizard unlocks X, YouTube, TikTok, and more in 30 seconds.
Reddit upvotes. X likes. YouTube transcripts. TikTok engagement. Polymarket odds backed by real money and insider information. That's millions of people voting with their attention and their wallets every day. /last30days searches all of it in parallel, scores it by what real people actually engage with, and an AI agent judge synthesizes it into one brief.
Google aggregates editors. /last30days searches people.
You can't get this search anywhere else because no single AI has access to all of it. Google search doesn't touch Reddit comments or X posts. ChatGPT has a deal with Reddit but can't search X or TikTok. Gemini has YouTube but not Reddit. Claude has none of them natively. Each platform is a walled garden with its own API, its own tokens, its own auth. But you can bring your own keys and browser sessions, and suddenly an AI agent can search all of them at once, score them against each other, and tell you what actually matters.
That's the unlock. Not one better search engine. A dozen disconnected platforms, bridged by an agent.
/last30days Peter Steinberger
You have a meeting tomorrow. You Google them. You get their LinkedIn from 2023. /last30days gives you what they're actually doing this month: joined OpenAI to work on Codex, fighting Anthropic's ban on third-party agents, shipping 23 PRs at 85% merge rate, building "LobsterOS" for cross-device agent control, and r/ClaudeCode hit 569 upvotes debating whether he's a hero or "insufferable." Scattered across X posts, Reddit threads, YouTube transcripts, and GitHub commits. None of it was on Google.
No comments yet. Be the first to share your thoughts!
CRITICAL: ALWAYS execute Step 0 BEFORE Step 1, even if the user provided a topic. If the user typed /last30days Mercer Island, you MUST check for FIRST_RUN and present the wizard BEFORE running research. The topic "Mercer Island" is preserved β research runs immediately after the wizard completes. Do NOT skip the wizard because a topic was provided. The wizard takes 10 seconds and only runs once ever.
To detect first run: check if ~/.config/last30days/.env exists. If it does NOT exist, this is a first run. Do NOT run any Bash commands or show any command output to detect this β just check the file existence silently. If the file exists and contains SETUP_COMPLETE=true, skip this section silently and proceed to Step 1. Do NOT say "Setup is complete" or any other status message β just move on. The user doesn't need to be told setup is done every time they run the skill.
When first run is detected, detect your platform first:
If you do NOT have WebSearch capability (OpenClaw, Codex, raw CLI): Run the OpenClaw setup flow below. If you DO have WebSearch (Claude Code): Run the standard setup flow below.
Run environment detection first:
"${LAST30DAYS_PYTHON}" "${SKILL_ROOT}/scripts/last30days.py" setup --openclaw
Read the JSON output. It tells you what's already configured. Display a status summary:
π Welcome to /last30days!
Detected:
{β
or β} yt-dlp (YouTube search)
{β
or β} X/Twitter ({method} configured)
{β
or β} ScrapeCreators (TikTok, Instagram, Reddit backup)
{β
or β} Web search ({backend} configured)
Then for each missing item, offer setup in priority order:
ScrapeCreators (if not configured): "ScrapeCreators adds TikTok and Instagram search (plus a Reddit backup if public Reddit gets rate-limited). 10,000 free calls, no credit card. (No referrals, no kickbacks - we don't get a cut.)"
gh CLI was detected in the environment detection output above. If gh IS detected: description should say "Registers directly via GitHub CLI in ~2 seconds - no browser needed". Before running the command, display: "Registering via GitHub CLI..." If gh is NOT detected: description should say "Copies a one-time code to your clipboard and opens GitHub to authorize". Before running the command, display: "I'll copy a one-time code to your clipboard and open GitHub. When GitHub asks for a device code, just paste (Cmd+V / Ctrl+V)." Then run "${LAST30DAYS_PYTHON}" "${SKILL_ROOT}/scripts/last30days.py" setup --github, parse JSON output. Tries PAT first (if gh is installed), falls back to device flow which copies a one-time code to your clipboard and opens your browser. If status is success, write SCRAPECREATORS_API_KEY={api_key} to .env.X/Twitter (if not configured): "X search finds tweets and conversations. To unlock X: add FROM_BROWSER=auto (reads browser cookies, free), XAI_API_KEY (no browser access, api.x.ai), or AUTH_TOKEN+CT0 (manual cookies)."
YouTube (if yt-dlp not found): "YouTube search needs yt-dlp. Run: pip install yt-dlp"
Web search (if no Brave/Exa/Serper key): "A web search key enables smarter results. Brave Search is free for 2,000 queries/month at brave.com/search/api"
After setup, write SETUP_COMPLETE=true to .env and proceed to research.
Skip to "END OF FIRST-RUN WIZARD" below after completing the OpenClaw flow.
You MUST follow these steps IN ORDER. Do NOT skip ahead to the topic picker or research. The sequence is: (1) welcome text -> (2) setup modal -> (3) run setup if chosen -> (4) optional ScrapeCreators modal -> (5) topic picker. You MUST start at step 1.
Step 1: Display the following welcome text ONCE as a normal message (not blockquoted). Then IMMEDIATELY call AskUserQuestion - do NOT repeat any of the welcome text inside the AskUserQuestion call.
Welcome to /last30days!
I research any topic across Reddit, X, YouTube, and other sources - synthesizing what people are actually saying right now.
Auto setup gives you 5 core sources for free in 30 seconds:
gh CLI installed) - always on, zero configWant TikTok and Instagram too? ScrapeCreators adds those (10,000 free calls, scrapecreators.com). No kickbacks, no affiliation.
Then call AskUserQuestion with ONLY this question and these options - no additional text:
Question: "How would you like to set up?" Options:
If the user picks 1 (Auto setup):
Before running the setup command, get cookie consent:
Check if BROWSER_CONSENT=true already exists in ~/.config/last30days/.env. If it does, skip the consent prompt and run setup directly.
If BROWSER_CONSENT=true is NOT present, call AskUserQuestion:
Question: "Auto setup will scan your browser for x.com cookies to authenticate X search. Cookies are read live, not saved to disk. Chrome on macOS will prompt for Keychain access. OK to proceed?"
Options:
BROWSER_CONSENT=true to .env after setup completes.Run the setup subcommand:
cd {SKILL_DIR} && "${LAST30DAYS_PYTHON}" scripts/last30days.py setup
Show the user the results (what cookies were found, whether yt-dlp was installed).
Then show the optional ScrapeCreators offer (plain text, then modal):
Want TikTok and Instagram too? ScrapeCreators adds those platforms - 10,000 free calls, no credit card. It also serves as a Reddit backup if public Reddit ever gets rate-limited.
Before showing the ScrapeCreators modal, check for gh CLI: Run which gh via Bash silently. Store the result as gh_available (true if found, false if not).
Call AskUserQuestion: Question: "Want to add TikTok, Instagram, and Reddit backup via ScrapeCreators? (We don't get a cut.)" Options:
cd {SKILL_DIR} && "${LAST30DAYS_PYTHON}" scripts/last30days.py setup --github via Bash with a 5-minute timeout. This tries PAT auth first (if gh CLI is installed, zero browser needed), then falls back to GitHub device flow which copies a one-time code to your clipboard and opens GitHub in your browser. Parse the JSON stdout. If status is success, write SCRAPECREATORS_API_KEY={api_key} to ~/.config/last30days/.env. If method is pat, show: "You're in! Registered via GitHub CLI - zero browser needed. 10,000 free calls. TikTok, Instagram, and Reddit backup are now active." If method is device and clipboard_ok is true, show: "You're in! (The authorization code was copied to your clipboard automatically.) 10,000 free calls. TikTok, Instagram, and Reddit backup are now active." If method is device and clipboard_ok is false, show: "You're in! 10,000 free calls. TikTok, Instagram, and Reddit backup are now active." If status is timeout or error, show: "GitHub auth didn't complete. No worries - you can sign up at scrapecreators.com instead or try again later." Then offer the web signup option.open https://scrapecreators.com via Bash to open in the user's browser. Then ask them to paste the API key they get. When they paste it, write SCRAPECREATORS_API_KEY={key} to ~/.config/last30days/.envAfter SC key is saved (not if skipped), show the TikTok/Instagram opt-in:
Your ScrapeCreators key powers TikTok, Instagram, Threads, Pinterest, and YouTube comments. Want those on for every research run? (Each additional source uses a ScrapeCreators call per search.)
Call AskUserQuestion: Question: "Which ScrapeCreators sources do you want on?" Options:
INCLUDE_SOURCES=tiktok,instagram to ~/.config/last30days/.env. Confirm: "TikTok and Instagram are on, plus Reddit backup if public Reddit has issues. You can add threads, pinterest, youtube_comments to INCLUDE_SOURCES anytime."INCLUDE_SOURCES=tiktok,instagram,threads,pinterest,youtube_comments to ~/.config/last30days/.env. Confirm: "All ScrapeCreators sources are on."After TikTok/Instagram opt-in (or SC skip), show the first research topic modal:
Call AskUserQuestion: Question: "What do you want to research first?" Options:
If user picks an example, run research with that topic. If they pick "Type my own", ask them what they want to research. If the user originally provided a topic with the command (e.g., /last30days Mercer Island), skip this modal and use their topic directly.
END OF FIRST-RUN WIZARD. Everything above in Step 0 ONLY runs on first run. If SETUP_COMPLETE=true exists in .env, skip ALL of Step 0 β no welcome, no setup, no ScrapeCreators modal, no topic picker. Go directly to Step 1 (Parse User Intent). The topic picker is ONLY for first-time users who haven't run /last30days before.
If the user picks 2 (Manual setup): Show them this guide (present as plain text, not blockquoted):
The magic of /last30days is Reddit comments + X posts together - and both are free. Here's how to unlock each source.
Add these to ~/.config/last30days/.env:
X/Twitter (pick one - this is the most important):
FROM_BROWSER=auto - free. Reads your x.com login cookies at search time to authenticate. Cookies are read live each run, not saved to disk. Chrome on macOS will prompt for Keychain access the first time. Firefox and Safari don't.XAI_API_KEY=xxx - no browser access needed. Get a key at api.x.ai. Best for servers or if you don't want cookie scanning.AUTH_TOKEN=xxx + CT0=xxx - paste your X cookies manually (x.com -> F12 -> Application -> Cookies)Reddit (free, works out of the box):
SCRAPECREATORS_API_KEY=xxx - optional backup source if public Reddit gets rate-limited.OPENAI_API_KEY=xxx - optional fallback if public Reddit search has trouble finding threads.YouTube (free, open source):
brew install yt-dlp - free, open source, 190K+ GitHub stars. Enables YouTube search and transcripts.Bonus: TikTok, Instagram, Threads, Pinterest, YouTube comments (ScrapeCreators):
SCRAPECREATORS_API_KEY=xxx - 10,000 free calls at scrapecreators.com.INCLUDE_SOURCES=tiktok,instagram to turn on the most popular ones. Add threads, pinterest, youtube_comments for more.GitHub Issues/PRs (free, no key needed):
gh CLI installed (brew install gh), GitHub search is automatic. No API key required.Perplexity Sonar Pro (AI-synthesized research via OpenRouter):
OPENROUTER_API_KEY=xxx - adds AI-synthesized research with citations as an additive source alongside Reddit/X/YouTube. Returns structured narratives with specific dates, names, and numbers that social sources miss. ~$0.02/run.INCLUDE_SOURCES=perplexity (or append to existing, e.g. INCLUDE_SOURCES=tiktok,instagram,perplexity).--deep-research flag for exhaustive 50+ citation reports (~$0.90/query) on topics that need serious investigation.Other bonus sources (add anytime):
EXA_API_KEY=xxx - semantic web search, 1K free/month (exa.ai)BSKY_HANDLE=you.bsky.social + BSKY_APP_PASSWORD=xxx - Bluesky (free app password)BRAVE_API_KEY=xxx - Brave web searchAlways add this last line: SETUP_COMPLETE=true
CRITICAL: NEVER overwrite an existing .env file. Before writing ANY key to ~/.config/last30days/.env:
test -f ~/.config/last30days/.env>> (double redirect)> (single redirect) which destroys existing contentmkdir -p ~/.config/last30days && touch ~/.config/last30days/.envThen call AskUserQuestion: Question: "How do you want to add your keys?" Options:
If the user picks "Open .env in editor":
Create ~/.config/last30days/.env if it doesn't exist (check first!), pre-populated with this template:
# /last30days configuration
# Uncomment and fill in the keys you want to use.
# X/Twitter (pick one):
# FROM_BROWSER=auto # Free. Reads x.com cookies from your browser at search time.
# # Chrome on macOS prompts for Keychain access. Firefox/Safari don't.
# XAI_API_KEY= # No browser access. Get a key at api.x.ai
# AUTH_TOKEN= # Manual: x.com -> F12 -> Application -> Cookies
# CT0= # (requires AUTH_TOKEN too)
# ScrapeCreators (10,000 free calls - scrapecreators.com):
# SCRAPECREATORS_API_KEY= # Unlocks: TikTok, Instagram, Reddit backup (if public Reddit gets rate-limited)
# # Optional: add threads, pinterest, youtube_comments for more
# INCLUDE_SOURCES=tiktok,instagram
# YouTube: install yt-dlp (brew install yt-dlp) - no key needed
# Bluesky:
# BSKY_HANDLE=you.bsky.social
# BSKY_APP_PASSWORD=
# Web search:
# BRAVE_API_KEY= # 2,000 free queries/month at brave.com/search/api
# OPENROUTER_API_KEY= # Perplexity Sonar via OpenRouter
SETUP_COMPLETE=true
If the file already exists, do NOT overwrite it. Just open it.
Run open ~/.config/last30days/.env on macOS to open in the default editor.
Then tell the user: "Your .env is open. Edit it, save, and run /last30days again."
If the user picks "Paste keys here", write them to ~/.config/last30days/.env (create the file and parent dirs if needed, append without overwriting existing keys, always include SETUP_COMPLETE=true). If a SCRAPECREATORS_API_KEY was included, also append INCLUDE_SOURCES=tiktok,instagram and tell the user: "TikTok, Instagram, and Reddit backup are now on. Want to also add Threads, Pinterest, or YouTube comments? Add them to INCLUDE_SOURCES in your .env." Then offer the same ScrapeCreators sources opt-in modal as the auto-setup path (the "Which ScrapeCreators sources do you want on?" question above). Then proceed with research.
If the user picks "I'll do it myself", tell them: "Save the file at ~/.config/last30days/.env, then run /last30days <topic> to research anything." Then proceed with research using whatever sources are currently available.
If the user picks Skip:
Proceed with research immediately using the user's original topic. Do NOT create or modify the .env file when the user picks Skip. Note: without setup, sources are limited to Reddit (threads and comments), HN, Polymarket, and GitHub (if gh CLI installed). X/Twitter and YouTube require setup.
When users ask about API keys, setup, or how to unlock more sources, reference this:
You do NOT need API keys to use last30days. It works out of the box with Reddit (threads and comments), Hacker News, Polymarket, and GitHub (if gh CLI installed). Browser cookies for X/Twitter are equivalent to an API key - just log into x.com in any browser and last30days will find your session automatically.
Source unlock progression (all free):
gh installed) - works immediatelybrew install yt-dlp - open source, 190K+ GitHub stars. Enables YouTube search and transcripts.gh CLI installed)Key comparison: X browser cookies = same access as an API key (free, no signup). ScrapeCreators adds TikTok and Instagram for users who want those platforms.
last30days has no affiliation with any API provider - no referrals, no kickbacks.
Before doing anything, parse the user's input for:
Common patterns:
[topic] for [tool] β "web mockups for Nano Banana Pro" β TOOL IS SPECIFIED[topic] prompts for [tool] β "UI design prompts for Midjourney" β TOOL IS SPECIFIED[topic] β "iOS design mockups" β TOOL NOT SPECIFIED, that's OKvs or versus with spaces)IMPORTANT: Do NOT ask about target tool before research.
Store these variables:
TOPIC = [extracted topic]TARGET_TOOL = [extracted tool, or "unknown" if not specified]QUERY_TYPE = [RECOMMENDATIONS | NEWS | HOW-TO | COMPARISON | GENERAL]TOPIC_A = [first item] (only if COMPARISON)TOPIC_B = [second item] (only if COMPARISON)Confirm the topic with a branded, truthful message. Build ACTIVE_SOURCES_LIST by checking what's configured in .env:
which gh): add GitHubwhich yt-dlp): add YouTubeThen display (use "and more" if 5+ sources, otherwise list all with Oxford comma):
For GENERAL / NEWS / RECOMMENDATIONS / PROMPTING queries:
/last30days β searching {ACTIVE_SOURCES_LIST} for what people are saying about {TOPIC}.
For COMPARISON queries:
/last30days β comparing {TOPIC_A} vs {TOPIC_B} across {ACTIVE_SOURCES_LIST}.
Do NOT show a multi-line "Parsed intent" block with TOPIC=, TARGET_TOOL=, QUERY_TYPE= variables. Do NOT promise a specific time. Do NOT list sources that aren't configured.
Then proceed immediately to Step 0.5 / 0.55.
If TOPIC looks like it could have its own X/Twitter account - people, creators, brands, products, tools, companies, communities (e.g., "Dor Brothers", "Jason Calacanis", "Nano Banana Pro", "Seedance", "Midjourney"), do WebSearches to find handles in three categories:
1. Primary handle (the entity itself):
WebSearch("{TOPIC} X twitter handle site:x.com")
2. Company/organization handle OR founder/creator handle -- This mapping is bidirectional:
WebSearch("{TOPIC} company CEO of site:x.com")
OR for products:
WebSearch("{TOPIC} creator founder X twitter site:x.com")
Examples: Sam Altman -> @OpenAI, Dario Amodei -> @AnthropicAI, OpenClaw -> @steipete (Peter Steinberger), Paperclip -> @dotta, Claude Code -> @alexalbert__.
3. 1-2 related handles -- People/entities closely associated with the topic (spouse, collaborator, band member), PLUS 1-2 prominent commentator/media handles that regularly cover this topic:
WebSearch("{RELATED_PERSON_OR_ENTITY} X twitter handle site:x.com")
For a music artist, find music commentary accounts (e.g., @PopBase, @HotFreestyle, @DailyRapFacts). For a tech CEO, find tech media accounts (e.g., @TechCrunch, @TheInformation). For a product, find reviewer accounts in that category.
From the results, extract their X/Twitter handles. Look for:
x.com/{handle} or twitter.com/{handle}Verify accounts are real, not parody/fan accounts. Check for:
Pass handles to the CLI:
--x-handle={handle} (without @)--x-related={handle1},{handle2},{company_handle},{commentator_handles} (comma-separated, without @)Example for "Kanye West":
--x-handle=kanyewest--x-related=travisscott,PopBase,HotFreestyleExample for "Sam Altman":
--x-handle=sama--x-related=OpenAI,TechCrunchRelated handles are searched with lower weight (0.3) so they appear in results but don't dominate over the primary entity's content.
Note about @grok: Grok is Elon's AI on X (xAI). It often appears in search results with thoughtful, accurate analysis. When citing @grok in your synthesis, frame it as "per Grok's AI analysis of [article/topic]" rather than treating it as an independent human commentator.
Skip this step if:
--quick depthStore: RESOLVED_HANDLE = {handle or empty}, RESOLVED_RELATED = {comma-separated handles or empty}
If TOPIC looks like a person (developer, creator, CEO, founder), also resolve their GitHub username for person-mode GitHub search:
WebSearch("{TOPIC} github profile site:github.com")
From the results, extract their GitHub username from URLs like github.com/{username}.
Verify the account is correct: Check that the profile description or pinned repos match the person you're researching. Common names may return multiple profiles.
Pass to the CLI: --github-user={username} (without @)
Example for "Peter Steinberger": --github-user=steipete
Example for "Matt Van Horn": --github-user=mvanhorn
Person-mode GitHub tells a different story than keyword search. Instead of "who mentioned this person in an issue body," it answers: "What are they shipping? Where are they getting merged? What do their own projects look like?" The engine fetches PR velocity, top repos with star counts, release notes, and README summaries.
Skip this step if:
--github-user specified by the user--quick depthStore: RESOLVED_GITHUB_USER = {username or empty}
If TOPIC looks like a product, tool, or open source project (not a person), resolve its GitHub repo for project-mode search:
WebSearch("{TOPIC} github repo site:github.com")
From the results, extract owner/repo from URLs like github.com/{owner}/{repo}.
Pass to the CLI: --github-repo={owner/repo}
For comparisons ("X vs Y"), resolve repos for both topics: --github-repo={repo_a},{repo_b}
Example for "OpenClaw": --github-repo=openclaw/openclaw
Example for "OpenClaw vs Paperclip": --github-repo=openclaw/openclaw,paperclipai/paperclip
Project-mode GitHub fetches live star counts, README snippets, latest releases, and top issues directly from the API. This is always more accurate than blog posts or YouTube videos citing weeks-old numbers.
Skip this step if:
--github-user instead)Store: RESOLVED_GITHUB_REPOS = {comma-separated owner/repo or empty}
If --agent appears in ARGUMENTS (e.g., /last30days plaud granola --agent):
AskUserQuestion calls - use TARGET_TOOL = "unknown" if not specifiedAgent mode saves raw research data to ~/Documents/Last30Days/ automatically via --save-dir (handled by the script, no extra tool calls).
Agent mode report format:
## Research Report: {TOPIC}
Generated: {date} | Sources: Reddit, X, Bluesky, YouTube, TikTok, HN, Polymarket, Web
### Key Findings
[3-5 bullet points, highest-signal insights with citations]
### What I learned
{The full "What I learned" synthesis from normal output}
### Stats
{The standard stats block}
When the user asks "X vs Y", run ONE research pass with a comparison-optimized plan that covers both entities AND their rivalry. This replaces the old 3-pass approach (which took 13+ minutes and produced tangential content).
IMPORTANT: Include BOTH X handles (--x-handle={TOPIC_A_HANDLE} --x-related={TOPIC_B_HANDLE},{COMPANY_HANDLES},{COMMENTATOR_HANDLES}), --subreddits={RESOLVED_SUBREDDITS}, --tiktok-hashtags={RESOLVED_HASHTAGS}, --tiktok-creators={RESOLVED_TIKTOK_CREATORS}, and --ig-creators={RESOLVED_IG_CREATORS} from Step 0.55. Omit any flag where the value was not resolved (empty).
Single pass with entity-aware subqueries:
"${LAST30DAYS_PYTHON}" "${SKILL_ROOT}/scripts/last30days.py" "{TOPIC_A} vs {TOPIC_B}" --emit=compact --save-dir=~/Documents/Last30Days --save-suffix=v3 --plan 'COMPARISON_PLAN_JSON' --x-handle={TOPIC_A_HANDLE} --x-related={TOPIC_B_HANDLE},{COMPANY_A_HANDLE},{COMPANY_B_HANDLE},{COMMENTATOR_HANDLES} --subreddits={RESOLVED_SUBREDDITS} --tiktok-hashtags={RESOLVED_HASHTAGS} --tiktok-creators={RESOLVED_TIKTOK_CREATORS} --ig-creators={RESOLVED_IG_CREATORS}
The --plan JSON for comparisons should include 3-4 subqueries:
"{TOPIC_A} vs {TOPIC_B}" β catches rivalry content, direct comparisons"{TOPIC_A} news {MONTH} {YEAR}" β catches entity-specific developments"{TOPIC_B} news {MONTH} {YEAR}" β catches entity-specific developments"{COMPANY_A} {COMPANY_B} {DOMAIN} news" β catches industry context (e.g., "OpenAI Anthropic AI news")ALL subqueries include ALL sources. The fusion engine handles deduplication across subqueries. At least one subquery MUST include YouTube-specific search terms (e.g., "{PERSON} interview 2026", "{PRODUCT_A} vs {PRODUCT_B} review") to ensure YouTube content is found. Without YouTube-specific terms, the engine may only find 0-1 videos for comparison queries.
Then do WebSearch for: {TOPIC_A} vs {TOPIC_B} comparison {YEAR} and {TOPIC_A} vs {TOPIC_B} which is better and {COMPANY_A} vs {COMPANY_B} news {MONTH} {YEAR}.
Skip the normal Step 1 below - go directly to the comparison synthesis format (see "If QUERY_TYPE = COMPARISON" in the synthesis section).
PLATFORM GATE: If your platform does NOT support WebSearch (e.g., OpenClaw, raw CLI), skip Steps 0.55 and 0.75 but add
--auto-resolveto the Python command in the Research Execution section. The engine will do its own pre-research using configured web search backends (Brave, Exa, or Serper) to discover subreddits, X handles, and current events context before planning.
Run 2-3 focused WebSearches (in parallel) to resolve platform-specific targeting. Do NOT search for every platform individually β that wastes time. Instead, use your knowledge of the topic to infer most targeting, and only WebSearch for what you can't infer.
1. X handles β Already resolved in Step 0.5 above (including company handles and commentators). Reference your RESOLVED_HANDLE and RESOLVED_RELATED from that step.
2. Reddit communities + YouTube channels + current events β Run 1-2 searches that cover multiple platforms at once:
WebSearch("{TOPIC} subreddit reddit community")
WebSearch("{TOPIC} news {CURRENT_MONTH} {CURRENT_YEAR}")
The first search finds subreddits. The second gives you current events context (which helps you generate better subqueries in Step 0.75) and may surface YouTube channels or creators organically.
Extract 3-5 subreddit names from the results. Store as RESOLVED_SUBREDDITS (comma-separated, no r/ prefix).
3. TikTok hashtags + creators β INFER these from your topic knowledge. Do NOT WebSearch for "{PERSON} TikTok account" β most people/CEOs don't have TikTok, and the search is wasted.
kanyewest,ye,bully. "Claude Code" β claudecode,aiagent,aicoding. "Sam Altman" β samaltman,openai,chatgpt.Store as RESOLVED_HASHTAGS and RESOLVED_TIKTOK_CREATORS.
4. Instagram creators β Same rule: INFER from topic knowledge. If the topic is a celebrity, brand, or creator with obvious Instagram presence, use their handle directly. If the topic is a tech CEO or abstract concept, skip. Do NOT waste a WebSearch on "Dario Amodei Instagram account."
Store as RESOLVED_IG_CREATORS.
5. YouTube content queries β Infer 2-3 YouTube content-type queries from the topic without searching. The current events search (#2 above) may surface relevant YouTube channels.
'{TOPIC} album review', '{TOPIC} reaction''{TOPIC} review', '{TOPIC} tutorial''{TOPIC_A} vs {TOPIC_B}''{TOPIC} interview {YEAR}', '{TOPIC} latest news'Store as RESOLVED_YT_QUERIES.
Concrete examples:
| Topic | WebSearches needed | Reddit subs | TikTok hashtags | TikTok creators | IG creators | YT queries |
|-------|-------------------|-------------|-----------------|-----------------|-------------|------------|
| Kanye West | 2 (subreddit + BULLY news) | Kanye,WestSubEver,hiphopheads,Music | kanyewest,ye,bully | (inferred: kanyewest) | (inferred: kanyewest) | kanye west bully review,kanye west bully reaction |
| Sam Altman vs Dario | 2 (subreddit + AI CEO news) | artificial,MachineLearning,OpenAI,ClaudeAI | samaltman,openai,anthropic | (skip β CEOs don't TikTok) | (skip β CEOs don't Reel) | sam altman interview 2026,dario amodei interview 2026 |
| Tella (SaaS) | 2 (subreddit + Tella news) | SaaS,Entrepreneur,screenrecording,productivity | tella,tellaapp,screenrecording | (search: tella screen recorder TikTok) | (inferred: tella.tv) | tella screen recorder review,tella tutorial |
For comparison queries ("X vs Y"): Resolve communities/handles for BOTH topics and merge the lists.
If you can't infer targeting for a platform, skip that flag -- the Python engine will fall back to keyword search.
After resolving all handles and communities, display what you found before moving on. This shows the user that intelligent pre-research happened:
Resolved:
- X: @{HANDLE} (+ @{COMPANY}, @{COMMENTATOR})
- Reddit: r/{sub1}, r/{sub2}, r/{sub3}
- TikTok: #{hashtag1}, #{hashtag2}
- YouTube: {query1}, {query2}
Only show lines for platforms where something was resolved. Skip empty lines. This display replaces the old "Parsed intent" block with something more useful.
PLATFORM GATE: If you skipped Step 0.55 because WebSearch is unavailable, also skip this step. The Python engine will plan internally (enhanced by
--auto-resolveif a web search backend is configured). Jump to Research Execution.
If you have WebSearch and reasoning capability, YOU generate the query plan. The Python script receives your plan via --plan and skips its internal planner entirely. This produces better results because you have full context about the topic.
Generate a JSON query plan for the topic. Think about:
Output a JSON plan with this shape:
{
"intent": "breaking_news",
"freshness_mode": "strict_recent",
"cluster_mode": "story",
"subqueries": [
{
"label": "primary",
"search_query": "kanye west",
"ranking_query": "What notable events involving Kanye West happened in the last 30 days?",
"sources": ["reddit", "x", "hackernews", "youtube", "tiktok", "instagram"],
"weight": 1.0
},
{
"label": "album",
"search_query": "kanye west bully album",
"ranking_query": "How was Kanye West's BULLY album received?",
"sources": ["youtube", "reddit", "tiktok", "instagram"],
"weight": 0.8
},
{
"label": "reactions",
"search_query": "kanye west bully review reaction",
"ranking_query": "What are the reviews and reactions to Kanye West's BULLY?",
"sources": ["youtube", "tiktok", "reddit"],
"weight": 0.6
}
]
}
Rules for your plan:
search_query should be concise and keyword-heavy β match how content is TITLED on platformsranking_query should read like a natural language questionAvailable sources (include ALL in primary subquery): reddit, x, youtube, tiktok, instagram, hackernews, polymarket. Optional: bluesky, truthsocial, threads, pinterest, grounding (web search β only if user has Brave/Exa/Serper key)
Intent β freshness_mode mapping:
strict_recentevergreen_okbalanced_recentIntent β cluster_mode mapping:
storydebatemarketworkflownoneStore your plan as QUERY_PLAN_JSON β you'll pass it to the script in the next step.
Step 1: Run the research script WITH your query plan (FOREGROUND)
CRITICAL: Run this command in the FOREGROUND with a 5-minute timeout. Do NOT use run_in_background. The full output contains Reddit, X, AND YouTube data that you need to read completely.
IMPORTANT: Pass your QUERY_PLAN_JSON via the --plan flag. This tells the Python script to use YOUR plan instead of calling Gemini.
IMPORTANT: Include --x-handle={RESOLVED_HANDLE} in the command. For comparison mode: Pass --x-handle={TOPIC_A_HANDLE} to the first pass, --x-handle={TOPIC_B_HANDLE} to the second pass, and both to the head-to-head pass. Also include --subreddits={RESOLVED_SUBREDDITS}, --tiktok-hashtags={RESOLVED_HASHTAGS}, --tiktok-creators={RESOLVED_TIKTOK_CREATORS}, and --ig-creators={RESOLVED_IG_CREATORS} from Step 0.55. Omit any flag where the value was not resolved (empty).
# Find skill root β works in repo checkout, Claude Code, or Codex install
for dir in \
"." \
"${CLAUDE_PLUGIN_ROOT:-}" \
"${GEMINI_EXTENSION_DIR:-}" \
"$HOME/.claude/plugins/marketplaces/last30days-skill-private" \
"$HOME/.claude/plugins/cache/last30days-skill-private/last30days-3-nogem/3.0.0-nogem" \
"$HOME/.claude/plugins/cache/last30days-skill-private/last30days-3/3.0.0-alpha" \
"$HOME/.claude/skills/last30days-3-nogem" \
"$HOME/.claude/skills/last30days-3"; do
[ -n "$dir" ] && [ -f "$dir/scripts/last30days.py" ] && SKILL_ROOT="$dir" && break
done
if [ -z "${SKILL_ROOT:-}" ]; then
echo "ERROR: Could not find scripts/last30days.py" >&2
exit 1
fi
"${LAST30DAYS_PYTHON}" "${SKILL_ROOT}/scripts/last30days.py" $ARGUMENTS --emit=compact --save-dir=~/Documents/Last30Days --save-suffix=v3
If you ran Steps 0.55 and 0.75 (agent planning), add these flags:
--plan 'QUERY_PLAN_JSON' (replace with actual JSON from Step 0.75)--x-handle={RESOLVED_HANDLE} (from Step 0.5)--subreddits={RESOLVED_SUBREDDITS} (from Step 0.55)--tiktok-hashtags={RESOLVED_HASHTAGS} (from Step 0.55)--tiktok-creators={RESOLVED_TIKTOK_CREATORS} (from Step 0.55)--ig-creators={RESOLVED_IG_CREATORS} (from Step 0.55)--github-user={RESOLVED_GITHUB_USER} (from Step 0.5b, person topics only)--github-repo={RESOLVED_GITHUB_REPOS} (from Step 0.5c, product/project topics only)If you skipped Steps 0.55 and 0.75 (no WebSearch -- OpenClaw, Codex, etc.), add:
--auto-resolve (the engine will use Brave/Exa/Serper to discover subreddits and context before planning)If you skipped Steps 0.55 and 0.75 (no WebSearch), run the command as-is. The Python engine will plan internally.
Use a timeout of 300000 (5 minutes) on the Bash call. The script typically takes 1-3 minutes.
The script will automatically:
Read the ENTIRE output. It contains EIGHT data sections in this order: Reddit items, X items, YouTube items, TikTok items, Instagram Reels items, Hacker News items, Polymarket items, and WebSearch items. If you miss sections, you will produce incomplete stats.
YouTube items in the output look like: **{video_id}** (score:N) {channel_name} [N views, N likes] followed by a title, URL, transcript highlights (pre-extracted quotable excerpts from the video), and an optional full transcript in a collapsible section. Quote the highlights directly in your synthesis - they are the YouTube equivalent of Reddit top comments. Attribute quotes to the channel name. Count them and include them in your synthesis and stats block.
TikTok items in the output look like: **{TK_id}** (score:N) @{creator} [N views, N likes] followed by a caption, URL, hashtags, and optional caption snippet. Count them and include them in your synthesis and stats block.
Instagram Reels items in the output look like: **{IG_id}** (score:N) @{creator} (date) [N views, N likes] followed by caption text, URL, and optional transcript. Count them and include them in your synthesis and stats block. Instagram provides unique creator/influencer perspective β weight it alongside TikTok.
After the script finishes, do WebSearch to supplement with blogs, tutorials, and news.
For ALL modes, do WebSearch to supplement (or provide all data in web-only mode).
Choose search queries based on QUERY_TYPE:
If RECOMMENDATIONS ("best X", "top X", "what X should I use"):
best {TOPIC} recommendations{TOPIC} list examplesmost popular {TOPIC}If NEWS ("what's happening with X", "X news"):
{TOPIC} news 2026{TOPIC} announcement updateIf PROMPTING ("X prompts", "prompting for X"):
{TOPIC} prompts examples 2026{TOPIC} techniques tipsIf GENERAL (default):
{TOPIC} 2026{TOPIC} discussionFor ALL query types:
Options (passed through from user's command):
--days=N β Look back N days instead of 30 (e.g., --days=7 for weekly roundup)--quick β Faster, fewer sources (8-12 each)--deep β Comprehensive (50-70 Reddit, 40-60 X)After completing the WebSearch supplementals above, append the results to the saved raw file so it becomes the complete debug artifact (Python engine data + WebSearch data).
Instructions:
~/Documents/Last30Days/{slug}-raw-nogem.md (it was saved by the Python engine in Step 1).## WebSearch Supplemental Results section at the end.Example of what to append:
## WebSearch Supplemental Results
- **Efficient App** (https://efficientapp.com/tella-vs-loom) β Side-by-side comparison showing Tella exports in 27s vs Loom's 11s, with Tella at $19/mo and Loom free/$8/mo.
- **Shannah Albert Blog** (https://shannahalbert.com/tella-review) β Creator walkthrough of Tella's recording flow, notes the teleprompter feature as a key differentiator.
This ensures anyone reviewing the raw file sees ALL data that fed into the synthesis β not just the Python engine output.
v3 returns results grouped by STORY/THEME (clusters), not by source. Each cluster represents one narrative thread found across multiple platforms.
How to read v3 output:
### 1. Cluster Title (score N, M items, sources: X, Reddit, TikTok) β a story found across multiple platformsUncertainty: single-source β only one platform found this story (lower confidence)Uncertainty: thin-evidence β all items scored below 55 (unconfirmed)Synthesis strategy for cluster-first output:
The Judge Agent must:
(live: NNK stars) appended to their evidence, that number came from a post-research API check. It overrides whatever the original source claimed.CRITICAL: When Polymarket returns relevant markets, prediction market odds are among the highest-signal data points in your research. Real money on outcomes cuts through opinion. Treat them as strong evidence, not an afterthought.
How to interpret and synthesize Polymarket data:
Prefer structural/long-term markets over near-term deadlines. Championship odds > regular season title. Regime change > near-term strike deadline. IPO/major milestone > incremental update. Presidency > individual state primary. When multiple markets exist, the bigger question is more interesting to the user.
When the topic is an outcome in a multi-outcome market, call out that specific outcome's odds and movement. Don't just say "Polymarket has a #1 seed market" - say "Arizona has a 28% chance of being the #1 overall seed, up 10% this month." The user cares about THEIR topic's position in the market.
Weave odds into the narrative as supporting evidence. Don't isolate Polymarket data in its own paragraph. Instead: "Final Four buzz is building - Polymarket gives Arizona a 12% chance to win the championship (up 3% this week), and 28% to earn a #1 seed."
Citation format: show ONLY % odds. NEVER mention dollar volumes, liquidity, or betting amounts. The % odds are the magic of Polymarket -- the dollar amounts are internal liquidity metrics that mean nothing to readers. Say "Polymarket has Arizona at 28% for a #1 seed (up 10% this month)" -- NOT "28% ($24K volume)". The dollar figure adds zero value and clutters the insight.
When multiple relevant markets exist, highlight 3-5 of the most interesting ones in your synthesis, ordered by importance (structural > near-term). Don't just pick the highest-volume one.
Domain examples of market importance ranking:
Do NOT display stats here - they come at the end, right before the invitation.
When you see a cluster of replies to a recommendation-request tweet (someone asking "what's the best X?" and getting multiple independent responses), call this out prominently. This is the strongest form of community endorsement β real people independently making the same recommendation without coordination. Example: "In a thread where @ecom_cork asked for Loom alternatives, every reply said Tella."
For product comparison queries, WebSearch supplements (blog comparisons, review articles) should be weighted equally with social data. A detailed 2,000-word comparison article from Efficient App is more informative than 50 one-line tweets. Feature it in the synthesis.
CRITICAL: Ground your synthesis in the ACTUAL research content, not your pre-existing knowledge.
Read the research output carefully. Pay attention to:
ANTI-PATTERN TO AVOID: If user asks about "clawdbot skills" and research returns ClawdBot content (self-hosted AI agent), do NOT synthesize this as "Claude Code skills" just because both involve "skills". Read what the research actually says.
FUN CONTENT: If the research output includes a "## Best Takes" section or items tagged with fun: scores, weave at least 2-3 of the funniest/cleverest quotes into your synthesis. Reddit comments and X posts with high fun scores are the voice of the people. A 1,338-upvote comment that says "Where's the limewire link" tells you more about the cultural moment than a news article. Quote the actual text. Don't put fun content in a separate section - mix it into the narrative where it fits naturally. This is what makes the report feel alive rather than like a news summary.
ELI5 MODE: If ELI5_MODE is true for this run, apply these writing guidelines to your ENTIRE synthesis. If ELI5_MODE is false, skip this block completely and write normally.
ELI5 Mode: Explain it to me like I'm 5 years old.
Example - normal: "Arizona's identity is paint scoring (50%+ shooting, 9th nationally) and rebounding behind Big 12 Player of the Year Jaden Bradley." Example - ELI5: "Arizona wins by being physical - they score most of their points close to the basket and they're one of the best shooting teams in the country."
Same data. Same sources. Just clearer.
CRITICAL: Extract SPECIFIC NAMES, not generic patterns.
When user asks "best X" or "top X", they want a LIST of specific things:
BAD synthesis for "best Claude Code skills":
"Skills are powerful. Keep them under 500 lines. Use progressive disclosure."
GOOD synthesis for "best Claude Code skills":
"Most mentioned skills: /commit (5 mentions), remotion skill (4x), git-worktree (3x), /pr (3x). The Remotion announcement got 16K likes on X."
Structure the output as a side-by-side comparison using data from all three research passes:
# {TOPIC_A} vs {TOPIC_B}: What the Community Says (Last 30 Days)
## Quick Verdict
[1-2 sentence data-driven summary: which one the community prefers and why, with source counts]
## {TOPIC_A}
**Community Sentiment:** [Positive/Mixed/Negative] ({N} mentions across {sources})
**Strengths (what people love)**
- [Point 1 with source attribution]
- [Point 2]
**Weaknesses (common complaints)**
- [Point 1 with source attribution]
- [Point 2]
## {TOPIC_B}
**Community Sentiment:** [Positive/Mixed/Negative] ({N} mentions across {sources})
**Strengths (what people love)**
- [Point 1 with source attribution]
- [Point 2]
**Weaknesses (common complaints)**
- [Point 1 with source attribution]
- [Point 2]
## Head-to-Head
[Synthesis from the "A vs B" combined search - what people say when directly comparing]
| Dimension | {TOPIC_A} | {TOPIC_B} |
|-----------|-----------|-----------|
| [Key dimension 1] | [A's position] | [B's position] |
| [Key dimension 2] | [A's position] | [B's position] |
| [Key dimension 3] | [A's position] | [B's position] |
## The Bottom Line
Choose {TOPIC_A} if... Choose {TOPIC_B} if... (based on actual community data, not assumptions)
Then show combined stats from all three passes and the standard invitation section.
Identify from the ACTUAL RESEARCH OUTPUT:
Display in this EXACT sequence:
FIRST - What I learned (based on QUERY_TYPE):
If RECOMMENDATIONS - Show specific things mentioned with sources:
π Most mentioned:
[Tool Name] - {n}x mentions
Use Case: [what it does]
Sources: @handle1, @handle2, r/sub, blog.com
[Tool Name] - {n}x mentions
Use Case: [what it does]
Sources: @handle3, r/sub2, Complex
Notable mentions: [other specific things with 1-2 mentions]
CRITICAL for RECOMMENDATIONS:
If PROMPTING/NEWS/GENERAL - Show synthesis and patterns:
CITATION RULE: Cite sources sparingly to prove research is real.
CITATION PRIORITY (most to least preferred):
The tool's value is surfacing what PEOPLE are saying, not what journalists wrote. When both a web article and an X post cover the same fact, cite the X post.
URL FORMATTING: NEVER paste raw URLs anywhere in the output β not in synthesis, not in stats, not in sources.
π Web: 10 pages β https://later.com/blog/..., https://buffer.com/...π Web: 10 pages β Later, Buffer, CNN, SocialBee
Use the publication/site name, not the URL. The user doesn't need links β they need clean, readable text.BAD: "His album is set for March 20 (per Rolling Stone; Billboard; Complex)." GOOD: "His album BULLY drops March 20 β fans on X are split on the tracklist, per @honest30bgfan_" GOOD: "Ye's apology got massive traction on r/hiphopheads" OK (web, only when Reddit/X don't have it): "The Hellwatt Festival runs July 4-18 at RCF Arena, per Billboard"
Lead with people, not publications. Start each topic with what Reddit/X users are saying/feeling, then add web context only if needed. The user came here for the conversation, not the press release.
What I learned:
**{Topic 1}** β [1-2 sentences about what people are saying, per @handle or r/sub]
**{Topic 2}** β [1-2 sentences, per @handle or r/sub]
**{Topic 3}** β [1-2 sentences, per @handle or r/sub]
KEY PATTERNS from the research:
1. [Pattern] β per @handle
2. [Pattern] β per r/sub
3. [Pattern] β per @handle
THEN - Quality Nudge (if present in the output):
If the research output contains a **π Research Coverage:** block, render it verbatim right before the stats block. This tells the user which core sources are missing and how to unlock them. Do NOT render this block if it is absent from the output (100% coverage = no nudge).
Just-in-time X unlock: If X returned 0 results because no X auth is configured (no AUTH_TOKEN/CT0, no XAI_API_KEY, no FROM_BROWSER), offer to set it up right there:
Call AskUserQuestion: Question: "X/Twitter wasn't searched. Want to unlock it?" Options:
THEN - Stats (right before invitation):
CRITICAL: Calculate actual totals from the research output.
[Xlikes, Yrt] from each X post, [Xpts, Ycmt] from RedditCopy this EXACTLY, replacing only the {placeholders}:
---
β
All agents reported back!
ββ π Reddit: {N} threads β {N} upvotes β {N} comments
ββ π΅ X: {N} posts β {N} likes β {N} reposts
ββ π΄ YouTube: {N} videos β {N} views β {N} with transcripts
ββ π΅ TikTok: {N} videos β {N} views β {N} likes β {N} with captions
ββ πΈ Instagram: {N} reels β {N} views β {N} likes β {N} with captions
ββ π§΅ Threads: {N} posts β {N} likes β {N} replies
ββ π Pinterest: {N} pins β {N} saves β {N} comments
ββ π‘ HN: {N} stories β {N} points β {N} comments
ββ π¦ Bluesky: {N} posts β {N} likes β {N} reposts
ββ πΊπΈ Truth Social: {N} posts β {N} likes β {N} reposts
ββ π GitHub: {N} items β {N} reactions β {N} comments
ββ π Polymarket: {N} markets β {copy the market odds EXACTLY from the engine's Polymarket stats output - only real % numbers like "Arizona 33%, Michigan 25%". If you cannot find specific % odds in the data, show ONLY the market count with no description. NEVER write filler like "check markets", "active", "tracked", or any text without a real percentage.}
ββ π Web: {N} pages β Source Name, Source Name, Source Name
ββ π£οΈ Top voices: @{handle1} ({N} likes), @{handle2} β r/{sub1}, r/{sub2}
ββ π Raw results saved to ~/Documents/Last30Days/{slug}-raw.md
---
π Web: line β how to extract site names from URLs:
Strip the protocol, path, and www. β use the recognizable publication name:
https://later.com/blog/instagram-reels-trends/ β Laterhttps://socialbee.com/blog/instagram-trends/ β SocialBeehttps://buffer.com/resources/instagram-algorithms/ β Bufferhttps://www.cnn.com/2026/02/22/tech/... β CNNhttps://medium.com/the-ai-studio/... β Mediumhttps://radicaldatascience.wordpress.com/... β Radical Data Science
List as comma-separated plain names: Later, SocialBee, Buffer, CNN, Mediumβ οΈ WebSearch citation β ALREADY SATISFIED. DO NOT ADD A SOURCES SECTION. The WebSearch tool mandates source citation. That requirement is FULLY satisfied by the source names on the π Web: line above. Do NOT append a separate "Sources:" section at the end of your response. Do NOT list URLs anywhere. The π Web: line IS your citation. Nothing more is needed.
CRITICAL: Omit any source line that returned 0 results. Do NOT show "0 threads", "0 stories", "0 markets", or "(no results this cycle)". If a source found nothing, DELETE that line entirely - don't include it at all. NEVER use plain text dashes (-) or pipe (|). ALWAYS use ββ ββ β and the emoji.
SELF-CHECK before displaying: Re-read your "What I learned" section. Does it match what the research ACTUALLY says? If you catch yourself projecting your own knowledge instead of the research, rewrite it.
LAST - Invitation (adapt to QUERY_TYPE):
CRITICAL: Every invitation MUST include 2-3 specific example suggestions based on what you ACTUALLY learned from the research. Don't be generic β show the user you absorbed the content by referencing real things from the results.
If QUERY_TYPE = PROMPTING:
---
I'm now an expert on {TOPIC} for {TARGET_TOOL}. What do you want to make? For example:
- [specific idea based on popular technique from research]
- [specific idea based on trending style/approach from research]
- [specific idea riffing on what people are actually creating]
Just describe your vision and I'll write a prompt you can paste straight into {TARGET_TOOL}.
If QUERY_TYPE = RECOMMENDATIONS:
---
I'm now an expert on {TOPIC}. Want me to go deeper? For example:
- [Compare specific item A vs item B from the results]
- [Explain why item C is trending right now]
- [Help you get started with item D]
If QUERY_TYPE = NEWS:
---
I'm now an expert on {TOPIC}. Some things you could ask:
- [Specific follow-up question about the biggest story]
- [Question about implications of a key development]
- [Question about what might happen next based on current trajectory]
If QUERY_TYPE = COMPARISON:
---
I've compared {TOPIC_A} vs {TOPIC_B} using the latest community data. Some things you could ask:
- [Deep dive into {TOPIC_A} alone with /last30days {TOPIC_A}]
- [Deep dive into {TOPIC_B} alone with /last30days {TOPIC_B}]
- [Focus on a specific dimension from the comparison table]
- [Look at a different time period with --days=7 or --days=90]
If QUERY_TYPE = GENERAL:
---
I'm now an expert on {TOPIC}. Some things I can help with:
- [Specific question based on the most discussed aspect]
- [Specific creative/practical application of what you learned]
- [Deeper dive into a pattern or debate from the research]
Example invitations (to show the quality bar):
For /last30days nano banana pro prompts for Gemini:
I'm now an expert on Nano Banana Pro for Gemini. What do you want to make? For example:
- Photorealistic product shots with natural lighting (the most requested style right now)
- Logo designs with embedded text (Gemini's new strength per the research)
- Multi-reference style transfer from a mood board
Just describe your vision and I'll write a prompt you can paste straight into Gemini.
For /last30days kanye west (GENERAL):
I'm now an expert on Kanye West. Some things I can help with:
- What's the real story behind the apology letter β genuine or PR move?
- Break down the BULLY tracklist reactions and what fans are expecting
- Compare how Reddit vs X are reacting to the Bianca narrative
For /last30days war in Iran (NEWS):
I'm now an expert on the Iran situation. Some things you could ask:
- What are the realistic escalation scenarios from here?
- How is this playing differently in US vs international media?
- What's the economic impact on oil markets so far?
I have all the links to the {N} {source list} I pulled from. Just ask.
Context-aware: Only list sources that returned results. Build the source list from your stats: e.g. "14 Reddit threads, 22 X posts, and 6 YouTube videos" or "8 HN stories and 3 Polymarket markets." Never mention a source with 0 results.
STOP and wait for the user to respond. Do NOT call any tools after displaying the invitation. The research script already saved raw data to ~/Documents/Last30Days/ via --save-dir.
Read their response and match the intent:
FUN_LEVEL=high to ~/.config/last30days/.env (append, don't overwrite). Confirm: "Fun level set to high. Next run will surface more witty and viral content."FUN_LEVEL=low to ~/.config/last30days/.env. Confirm: "Fun level set to low. Next run will focus on the news."ELI5_MODE=true to ~/.config/last30days/.env. Confirm: "ELI5 mode on. All future runs will explain things like you're 5."ELI5_MODE=false to ~/.config/last30days/.env. Confirm: "ELI5 mode off. Back to full detail."Only write a prompt when the user wants one. Don't force a prompt on someone who asked "what could happen next with Iran."
When the user wants a prompt, write a single, highly-tailored prompt using your research expertise.
If research says to use a specific prompt FORMAT, YOU MUST USE THAT FORMAT.
ANTI-PATTERN: Research says "use JSON prompts with device specs" but you write plain prose. This defeats the entire purpose of the research.
Here's your prompt for {TARGET_TOOL}:
---
[The actual prompt IN THE FORMAT THE RESEARCH RECOMMENDS]
---
This uses [brief 1-line explanation of what research insight you applied].
Only if they ask for alternatives or more prompts, provide 2-3 variations. Don't dump a prompt pack unless requested.
After delivering a prompt, offer to write more:
Want another prompt? Just tell me what you're creating next.
For the rest of this conversation, remember:
CRITICAL: After research is complete, treat yourself as an EXPERT on this topic.
When the user asks follow-up questions:
Only do new research if the user explicitly asks about a DIFFERENT topic.
After delivering a prompt, end with:
---
π Expert in: {TOPIC} for {TARGET_TOOL}
π Based on: {n} Reddit threads ({sum} upvotes) + {n} X posts ({sum} likes) + {n} YouTube videos ({sum} views) + {n} TikTok videos ({sum} views) + {n} Instagram reels ({sum} views) + {n} HN stories ({sum} points) + {n} web pages
Want another prompt? Just tell me what you're creating next.
What this skill does:
api.scrapecreators.com) for TikTok and Instagram search, and as a Reddit backup when public Reddit is unavailable (requires SCRAPECREATORS_API_KEY)api.openai.com) for Reddit discovery (fallback if no SCRAPECREATORS_API_KEY)api.x.ai) for X searchhn.algolia.com) for Hacker News story and comment discovery (free, no auth)gamma-api.polymarket.com) for prediction market discovery (free, no auth)yt-dlp locally for YouTube search and transcript extraction (no API key, public data)api.scrapecreators.com) for TikTok and Instagram search, transcript/caption extraction (PAYG after 10,000 free API calls)reddit.com for engagement metricsWhat this skill does NOT do:
--agent for non-interactive report outputBundled scripts: scripts/last30days.py (main research engine), scripts/lib/ (search, enrichment, rendering modules), scripts/lib/vendor/bird-search/ (vendored X search client, MIT licensed)
Review scripts before first use to verify behavior.
I built it to keep up in AI. Everything changes every day and the Reddit and X nerds are always on top of it first. I needed better prompts, and the training data was always months behind what the community had already figured out.
But it turned into something bigger. Now I run it before a sales call to know the last 30 days truth about a business. Before a meeting to read someone's recent tweets and podcast transcripts. Before a Disney World trip to know which rides are closed and what the community says about Genie+. Before I build anything to know what problems people are actually hitting.
If you're meeting with a CEO, have you read all their tweets and YouTube transcripts from the last 30 days? I have.
| Source | What the people tell you | |--------|--------------------------| | Reddit | The unfiltered take. Top comments with upvote counts, free via public JSON. The real opinions that Google buries. | | X / Twitter | The hot take, the expert thread, the breaking reaction. First to know, first to argue. | | YouTube | The 45-minute deep dive. Full transcripts searched for the 5 quotable sentences that matter. | | TikTok | The creator reaching 3.6M people with a take you'll never find on Google. | | Instagram Reels | The influencer perspective with spoken-word transcripts. The visual culture signal. | | Hacker News | The developer consensus. 825 points, 899 comments. Where technical people actually argue. | | Polymarket | Not opinions. Odds. Backed by real money. 96% confidence on album sales. 4% on an acquisition. | | GitHub | For people: PR velocity, top repos by stars, release notes. For topics: issues and discussions. | | Threads | The post-Twitter text layer. Conversations from creators and brands. | | Pinterest | Visual discovery. Pins, saves, and comments on products and ideas. | | Bluesky | The decentralized social layer. AT Protocol posts from the post-Twitter migration. | | Perplexity | Grounded web search with citations via Sonar Pro. | | Web | The editorial coverage, the blog comparisons. One signal of many, not the only one. |
Community contributors keep adding more. Truth Social, Xiaohongshu (RED), and others are in the engine with more on the way.
A Reddit thread with 1,500 upvotes is a stronger signal than a blog post nobody read. A TikTok with 3.6M views tells you more about what's culturally relevant than a press release. Polymarket odds backed by $66K in volume are harder to argue with than a pundit's guess.
The synthesis ranks by what real people actually engaged with. Social relevancy, not SEO relevancy.
Before a meeting. /last30days Peter Steinberger - joined OpenAI's Codex team, fighting Anthropic's ban on third-party agents, 23 PRs merged at 85% merge rate on GitHub, building LobsterOS for cross-device agent control. r/ClaudeCode: "Ever since OpenClaw released, it was widely known that if you run it through anything other than the API, you were gonna get banned eventually" (227 upvotes). That's not on LinkedIn.
When something drops. /last30days Kanye West - UK blocked his visa, Wireless Festival canceled, sponsors fled. But BULLY debuted #2 on Billboard. Fantano came back from his "Yay sabbatical" to review it (653K views). SoFi Homecoming brought out Lauryn Hill and Travis Scott for 44 songs. Polymarket: "Will Kanye tweet again?" 86% Yes. 23 Reddit threads, 17 YouTube videos, 86K upvotes.
To compare tools. /last30days OpenClaw vs Hermes vs Paperclip - "These aren't competitors, they're layers." OpenClaw is the executor (351K GitHub stars, live), Hermes is the self-improving brain (31K stars), Paperclip is the org chart (49K stars). Star counts pulled live from the GitHub API, not stale blog posts. Side-by-side table with architecture, memory, security, best-for. Per @IMJustinBrooke: "OpenClaw = Charmander, Hermes = Charizard."
To understand the world. /last30days Iran vs USA - Day 38 of the war. Trump's Tuesday deadline for Iran to reopen the Strait of Hormuz. Two US warplanes downed. Oil at $126/barrel. The IEA called it "the largest supply disruption in the history of the global oil market." Polymarket: ceasefire by Dec 31 at 74%. 27 X posts, 10 YouTube videos, 20 prediction markets.
Before a trip. /last30days Universal Epic Universe - Expansion already under construction. "Project 680" permit filed. Fireworks show confirmed by infrastructure but unannounced. Wait times: Mine-Cart Madness averaging 148 minutes. No annual pass yet, and locals are frustrated. Stardust Racers down for refurbishment through April 5.
To learn something fast. /last30days Nano Banana Pro prompting - JSON-structured prompts are replacing tag soup. @pictsbyai's nested format prevents "concept bleeding." Edit-first workflow beats regeneration. Then it writes you a production prompt using exactly what the community said works.
The v3 engine doesn't just search for your topic. It figures out where to search before the search begins. Type "OpenClaw" and the engine resolves @steipete (Peter Steinberger, the creator), r/openclaw, r/ClaudeCode, and the right YouTube channels and TikTok hashtags - all via a new Python pre-research brain built by @j-sperling. The old engine searched keywords. The new engine understands your topic first, then searches the right people and communities.
This is why v3 finds content v2 never could. "Paperclip" resolves @dotta. "Dave Morin" resolves @davemorin plus @OpenClaw plus the TWiST podcast. "Peter Steinberger" resolves @steipete on X and steipete on GitHub. Bidirectional: person to company, product to founder, name to GitHub profile. The right subreddits, the right handles, the right hashtags - resolved before a single API call fires.
Reddit and X people are funny. The old engine buried their best stuff because it scored for relevance, not cleverness. v3 has a second judge that scores every result for humor, wit, and virality alongside the relevance score. Tommy Lloyd's "My Michael Jordan is Steve Kerr" scores low on relevance to "Arizona Basketball" but off the charts on fun. Now every brief ends with a "Best Takes" section - the cleverest one-liners, the most viral quotes, the reactions that make you want to share the research. Built in, not a toggle.
When the same story appears on Reddit, X, and YouTube, v3 merges them into one cluster instead of showing three separate items. Entity-based overlap detection catches matches even when the titles use different words.
"CLI vs MCP" used to run three serial passes (12+ minutes). v3 runs one pass with entity-aware subqueries for both sides simultaneously. Same depth, 3 minutes.
When the topic is a person, the engine switches from keyword search to author-scoped queries. Instead of "who mentioned this name in an issue body," it answers: what are they shipping and where is it landing?
/last30days Peter Steinberger --github-user=steipete shows 22 PRs merged across 3 repo