Imported from Must-be-Ash/pulse (
SKILL.md). Install upstream withnpx skills add Must-be-Ash/pulse. Copyright stays with the author (MIT).
last30days-crypto v3.0.0: Crypto-Focused Research from the Last 30 Days
Permissions overview: Reads public web/platform data and optionally saves research briefings to
~/Documents/Last30Days-Crypto/. X/Twitter search uses optional user-provided tokens (AUTH_TOKEN/CT0 env vars). Crypto data uses optional API keys (COINGECKO_API_KEY, MESSARI_API_KEY, LUNARCRUSH_API_KEY, FIRECRAWL_API_KEY). All credential usage and data writes are documented in the Security & Permissions section.
Crypto-focused research across Twitter/X (primary), web search, and three crypto data APIs (CoinGecko, Messari, LunarCrush). Surface what crypto Twitter is actually discussing, what the on-chain and derivatives signals say, and what the social-quant indicators (Galaxy Score, AltRank, sentiment) reveal — all in one report.
Runtime Preflight
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-crypto requires Python 3.12+. Install python3.12 or python3.13 and rerun." >&2
exit 1
fi
Step 0: First-Run Setup Wizard
CRITICAL: ALWAYS execute Step 0 BEFORE Step 1, even if the user provided a topic. If the user typed /last30days-crypto $HYPE, you MUST check for FIRST_RUN and present the wizard BEFORE running research. The topic "$HYPE" 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-crypto/.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.
OpenClaw / Non-WebSearch Setup Flow
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-crypto!
Detected:
{✅ or ❌} X/Twitter ({method} configured) — primary source
{✅ or ❌} Web search ({backend} configured) — secondary qualitative source
{✅ or ❌} CoinGecko (market data)
{✅ or ❌} Messari (on-chain & derivatives)
{✅ or ❌} LunarCrush (social-quant)
{✅ or ❌} Firecrawl (URL scraping)
Then for each missing item, offer setup in priority order:
-
X/Twitter (if not configured): "X is the primary source for crypto research — most signal lives there. To unlock X: add AUTH_TOKEN+CT0 (browser cookies) or XAI_API_KEY (no browser access)."
- Option A: "I have AUTH_TOKEN + CT0 from my browser" — accept both, write to .env
- Option B: "I have an xAI API key" — supports both the Chat Completions API (
api.x.ai/v1/chat/completions) and the newer Responses API (api.x.ai/v1/responseswithgrok-4.20-reasoning+x_searchtool). Write XAI_API_KEY to .env. - Option C: "Skip for now"
-
Web search (if no Brave/Exa/Serper key): "A web search key enables grounded news, blog, and doc results. Brave is free for 2,000 queries/month at brave.com/search/api. Exa is 1K free/month at exa.ai. Serper is generous free tier at serper.dev."
-
Crypto Data APIs (if any of the three keys are missing): "Crypto research benefits enormously from market, on-chain, and social-quant data. All three are free tier."
- CoinGecko (
COINGECKO_API_KEY) — price, market cap, %-changes, volume, top exchanges, community size. Pro key (required) at coingecko.com/api. - Messari (
MESSARI_API_KEY) — futures volume, open interest, funding rate, volatility, project profile. Free at messari.io/api. - LunarCrush (
LUNARCRUSH_API_KEY) — Galaxy Score, AltRank, sentiment, top influencers, AI bull/bear themes. Free Discover tier (10 req/min, 2K/day) at lunarcrush.com/developers.
- CoinGecko (
-
Firecrawl (
FIRECRAWL_API_KEY, optional) — fallback URL scraper for whitepapers, governance posts, deep blog content. Free tier at firecrawl.dev.
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.
Claude Code Setup Flow (Standard)
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-crypto!
I research crypto topics across Twitter/X (primary), web, and three crypto data APIs (CoinGecko, Messari, LunarCrush) — synthesizing what crypto Twitter is saying alongside market, on-chain, and social-quant data.
Auto setup gets X working in 30 seconds:
- X/Twitter — reads your x.com browser cookies to authenticate (not saved to disk). Chrome on macOS will prompt for Keychain access.
- Web search — Brave/Exa/Serper key for grounded news, blogs, docs (always on if any key is configured)
- Hacker News + GitHub (if
ghCLI installed) + Reddit — tertiary, always on with zero config
Crypto data APIs (recommended — all free tier): CoinGecko (market), Messari (on-chain & derivatives), LunarCrush (Galaxy Score, sentiment, top influencers). Optional: Firecrawl for URL scraping.
Then call AskUserQuestion with ONLY this question and these options - no additional text:
Question: "How would you like to set up?" Options:
- "Auto setup (~30 seconds) - scans browser cookies for X"
- "Manual setup - show me what to configure"
- "Skip for now - HN, GitHub (if gh installed), Reddit, and Web (if web key already set)"
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-crypto/.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:
- "Yes, scan my cookies for X" - Run setup as normal. Append
BROWSER_CONSENT=trueto .env after setup completes. - "Skip X scan, I'll set keys manually" - Skip cookie scan; user will configure X keys (XAI_API_KEY or AUTH_TOKEN+CT0) manually.
- "I have an xAI API key instead" - Ask them to paste it, write XAI_API_KEY to .env.
Run the setup subcommand:
cd {SKILL_DIR} && "${LAST30DAYS_PYTHON}" scripts/last30days.py setup
Show the user the results (what cookies were found).
Then show the Crypto Data Setup modal (plain text, then modal):
Crypto research benefits enormously from market, on-chain, and social-quant data. CoinGecko gives you price/marketcap/volume; Messari gives you derivatives positioning (OI, funding, volatility); LunarCrush gives you Galaxy Score, AltRank, sentiment trend, and top influencers. All three are free tier.
Call AskUserQuestion: Question: "Want to add the crypto data APIs? (CoinGecko / Messari / LunarCrush — all free tier.)" Options:
- "I have keys to paste" — Accept the three keys (any subset; ask one by one). Write
COINGECKO_API_KEY={k},MESSARI_API_KEY={k},LUNARCRUSH_API_KEY={k}to~/.config/last30days-crypto/.env. Confirm what was added. - "Open all three signup pages" — Run
open https://www.coingecko.com/en/api/pricingandopen https://messari.io/apiandopen https://lunarcrush.com/developersvia Bash. Tell user to paste keys when ready. - "Skip for now — I'll add them later" — proceed without crypto data. Note: research without these keys will still run on X/web but skip the Market & On-chain section.
After crypto setup (or skip), optionally offer Firecrawl:
Call AskUserQuestion: Question: "Add Firecrawl for URL scraping? (Used as a fallback when grounding snippets are too thin — whitepapers, governance posts, deep blog content.)" Options:
- "I have a Firecrawl key" — accept, write
FIRECRAWL_API_KEY={k}to .env. - "Open firecrawl.dev signup" — Run
open https://firecrawl.devvia Bash. - "Skip for now"
After Firecrawl (or skip), show the first research topic modal:
Call AskUserQuestion: Question: "What do you want to research first?" Options:
- "$HYPE Hyperliquid this week" — token-specific deep dive
- "New memecoin launches on Solana" — narrative/category research
- "Bitcoin ETF flows and price action" — market + macro
- "AI agent token landscape" — sector/thesis research
- "Type my own topic"
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-crypto $HYPE), 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-crypto before.
If the user picks 2 (Manual setup): Show them this guide (present as plain text, not blockquoted):
The magic of /last30days-crypto is X/Twitter posts + crypto data APIs together. Here's how to unlock each source.
Add these to ~/.config/last30days-crypto/.env:
X/Twitter (pick one — this is the primary source):
AUTH_TOKEN=xxx+CT0=xxx— paste your X cookies manually (x.com -> F12 -> Application -> Cookies). Recommended for the best signal.XAI_API_KEY=xxx— no browser access needed. Works with both the Chat Completions API (grok-3) and the Responses API (grok-4.20-reasoning + x_search tool). Get a key at console.x.ai. Best for servers.
Crypto Data APIs (highly recommended — all free tier):
COINGECKO_API_KEY=xxx— Pro key at coingecko.com/api. Price, market cap, %-changes, volume, top exchanges, community size, developer activity.MESSARI_API_KEY=xxx— free key at messari.io/api. Futures volume, open interest, funding rate, volatility, project profile, ATH/ROI.LUNARCRUSH_API_KEY=xxx— free Discover tier (10 req/min, 2K/day) at lunarcrush.com/developers. Galaxy Score, AltRank, sentiment, AI bull/bear themes, top influencers, social time-series.
Web search (highly recommended — secondary qualitative source):
BRAVE_API_KEY=xxx— Brave Search, 2,000 free queries/month at brave.com/search/api.EXA_API_KEY=xxx— semantic web search, 1K free/month at exa.ai.SERPER_API_KEY=xxx— generous free tier at serper.dev.PARALLEL_API_KEY=xxx— alternative web backend.
Optional: Firecrawl (URL scraper):
FIRECRAWL_API_KEY=xxx— fallback for whitepapers, governance posts, deep blog content. Free tier at firecrawl.dev.
Optional: GitHub Issues/PRs (free, no key needed):
- If you have the
ghCLI installed (brew install gh), GitHub search is automatic. Useful for protocol/infra topics. No API key required.
Always add this last line: SETUP_COMPLETE=true
CRITICAL: NEVER overwrite an existing .env file. Before writing ANY key to ~/.config/last30days-crypto/.env:
- Check if the file exists:
test -f ~/.config/last30days-crypto/.env - If it exists, READ it first, then APPEND only missing keys using
>>(double redirect) - NEVER use
>(single redirect) which destroys existing content - If it doesn't exist, create it:
mkdir -p ~/.config/last30days-crypto && touch ~/.config/last30days-crypto/.env
Then call AskUserQuestion: Question: "How do you want to add your keys?" Options:
- "Open .env in my editor" - Creates the file with a commented template and opens it. You edit, save, and come back.
- "Paste keys here" - Paste your API keys and I'll write the file for you.
- "I'll do it myself" - I'll tell you the file path and you handle it.
If the user picks "Open .env in editor":
Create ~/.config/last30days-crypto/.env if it doesn't exist (check first!), pre-populated with this template:
# /last30days-crypto configuration
# Uncomment and fill in the keys you want to use.
# X/Twitter (PRIMARY source — pick one):
# AUTH_TOKEN= # Manual: x.com -> F12 -> Application -> Cookies
# CT0= # (requires AUTH_TOKEN too)
# XAI_API_KEY= # No browser access. Get a key at api.x.ai
# Crypto Data APIs (highly recommended — all free tier):
# COINGECKO_API_KEY= # Pro key at coingecko.com/api
# MESSARI_API_KEY= # Free at messari.io/api
# LUNARCRUSH_API_KEY= # Free Discover tier at lunarcrush.com/developers
# Optional: Firecrawl (URL scraper for whitepapers, governance posts):
# FIRECRAWL_API_KEY= # Free tier at firecrawl.dev
# Web search (recommended — secondary qualitative source):
# BRAVE_API_KEY= # 2,000 free queries/month at brave.com/search/api
# EXA_API_KEY= # 1K free/month at exa.ai
# SERPER_API_KEY= # Generous free tier at serper.dev
# Optional: Perplexity Sonar via OpenRouter (~$0.02/run):
# OPENROUTER_API_KEY=
# INCLUDE_SOURCES=perplexity
# Optional: GitHub (auto-detected if `gh` CLI is installed)
# GITHUB_TOKEN=
SETUP_COMPLETE=true
If the file already exists, do NOT overwrite it. Just open it.
Run open ~/.config/last30days-crypto/.env on macOS to open in the default editor.
Then tell the user: "Your .env is open. Edit it, save, and run /last30days-crypto again."
If the user picks "Paste keys here", write them to ~/.config/last30days-crypto/.env (create the file and parent dirs if needed, append without overwriting existing keys, always include SETUP_COMPLETE=true). If any of COINGECKO_API_KEY/MESSARI_API_KEY/LUNARCRUSH_API_KEY are included, confirm: "Crypto data APIs are now on. The Market & On-chain section will appear in every research run that mentions a token." Then proceed with research.
If the user picks "I'll do it myself", tell them: "Save the file at ~/.config/last30days-crypto/.env, then run /last30days-crypto <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 HN, GitHub (if gh CLI installed), Reddit, and Web (if any web key is already set). X/Twitter and crypto-data APIs require setup.
Do I Need API Keys?
When users ask about API keys, setup, or how to unlock more sources, reference this:
You technically can use last30days-crypto without keys, but for crypto research you'll want X/Twitter and the three crypto data APIs configured. Without them, the skill falls back to HN/GitHub/Reddit + web — useful for narrative discovery but missing the market and on-chain signal.
Source unlock progression (all free tier):
- Zero config (30% quality): HN, Reddit, GitHub (if
ghinstalled), Web (if a web key is already set) — narrative-only -
- X cookies (60%): paste
AUTH_TOKEN+CT0from your x.com browser cookies, or useXAI_API_KEY. X is the primary source for crypto research.
- X cookies (60%): paste
-
- Web search key (75%):
BRAVE_API_KEY/EXA_API_KEY/SERPER_API_KEY— adds grounded news, blogs, docs.
- Web search key (75%):
-
- Crypto data APIs (95%):
COINGECKO_API_KEY(price, marketcap, exchanges),MESSARI_API_KEY(futures, OI, funding, volatility),LUNARCRUSH_API_KEY(Galaxy Score, AltRank, sentiment, top influencers). All free tier.
- Crypto data APIs (95%):
-
- Firecrawl (100%):
FIRECRAWL_API_KEYfor whitepapers, governance posts, deep blog content. Free tier.
- Firecrawl (100%):
last30days-crypto has no affiliation with any API provider — no referrals, no kickbacks.
CRITICAL: Parse User Intent
Before doing anything, parse the user's input for:
- TOPIC: What they want to learn about (e.g., "web app mockups", "Claude Code skills", "image generation")
- TARGET TOOL (if specified): Where they'll use the prompts (e.g., "Nano Banana Pro", "ChatGPT", "Midjourney")
- QUERY TYPE: What kind of research they want:
- PROMPTING - "X prompts", "prompting for X", "X best practices" → User wants to learn techniques and get copy-paste prompts
- RECOMMENDATIONS - "best X", "top X", "what X should I use", "recommended X" → User wants a LIST of specific things
- NEWS - "what's happening with X", "X news", "latest on X" → User wants current events/updates
- COMPARISON - "X vs Y", "X versus Y", "compare X and Y", "X or Y which is better" → User wants a side-by-side comparison
- GENERAL - anything else → User wants broad understanding of the topic
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- Just
[topic]→ "iOS design mockups" → TOOL NOT SPECIFIED, that's OK - "best [topic]" or "top [topic]" → QUERY_TYPE = RECOMMENDATIONS
- "what are the best [topic]" → QUERY_TYPE = RECOMMENDATIONS
- "X vs Y" or "X versus Y" → QUERY_TYPE = COMPARISON, TOPIC_A = X, TOPIC_B = Y (split on
vsorversuswith spaces)
IMPORTANT: Do NOT ask about target tool before research.
- If tool is specified in the query, use it
- If tool is NOT specified, run research first, then ask AFTER showing results
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:
- Always active: Reddit, Hacker News, Polymarket
- If gh CLI is installed (check
which gh): add GitHub - If AUTH_TOKEN/CT0 or XAI_API_KEY or FROM_BROWSER is set: add X
- If yt-dlp is installed (check
which yt-dlp): add YouTube - If SCRAPECREATORS_API_KEY is set and INCLUDE_SOURCES contains tiktok: add TikTok
- If SCRAPECREATORS_API_KEY is set and INCLUDE_SOURCES contains instagram: add Instagram
- If SCRAPECREATORS_API_KEY is set and INCLUDE_SOURCES contains threads: add Threads
- If SCRAPECREATORS_API_KEY is set and INCLUDE_SOURCES contains pinterest: add Pinterest
- If BSKY_HANDLE and BSKY_APP_PASSWORD are set: add Bluesky
- If OPENROUTER_API_KEY is set: add Perplexity
Then display (use "and more" if 5+ sources, otherwise list all with Oxford comma):
For GENERAL / NEWS / RECOMMENDATIONS / PROMPTING queries:
/last30days-crypto — searching {ACTIVE_SOURCES_LIST} for what people are saying about {TOPIC}.
For COMPARISON queries:
/last30days-crypto — 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.
Step 0.5: Resolve X Handles (if topic could have X accounts)
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:
- If the topic is a PERSON, resolve their company's X handle. A CEO's story is inseparable from their company's story.
- If the topic is a PRODUCT or COMPANY, resolve the founder/creator's personal X handle. The creator's personal account often has the most candid, high-signal content.
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:
- Verified profile URLs like
x.com/{handle}ortwitter.com/{handle} - Mentions like "@handle" in bios, articles, or social profiles
- "Follow @handle on X" patterns
Verify accounts are real, not parody/fan accounts. Check for:
- Verified/blue checkmark in the search results
- Official website linking to the X account
- Consistent naming (e.g., @thedorbrothers for "The Dor Brothers", not @DorBrosFan)
- If results only show fan/parody/news accounts (not the entity's own account), skip - the entity may not have an X presence
Pass handles to the CLI:
- Primary:
--x-handle={handle}(without @) - Related:
--x-related={handle1},{handle2},{company_handle},{commentator_handles}(comma-separated, without @)
Example for "Kanye West":
- Primary:
--x-handle=kanyewest - Related:
--x-related=travisscott,PopBase,HotFreestyle
Example for "Sam Altman":
- Primary:
--x-handle=sama - Related:
--x-related=OpenAI,TechCrunch
Related 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:
- TOPIC is clearly a generic concept, not an entity (e.g., "best rap songs 2026", "how to use Docker", "AI ethics debate")
- TOPIC already contains @ (user provided the handle directly)
- Using
--quickdepth - WebSearch shows no official X account exists for this entity
Store: RESOLVED_HANDLE = {handle or empty}, RESOLVED_RELATED = {comma-separated handles or empty}
Step 0.5b: Resolve GitHub Username (if topic is a person)
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:
- TOPIC is clearly NOT a person (products, concepts, events)
- TOPIC already has
--github-userspecified by the user - Using
--quickdepth - WebSearch shows no GitHub profile for this person
Store: RESOLVED_GITHUB_USER = {username or empty}
Step 0.5c: Resolve GitHub Repos (if topic is a product/project)
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:
- TOPIC is a person (use
--github-userinstead) - TOPIC has no GitHub presence (not a software project)
- WebSearch shows no GitHub repo for this topic
Store: RESOLVED_GITHUB_REPOS = {comma-separated owner/repo or empty}
Agent Mode (--agent flag)
If --agent appears in ARGUMENTS (e.g., /last30days-crypto $HYPE momentum --agent):
- Skip the intro display block ("I'll research X across Reddit...")
- Skip any
AskUserQuestioncalls - useTARGET_TOOL = "unknown"if not specified - Run the research script and WebSearch exactly as normal
- Skip the "WAIT FOR USER RESPONSE" pause
- Skip the follow-up invitation ("I'm now an expert on X...")
- Output the complete research report and stop - do not wait for further input
Agent mode saves raw research data to ~/Documents/Last30Days-Crypto/ 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}
If QUERY_TYPE = COMPARISON
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}" --deep --emit=compact --save-dir=~/Documents/Last30Days-Crypto --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}
The --plan JSON for comparisons should include 3-4 subqueries:
- Head-to-head:
"{TOPIC_A} vs {TOPIC_B}"— catches rivalry content, direct comparisons - Entity A news:
"{TOPIC_A} news {MONTH} {YEAR}"— catches entity-specific developments - Entity B news:
"{TOPIC_B} news {MONTH} {YEAR}"— catches entity-specific developments - (Optional) Domain context:
"{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).
Step 0.55: Pre-Research Intelligence (resolve communities + handles)
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.
- Hashtags: Infer 2-3 from the topic name + category. Examples: "Kanye West" →
kanyewest,ye,bully. "Claude Code" →claudecode,aiagent,aicoding. "Sam Altman" →samaltman,openai,chatgpt. - Creators: Only search if the topic is a content creator, influencer, or brand that likely has TikTok presence. For CEOs, politicians, and non-creator people: skip.
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.
- For music artists:
'{TOPIC} album review','{TOPIC} reaction' - For products/SaaS:
'{TOPIC} review','{TOPIC} tutorial' - For comparisons:
'{TOPIC_A} vs {TOPIC_B}' - For people in the news:
'{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.
Step 0.75: Generate Query Plan (YOU are the planner)
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:
- What is the user's intent? (breaking_news, product, comparison, how_to, opinion, prediction, factual, concept)
- What subqueries would find the best content across different platforms?
- What related angles should be searched at lower weight?
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:
- Emit 1 to 4 subqueries (more for complex/multi-faceted topics, fewer for simple ones)
- CRITICAL: Your PRIMARY subquery MUST include ALL of these sources: reddit, x, youtube, tiktok, instagram, hackernews, polymarket. Never omit reddit (highest-signal discussion) or youtube (unique transcripts + official content). Secondary subqueries can target specific platforms.
search_queryshould be concise and keyword-heavy — match how content is TITLED on platformsranking_queryshould read like a natural language question- DISAMBIGUATION: If the topic name is a common word or has known non-product meanings (e.g., "Loom" = also a weaving tool, "Tella" = also a soccer player), add a qualifying term to your search_query to disambiguate. Examples: "tella screen recording" not just "tella", "loom video messaging" not just "loom". The product category prevents matching unrelated content.
- For comparison queries, each subquery should include the product category: "tella screen recorder review" not just "tella review", "loom video tool pricing" not just "loom pricing".
- NEVER include temporal phrases in search_query: no "last 30 days", "recent", month names, year numbers
- NEVER include meta-research phrases: no "news", "updates", "public appearances"
- Preserve exact proper nouns and entity strings from the topic
- For comparison ("X vs Y"): create per-entity subqueries at weight 0.8 + a head-to-head subquery at weight 1.0
- For product queries: route to YouTube (reviews), Reddit (discussions), TikTok (demos)
- For predictions: include Polymarket in sources
- For how_to: prioritize YouTube (tutorials) and Reddit (guides)
- Primary subquery weight = 1.0, secondary = 0.6-0.8, peripheral = 0.3-0.5
Available 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:
- breaking_news, prediction →
strict_recent - concept, how_to →
evergreen_ok - everything else →
balanced_recent
Intent → cluster_mode mapping:
- breaking_news →
story - comparison, opinion →
debate - prediction →
market - how_to →
workflow - everything else →
none
Store your plan as QUERY_PLAN_JSON — you'll pass it to the script in the next step.
Research Execution
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-crypto" \
"$HOME/.claude/plugins/marketplaces/last30days-skill" \
"$HOME/.claude/plugins/cache/last30days-crypto-private/last30days-crypto/3.0.0-alpha" \
"$HOME/.claude/skills/last30days-crypto"; 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 --deep --emit=compact --save-dir=~/Documents/Last30Days-Crypto --save-suffix=v3
Why --deep is the default for this skill: crypto research demands the full enrichment pass — Messari derivatives (open interest, funding rate, futures volume, volatility), LunarCrush time-series, and CoinGecko exchange/community data only run at default and deep depth. --quick skips them. Always invoke with --deep unless the user explicitly asks for a fast pass with --quick in their topic.
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)--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)- Omit any flag where the value was not resolved (empty).
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:
- Detect available API keys
- Run Reddit/X/YouTube/TikTok/Instagram/Hacker News/Polymarket searches
- Output ALL results including YouTube transcripts, TikTok captions, Instagram captions, HN comments, and prediction market odds
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.
STEP 2: DO WEBSEARCH AFTER SCRIPT COMPLETES
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"):
- Search for:
best {TOPIC} recommendations - Search for:
{TOPIC} list examples - Search for:
most popular {TOPIC} - Goal: Find SPECIFIC NAMES of things, not generic advice
If NEWS ("what's happening with X", "X news"):
- Search for:
{TOPIC} news 2026 - Search for:
{TOPIC} announcement update - Goal: Find current events and recent developments
If PROMPTING ("X prompts", "prompting for X"):
- Search for:
{TOPIC} prompts examples 2026 - Search for:
{TOPIC} techniques tips - Goal: Find prompting techniques and examples to create copy-paste prompts
If GENERAL (default):
- Search for:
{TOPIC} 2026 - Search for:
{TOPIC} discussion - Goal: Find what people are actually saying
For ALL query types:
- USE THE USER'S EXACT TERMINOLOGY - don't substitute or add tech names based on your knowledge
- EXCLUDE reddit.com, x.com, twitter.com (covered by script)
- INCLUDE: blogs, tutorials, docs, news, GitHub repos
- DO NOT output a separate "Sources:" block — instead, include the top 3-5 web source names as inline links on the 🌐 Web: stats line (see stats format below). The WebSearch tool requires citation; satisfy it there, not as a trailing section.
Options (passed through from user's command):
--days=N→ Look back N days instead of 30 (e.g.,--days=7for weekly roundup)--quick→ Faster, fewer sources (8-12 each). Skips Messari derivatives + LunarCrush time-series + CoinGecko exchange data. Only use when the user explicitly asks for speed.--deep→ Default for this skill. Comprehensive crypto enrichment: Messari OI/funding/volume/volatility, LunarCrush time-series + posts, CoinGecko exchanges. ~40-60 X posts.- (script default
defaultdepth) → Balanced. Acceptable when--deepis too slow but still hits the full crypto enrichment pass.
Step 2.5: Append WebSearch Results to Saved Raw File
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:
- Read the raw file at
~/Documents/Last30Days-Crypto/{slug}-raw-nogem.md(it was saved by the Python engine in Step 1). - Append a
## WebSearch Supplemental Resultssection at the end. - For each WebSearch result, include the URL and a 1-2 sentence excerpt of what you found.
- Write the updated file back.
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.
Judge Agent: Synthesize All Sources
v3 Cluster-First 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)- Items within a cluster show: source label, title, date, score, URL, and evidence snippet
Synthesis strategy for cluster-first output:
- Synthesize per-cluster first. Each cluster = one story. Summarize what each story is about.
- Multi-source clusters are highest confidence. A cluster with items from Reddit + X + YouTube is much stronger than single-source.
- Check uncertainty tags. "single-source" means treat with caution. "thin-evidence" means mention but caveat.
- Cross-cluster synthesis second. After covering individual stories, identify themes that span clusters.
- Engagement signals still matter. Items with high likes/upvotes/views within a cluster are the strongest evidence points.
- Quote directly from evidence snippets. The snippets are pre-extracted best passages — use them.
- Extract the top 3-5 actionable insights across all clusters.
- Disambiguation: trust your resolved entity. When Step 0.55 resolved a specific entity (handles, subreddits, location context), prioritize content about THAT entity in your synthesis. If search results contain a different entity with the same name (e.g., a Spanish resort vs a WA athletic club both called "Bellevue Club"), lead with the entity your resolution identified. Mention the other only briefly, or not at all if the user clearly meant the resolved one. The resolved handles are the strongest signal for user intent.
Source-Specific Guidance (still applies within clusters)
The Judge Agent must:
- Weight Reddit/X sources HIGHER (they have engagement signals: upvotes, likes)
- Weight YouTube sources HIGH (they have views, likes, and transcript content)
- Weight TikTok sources HIGH (they have views, likes, and caption content — viral signal)
- Weight WebSearch sources LOWER (no engagement data)
- For Reddit: Pay special attention to top comments — they often contain the wittiest, most insightful, or funniest take. Quote them directly.
- For YouTube: Quote transcript highlights directly. Attribute to the channel name.
- Identify patterns that appear across ALL sources (strongest signals)
- Note any contradictions between sources
- Multi-source clusters (items from 3+ platforms) are the strongest signals. Lead with these.
- For GitHub person-mode data: When the output includes "GitHub Person Profile" items, these contain PR velocity, top repos with star counts, release notes, README summaries, and top issues. Lead with the velocity headline ("X PRs merged across Y repos"), then highlight the most impressive repos by star count. Weave release notes into the narrative to show what actually shipped. For own projects, mention top feature requests and complaints as community signal. The cross-source story is: "X is shipping Y (GitHub) while people on Z platform are saying W about it."
- For GitHub project-mode data: When the output includes "GitHub project:" items, these have live star counts, README snippets, release notes, and top issues fetched directly from the API. Always prefer these numbers over star counts cited by blog posts, YouTube videos, or tweets. Live API data is authoritative. When items include "(live: NNK stars)" annotations, use those numbers.
- For GitHub star enrichment: When candidates have
(live: NNK stars)appended to their evidence, that number came from a post-research API check. It overrides whatever the original source claimed.
Prediction Markets (Polymarket)
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:
- Sports: Championship/tournament odds > conference title > regular season > weekly matchup
- Geopolitics: Regime change/structural outcomes > near-term strike deadlines > sanctions
- Tech/Business: IPO, major product launch, company milestones > incremental updates
- Elections: Presidency > primary > individual state
Do NOT display stats here - they come at the end, right before the invitation.
- Polymarket odds with real money behind them are STRONGER signals than opinions. A $66K volume market with 96% odds is more reliable than 100 tweets. Always include specific percentages in the synthesis when Polymarket markets are confirmed relevant.
X Reply Cluster Weighting
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."
WebSearch Supplement Weighting for Comparisons
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.
FIRST: Internalize the Research
CRITICAL: Ground your synthesis in the ACTUAL research content, not your pre-existing knowledge.
Read the research output carefully. Pay attention to:
- Exact product/tool names mentioned (e.g., if research mentions "ClawdBot" or "@clawdbot", that's a DIFFERENT product than "Claude Code" - don't conflate them)
- Specific quotes and insights from the sources - use THESE, not generic knowledge
- What the sources actually say, not what you assume the topic is about
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.
- Assume I know nothing about this topic. Zero context.
- No jargon without a quick explanation in parentheses
- Short sentences. One idea per sentence.
- Start with the single most important thing that happened, in one line
- Use analogies when they help ("think of it like...")
- Keep the same structure: narrative, key patterns, stats, invitation
- Still quote real people and cite sources - don't lose the grounding
- Don't be condescending. Simple is not stupid. ELI5 means accessible, not childish.
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.
If QUERY_TYPE = RECOMMENDATIONS
CRITICAL: Extract SPECIFIC NAMES, not generic patterns.
When user asks "best X" or "top X", they want a LIST of specific things:
- Scan research for specific product names, tool names, project names, skill names, etc.
- Count how many times each is mentioned
- Note which sources recommend each (Reddit thread, X post, blog)
- List them by popularity/mention count
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."
If QUERY_TYPE = COMPARISON
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.
For all QUERY_TYPEs
Identify from the ACTUAL RESEARCH OUTPUT:
- PROMPT FORMAT - Does research recommend JSON, structured params, natural language, keywords?
- The top 3-5 patterns/techniques that appeared across multiple sources
- Specific keywords, structures, or approaches mentioned BY THE SOURCES
- Common pitfalls mentioned BY THE SOURCES
THEN: Show Summary + Invite Vision
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:
- Each item MUST have a "Sources:" line with actual @handles from X posts (e.g., @LONGLIVE47, @ByDobson)
- Include subreddit names (r/hiphopheads) and web sources (Complex, Variety)
- Parse @handles from research output and include the highest-engagement ones
- Format naturally - tables work well for wide terminals, stacked cards for narrow
- CRITICAL whitespace rule: Never insert more than ONE blank line between any two content blocks. Comparison tables should immediately follow the preceding paragraph with exactly one blank line. Do NOT pad with 3-6 empty lines before tables.
If PROMPTING/NEWS/GENERAL - Show synthesis and patterns:
CITATION RULE: Cite sources sparingly to prove research is real.
- In the "What I learned" intro: cite 1-2 top sources total, not every sentence
- In KEY PATTERNS: cite 1 source per pattern, short format: "per @handle" or "per r/sub"
- Do NOT include engagement metrics in citations (likes, upvotes) - save those for stats box
- Do NOT chain multiple citations: "per @x, @y, @z" is too much. Pick the strongest one.
CITATION PRIORITY (most to least preferred):
- @handles from X — "per @handle" (these prove the tool's unique value)
- r/subreddits from Reddit — "per r/subreddit" (when citing Reddit, prefer quoting top comments over just the thread title)
*Truncated - read the full file at https://github.com/Must-be-Ash/pulse/blob/27a9e9e33f5102c65091435422cb418132e0f780/SKILL.m