last30days v2.1: Research Any Topic from the Last 30 Days
Research ANY topic across Reddit, X, YouTube, and the web. Surface what people are actually discussing, recommending, and debating right now.
CRITICAL: Parse User Intent
Before doing anything, parse the user's input for:
- 1. 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
-
GENERAL - anything else → User wants broad understanding of the topic
Common patterns:
- -
[topic] for [tool] → "web mockups for Nano Banana Pro" → TOOL IS SPECIFIED - INLINECODE1 → "UI design prompts for Midjourney" → TOOL IS SPECIFIED
- Just
[topic] → "iOS design mockups" → TOOL NOT SPECIFIED, that's OK - "best [topic]" or "top [topic]" → QUERYTYPE = RECOMMENDATIONS
- "what are the best [topic]" → QUERYTYPE = RECOMMENDATIONS
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:
- - INLINECODE3
- INLINECODE4
- INLINECODE5
DISPLAY your parsing to the user. Before running any tools, output:
CODEBLOCK0
If TARGETTOOL is known, mention it in the intro: "...to find {QUERYTYPE}-style content for use in {TARGET_TOOL}."
This text MUST appear before you call any tools. It confirms to the user that you understood their request.
Research Execution
Step 1: Run the research script (FOREGROUND — do NOT background this)
CRITICAL: Run this command in the FOREGROUND with a 5-minute timeout. Do NOT use runinbackground. The full output contains Reddit, X, AND YouTube data that you need to read completely.
CODEBLOCK1
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 searches
- Output ALL results including YouTube transcripts
Read the ENTIRE output. It contains THREE data sections in this order: Reddit items, X items, and YouTube items. If you miss the YouTube section, 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, and optional transcript snippet. Count them and include them in your synthesis and stats block.
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: INLINECODE7
- Search for: INLINECODE8
- Search for: INLINECODE9
- Goal: Find SPECIFIC NAMES of things, not generic advice
If NEWS ("what's happening with X", "X news"):
- - Search for: INLINECODE10
- Search for: INLINECODE11
- Goal: Find current events and recent developments
If PROMPTING ("X prompts", "prompting for X"):
- - Search for: INLINECODE12
- Search for: INLINECODE13
- Goal: Find prompting techniques and examples to create copy-paste prompts
If GENERAL (default):
- - Search for: INLINECODE14
- Search for: INLINECODE15
- 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 "Sources:" list - this is noise, we'll show stats at the end
Options (passed through from user's command):
- -
--days=N → Look back N days instead of 30 (e.g., --days=7 for weekly roundup) - INLINECODE18 → Faster, fewer sources (8-12 each)
- (default) → Balanced (20-30 each)
- INLINECODE19 → Comprehensive (50-70 Reddit, 40-60 X)
Judge Agent: Synthesize All Sources
After all searches complete, internally synthesize (don't display stats yet):
The Judge Agent must:
- 1. Weight Reddit/X sources HIGHER (they have engagement signals: upvotes, likes)
- Weight YouTube sources HIGH (they have views, likes, and transcript content)
- Weight WebSearch sources LOWER (no engagement data)
- Identify patterns that appear across ALL sources (strongest signals)
- Note any contradictions between sources
- Extract the top 3-5 actionable insights
Do NOT display stats here - they come at the end, right before the invitation.
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.
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."
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:
CODEBLOCK2
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
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):
- 1. @handles from X — "per @handle" (these prove the tool's unique value)
- r/subreddits from Reddit — "per r/subreddit"
- YouTube channels — "per [channel name] on YouTube" (transcript-backed insights)
- Web sources — ONLY when Reddit/X/YouTube don't cover that specific fact
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 in the output.
- - BAD: "per https://www.rollingstone.com/music/music-news/kanye-west-bully-1235506094/"
- GOOD: "per Rolling Stone"
- GOOD: "per Complex"
Use the publication 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.
CODEBLOCK3
THEN - Stats (right before invitation):
CRITICAL: Calculate actual totals from the research output.
- - Count posts/threads from each section
- Sum engagement: parse
[Xlikes, Yrt] from each X post, [Xpts, Ycmt] from Reddit - Identify top voices: highest-engagement @handles from X, most active subreddits
Copy this EXACTLY, replacing only the {placeholders}:
CODEBLOCK4
If Reddit returned 0 threads, write: "├─ 🟠 Reddit: 0 threads (no results this cycle)"
If YouTube returned 0 videos or yt-dlp is not installed, omit the YouTube line entirely.
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:
CODEBLOCK5
If QUERY_TYPE = RECOMMENDATIONS:
CODEBLOCK6
If QUERY_TYPE = NEWS:
CODEBLOCK7
If QUERY_TYPE = GENERAL:
CODEBLOCK8
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?
WAIT FOR USER'S RESPONSE
After showing the stats summary with your invitation, STOP and wait for the user to respond.
WHEN USER RESPONDS
Read their response and match the intent:
- - If they ask a QUESTION about the topic → Answer from your research (no new searches, no prompt)
- If they ask to GO DEEPER on a subtopic → Elaborate using your research findings
- If they describe something they want to CREATE → Write ONE perfect prompt (see below)
- If they ask for a PROMPT explicitly → Write ONE perfect prompt (see below)
Only write a prompt when the user wants one. Don't force a prompt on someone who asked "what could happen next with Iran."
Writing a Prompt
When the user wants a prompt, write a single, highly-tailored prompt using your research expertise.
CRITICAL: Match the FORMAT the research recommends
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.
Quality Checklist (run before delivering):
- - [ ] FORMAT MATCHES RESEARCH - If research said JSON/structured/etc, prompt IS that format
- [ ] Directly addresses what the user said they want to create
- [ ] Uses specific patterns/keywords discovered in research
- [ ] Ready to paste with zero edits (or minimal [PLACEHOLDERS] clearly marked)
- [ ] Appropriate length and style for TARGET_TOOL
Output Format:
CODEBLOCK9
IF USER ASKS FOR MORE OPTIONS
Only if they ask for alternatives or more prompts, provide 2-3 variations. Don't dump a prompt pack unless requested.
AFTER EACH PROMPT: Stay in Expert Mode
After delivering a prompt, offer to write more:
Want another prompt? Just tell me what you're creating next.
CONTEXT MEMORY
For the rest of this conversation, remember:
- - TOPIC: {topic}
- TARGET_TOOL: {tool}
- KEY PATTERNS: {list the top 3-5 patterns you learned}
- RESEARCH FINDINGS: The key facts and insights from the research
CRITICAL: After research is complete, you are now an EXPERT on this topic.
When the user asks follow-up questions:
- - DO NOT run new WebSearches - you already have the research
- Answer from what you learned - cite the Reddit threads, X posts, and web sources
- If they ask a question - answer it from your research findings
- If they ask for a prompt - write one using your expertise
Only do new research if the user explicitly asks about a DIFFERENT topic.
Output Summary Footer (After Each Prompt)
After delivering a prompt, end with:
CODEBLOCK10
Security & Permissions
What this skill does:
- - Sends search queries to OpenAI's Responses API (
api.openai.com) for Reddit discovery - Sends search queries to Twitter's GraphQL API (via browser cookie auth) or xAI's API (
api.x.ai) for X search - Runs
yt-dlp locally for YouTube search and transcript extraction (no API key, public data) - Optionally sends search queries to Brave Search API, Parallel AI API, or OpenRouter API for web search
- Fetches public Reddit thread data from
reddit.com for engagement metrics - Stores research findings in local SQLite database (watchlist mode only)
What this skill does NOT do:
- - Does not post, like, or modify content on any platform
- Does not access your Reddit, X, or YouTube accounts
- Does not share API keys between providers (OpenAI key only goes to api.openai.com, etc.)
- Does not log, cache, or write API keys to output files
- Does not send data to any endpoint not listed above
- Cannot be invoked autonomously by the agent (
disable-model-invocation: true)
Bundled 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.
last30days v2.1:研究过去30天的任何话题
研究Reddit、X、YouTube和网络上的任何话题。发现人们当前正在讨论、推荐和辩论的内容。
关键:解析用户意图
在执行任何操作之前,解析用户输入中的以下内容:
- 1. 主题:他们想了解什么(例如,网页应用原型、Claude Code技能、图像生成)
- 目标工具(如果指定):他们将使用提示词的地方(例如,Nano Banana Pro、ChatGPT、Midjourney)
- 查询类型:他们想要什么样的研究:
-
提示词 - X提示词、X的提示词、X最佳实践 → 用户想学习技巧并获取可复制粘贴的提示词
-
推荐 - 最佳X、顶级X、我应该用什么X、推荐的X → 用户想要具体事物的列表
-
新闻 - X发生了什么、X新闻、X最新动态 → 用户想要当前事件/更新
-
通用 - 其他任何内容 → 用户想要对该主题的广泛了解
常见模式:
- - [主题] for [工具] → Nano Banana Pro的网页原型 → 工具已指定
- [主题] prompts for [工具] → Midjourney的UI设计提示词 → 工具已指定
- 仅 [主题] → iOS设计原型 → 工具未指定,这没问题
- best [主题] 或 top [主题] → 查询类型 = 推荐
- what are the best [主题] → 查询类型 = 推荐
重要:在研究之前不要询问目标工具。
- - 如果查询中指定了工具,使用它
- 如果未指定工具,先进行研究,然后在展示结果后再询问
存储这些变量:
- - 主题 = [提取的主题]
- 目标工具 = [提取的工具,如果未指定则为未知]
- 查询类型 = [推荐 | 新闻 | 操作指南 | 通用]
向用户展示你的解析结果。 在运行任何工具之前,输出:
我将研究{主题}在Reddit、X和网络上的内容,查找过去30天内被讨论的内容。
解析的意图:
- - 主题 = {主题}
- 目标工具 = {目标工具或未知}
- 查询类型 = {查询类型}
研究通常需要2-8分钟(小众主题需要更长时间)。现在开始。
如果已知目标工具,在介绍中提及:...查找{查询类型}风格的内容,用于{目标工具}。
这段文字必须在调用任何工具之前出现。它向用户确认你理解了他们的请求。
研究执行
步骤1:运行研究脚本(前台——不要后台运行)
关键:在前台运行此命令,设置5分钟超时。不要使用runinbackground。完整输出包含Reddit、X和YouTube数据,你需要完整阅读。
bash
查找技能根目录——适用于仓库检出、Claude Code或Codex安装
for dir in \
. \
${CLAUDE
PLUGINROOT:-} \
$HOME/.claude/skills/last30days \
$HOME/.agents/skills/last30days \
$HOME/.codex/skills/last30days; do
[ -n $dir ] && [ -f $dir/scripts/last30days.py ] && SKILL_ROOT=$dir && break
done
if [ -z ${SKILL_ROOT:-} ]; then
echo 错误:找不到scripts/last30days.py >&2
exit 1
fi
python3 ${SKILL_ROOT}/scripts/last30days.py $ARGUMENTS --emit=compact
在Bash调用上使用300000毫秒(5分钟)的超时。脚本通常需要1-3分钟。
脚本将自动:
- - 检测可用的API密钥
- 运行Reddit/X/YouTube搜索
- 输出所有结果,包括YouTube转录
阅读整个输出。 它按顺序包含三个数据部分:Reddit项目、X项目和YouTube项目。如果你错过了YouTube部分,你将产生不完整的统计数据。
输出中的YouTube项目看起来像: {videoid} (score:N) {channelname} [N views, N likes] 后跟标题、URL和可选的转录片段。统计它们并将其包含在你的综合分析和统计块中。
步骤2:脚本完成后进行网络搜索
脚本完成后,进行网络搜索以补充博客、教程和新闻。
对于所有模式,进行网络搜索以补充(或在仅网络模式下提供所有数据)。
根据查询类型选择搜索查询:
如果是推荐(最佳X、顶级X、我应该用什么X):
- - 搜索:最佳{主题}推荐
- 搜索:{主题}列表示例
- 搜索:最流行的{主题}
- 目标:找到具体的事物名称,而非通用建议
如果是新闻(X发生了什么、X新闻):
- - 搜索:{主题}新闻 2026
- 搜索:{主题}公告更新
- 目标:找到当前事件和最新发展
如果是提示词(X提示词、X的提示词):
- - 搜索:{主题}提示词示例 2026
- 搜索:{主题}技巧提示
- 目标:找到提示技巧和示例以创建可复制粘贴的提示词
如果是通用(默认):
- - 搜索:{主题} 2026
- 搜索:{主题}讨论
- 目标:找到人们实际在说什么
对于所有查询类型:
- - 使用用户的确切术语——不要根据你的知识替换或添加技术名称
- 排除reddit.com、x.com、twitter.com(由脚本覆盖)
- 包括:博客、教程、文档、新闻、GitHub仓库
- 不要输出来源:列表——这是噪音,我们会在最后显示统计信息
选项(从用户命令传递):
- - --days=N → 回溯N天而不是30天(例如,--days=7用于每周汇总)
- --quick → 更快,更少的来源(各8-12个)
- (默认)→ 平衡(各20-30个)
- --deep → 全面(50-70个Reddit,40-60个X)
判断代理:综合所有来源
所有搜索完成后,内部综合(暂时不显示统计信息):
判断代理必须:
- 1. 对Reddit/X来源赋予更高权重(它们有参与信号:点赞、喜欢)
- 对YouTube来源赋予高权重(它们有观看次数、喜欢次数和转录内容)
- 对网络搜索来源赋予较低权重(没有参与数据)
- 识别跨所有来源出现的模式(最强信号)
- 注意来源之间的任何矛盾
- 提取前3-5个可操作的见解
不要在这里显示统计信息——它们在最后,邀请之前。
首先:内化研究内容
关键:将你的综合分析基于实际的研究内容,而不是你已有的知识。
仔细阅读研究输出。注意:
- - 提到的确切产品/工具名称(例如,如果研究提到ClawdBot或@clawdbot,那是与Claude Code不同的产品——不要混淆它们)
- 来源中的具体引用和见解——使用这些,而不是通用知识
- 来源实际说了什么,而不是你假设主题是什么
要避免的反模式:如果用户询问clawdbot skills且研究返回了ClawdBot内容(自托管AI代理),不要仅仅因为两者都涉及skills就将其综合为Claude Code skills。阅读研究实际说了什么。
如果查询类型 = 推荐
关键:提取具体名称,而不是通用模式。
当用户询问最佳X或顶级X时,他们想要具体事物的列表:
- - 扫描研究以找到具体产品名称、工具名称、项目名称、技能名称等
- 统计每个被提及的次数
- 注意每个被哪些来源推荐(Reddit帖子、X帖子、博客)
- 按受欢迎程度/提及次数列出它们
最佳Claude Code技能的糟糕综合分析:
技能很强大。保持它们在500行以下。使用渐进式披露。
最佳Claude Code技能的良好综合分析:
最常被提及的技能:/commit(5次提及)、remotion技能(4次)、git-worktree(3次)、/pr(3次)。Remotion公告在X上获得了16K点赞。
对于所有查询类型
从实际研究输出中识别:
- - 提示词格式——研究推荐JSON、结构化参数、自然语言还是关键词?
- 跨多个来源出现的前3-5个模式/技巧
- 来源提到的具体关键词、结构或方法
- 来源提到的常见陷阱
然后:显示摘要 + 邀请愿景
按此确切顺序显示:
首先 - 我学到了