last30days: Research Any Topic from the Last 30 Days
Research ANY topic across Reddit, X, and the web. Surface what people are actually discussing, recommending, and debating right now.
Use cases:
- - Prompting: "photorealistic people in Nano Banana Pro", "Midjourney prompts", "ChatGPT image generation" → learn techniques, get copy-paste prompts
- Recommendations: "best Claude Code skills", "top AI tools" → get a LIST of specific things people mention
- News: "what's happening with OpenAI", "latest AI announcements" → current events and updates
- General: any topic you're curious about → understand what the community is saying
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
Setup Check
The skill works in three modes based on available API keys:
- 1. Full Mode (both keys): Reddit + X + WebSearch - best results with engagement metrics
- Partial Mode (one key): Reddit-only or X-only + WebSearch
- Web-Only Mode (no keys): WebSearch only - still useful, but no engagement metrics
API keys are OPTIONAL. The skill will work without them using WebSearch fallback.
First-Time Setup (Optional but Recommended)
If the user wants to add API keys for better results:
CODEBLOCK0
DO NOT stop if no keys are configured. Proceed with web-only mode.
Research Execution
IMPORTANT: The script handles API key detection automatically. Run it and check the output to determine mode.
Step 1: Run the research script
CODEBLOCK1
The script will automatically:
- - Detect available API keys
- Show a promo banner if keys are missing (this is intentional marketing)
- Run Reddit/X searches if keys exist
- Signal if WebSearch is needed
Step 2: Check the output mode
The script output will indicate the mode:
- - "Mode: both" or "Mode: reddit-only" or "Mode: x-only": Script found results, WebSearch is supplementary
- "Mode: web-only": No API keys, Claude must do ALL research via WebSearch
Step 3: Do WebSearch
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: INLINECODE6
- Search for: INLINECODE7
- Search for: INLINECODE8
- Goal: Find SPECIFIC NAMES of things, not generic advice
If NEWS ("what's happening with X", "X news"):
- - Search for: INLINECODE9
- Search for: INLINECODE10
- Goal: Find current events and recent developments
If PROMPTING ("X prompts", "prompting for X"):
- - Search for: INLINECODE11
- Search for: INLINECODE12
- Goal: Find prompting techniques and examples to create copy-paste prompts
If GENERAL (default):
- - Search for: INLINECODE13
- Search for: INLINECODE14
- 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
- If user says "ChatGPT image prompting", search for "ChatGPT image prompting"
- Do NOT add "DALL-E", "GPT-4o", or other terms you think are related
- Your knowledge may be outdated - trust the user's terminology
- - 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
Step 3: Wait for background script to complete
Use TaskOutput to get the script results before proceeding to synthesis.
Depth options (passed through from user's command):
- -
--quick → Faster, fewer sources (8-12 each) - (default) → Balanced (20-30 each)
- INLINECODE16 → 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 WebSearch sources LOWER (no engagement data)
- Identify patterns that appear across ALL three 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? THIS IS CRITICAL.
- 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
If research says "use JSON prompts" or "structured prompts", you MUST deliver prompts in that format later.
THEN: Show Summary + Invite Vision
CRITICAL: Do NOT output any "Sources:" lists. The final display should be clean.
Display in this EXACT sequence:
FIRST - What I learned (based on QUERY_TYPE):
If RECOMMENDATIONS - Show specific things mentioned:
CODEBLOCK2
If PROMPTING/NEWS/GENERAL - Show synthesis and patterns:
CODEBLOCK3
THEN - Stats (right before invitation):
For full/partial mode (has API keys):
CODEBLOCK4
For web-only mode (no API keys):
CODEBLOCK5
LAST - Invitation:
CODEBLOCK6
Use real numbers from the research output. The patterns should be actual insights from the research, not generic advice.
SELF-CHECK before displaying: Re-read your "What I learned" section. Does it match what the research ACTUALLY says? If the research was about ClawdBot (a self-hosted AI agent), your summary should be about ClawdBot, not Claude Code. If you catch yourself projecting your own knowledge instead of the research, rewrite it.
IF TARGET_TOOL is still unknown after showing results, ask NOW (not before research):
CODEBLOCK7
IMPORTANT: After displaying this, WAIT for the user to respond. Don't dump generic prompts.
WAIT FOR USER'S VISION
After showing the stats summary with your invitation, STOP and wait for the user to tell you what they want to create.
When they respond with their vision (e.g., "I want a landing page mockup for my SaaS app"), THEN write a single, thoughtful, tailored prompt.
WHEN USER SHARES THEIR VISION: Write ONE Perfect Prompt
Based on what they want to create, 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:
- - Research says "JSON prompts" → Write the prompt AS JSON
- Research says "structured parameters" → Use structured key: value format
- Research says "natural language" → Use conversational prose
- Research says "keyword lists" → Use comma-separated keywords
ANTI-PATTERN: Research says "use JSON prompts with device specs" but you write plain prose. This defeats the entire purpose of the research.
Output Format:
CODEBLOCK8
Quality Checklist:
- - [ ] 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
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 for a prompt - write one using your expertise
- If they ask a question - answer it from your research findings
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:
For full/partial mode:
CODEBLOCK9
For web-only mode:
CODEBLOCK10
last30days: 研究过去30天内的任何话题
研究Reddit、X和网络上的任何话题。揭示人们当下正在讨论、推荐和辩论的内容。
使用场景:
- - 提示词:Nano Banana Pro中的逼真人物、Midjourney提示词、ChatGPT图像生成→ 学习技巧,获取可复制粘贴的提示词
- 推荐:最佳Claude Code技能、顶级AI工具→ 获取人们提到的具体内容列表
- 新闻:OpenAI发生了什么、最新AI公告→ 当前事件和更新
- 通用:任何你好奇的话题→ 了解社区在说什么
关键:解析用户意图
在执行任何操作之前,解析用户的输入以获取:
- 1. 话题:他们想了解什么(例如:网页应用原型、Claude Code技能、图像生成)
- 目标工具(如果指定):他们将使用提示词的地方(例如:Nano Banana Pro、ChatGPT、Midjourney)
- 查询类型:他们想要的研究类型:
-
提示词 - X提示词、X的提示词、X最佳实践→ 用户想学习技巧并获取可复制粘贴的提示词
-
推荐 - 最佳X、顶级X、我应该用什么X、推荐的X→ 用户想要具体内容的列表
-
新闻 - X发生了什么、X新闻、X最新动态→ 用户想要当前事件/更新
-
通用 - 其他任何内容→ 用户想要对该话题的广泛了解
常见模式:
- - [话题] 用于 [工具] → Nano Banana Pro的网页原型→ 工具已指定
- [话题] 提示词 用于 [工具] → Midjourney的UI设计提示词→ 工具已指定
- 仅 [话题] → iOS设计原型→ 工具未指定,这没问题
- 最佳[话题]或顶级[话题]→ 查询类型 = 推荐
- 什么是最好的[话题]→ 查询类型 = 推荐
重要:在研究之前不要询问目标工具。
- - 如果查询中指定了工具,使用它
- 如果未指定工具,先进行研究,然后在显示结果后再询问
存储这些变量:
- - 话题 = [提取的话题]
- 目标工具 = [提取的工具,如果未指定则为未知]
- 查询类型 = [推荐 | 新闻 | 操作方法 | 通用]
设置检查
该技能基于可用的API密钥以三种模式运行:
- 1. 完整模式(两个密钥):Reddit + X + 网络搜索 - 最佳结果,包含互动指标
- 部分模式(一个密钥):仅Reddit或仅X + 网络搜索
- 仅网络模式(无密钥):仅网络搜索 - 仍然有用,但没有互动指标
API密钥是可选的。 该技能可以在没有它们的情况下使用网络搜索作为后备方案运行。
首次设置(可选但推荐)
如果用户想要添加API密钥以获得更好的结果:
bash
mkdir -p ~/.config/last30days
cat > ~/.config/last30days/.env << ENVEOF
last30days API配置
两个密钥都是可选的 - 技能使用网络搜索后备方案
用于Reddit研究(使用OpenAI的web_search工具)
OPENAI
APIKEY=
用于X/Twitter研究(使用xAI的x_search工具)
XAI
APIKEY=
ENVEOF
chmod 600 ~/.config/last30days/.env
echo 配置已创建在 ~/.config/last30days/.env
echo 编辑以添加您的API密钥以获得增强的研究效果。
如果没有配置密钥,不要停止。 以仅网络模式继续。
研究执行
重要:脚本会自动检测API密钥。 运行它并检查输出以确定模式。
步骤1:运行研究脚本
bash
python3 ./scripts/last30days.py $参数 --emit=compact 2>&1
脚本将自动:
- - 检测可用的API密钥
- 如果缺少密钥则显示推广横幅(这是有意的营销)
- 如果密钥存在则运行Reddit/X搜索
- 如果需要网络搜索则发出信号
步骤2:检查输出模式
脚本输出将指示模式:
- - 模式:两者 或 模式:仅reddit 或 模式:仅x:脚本找到了结果,网络搜索是补充性的
- 模式:仅网络:没有API密钥,Claude必须通过网络搜索进行所有研究
步骤3:进行网络搜索
对于所有模式,进行网络搜索以补充(或在仅网络模式下提供所有数据)。
根据查询类型选择搜索查询:
如果是推荐(最佳X、顶级X、我应该用什么X):
- - 搜索:最佳{话题}推荐
- 搜索:{话题}列表示例
- 搜索:最受欢迎{话题}
- 目标:找到具体的事物的名称,而不是通用建议
如果是新闻(X发生了什么、X新闻):
- - 搜索:{话题}新闻 2026
- 搜索:{话题}公告更新
- 目标:找到当前事件和最新发展
如果是提示词(X提示词、X的提示词):
- - 搜索:{话题}提示词示例 2026
- 搜索:{话题}技巧提示
- 目标:找到提示技巧和示例以创建可复制粘贴的提示词
如果是通用(默认):
- - 搜索:{话题} 2026
- 搜索:{话题}讨论
- 目标:找到人们实际在说什么
对于所有查询类型:
- - 使用用户的精确术语 - 不要根据你的知识替换或添加技术名称
- 如果用户说ChatGPT图像提示,搜索ChatGPT图像提示
- 不要添加DALL-E、GPT-4o或其他你认为相关的术语
- 你的知识可能已过时 - 相信用户的术语
- - 排除reddit.com、x.com、twitter.com(由脚本覆盖)
- 包括:博客、教程、文档、新闻、GitHub仓库
- 不要输出来源:列表 - 这是噪音,我们将在最后显示统计数据
步骤3:等待后台脚本完成
使用TaskOutput获取脚本结果,然后再进行综合。
深度选项(通过用户命令传递):
- - --quick → 更快,更少的来源(每个8-12个)
- (默认)→ 平衡(每个20-30个)
- --deep → 全面(50-70个Reddit,40-60个X)
判断代理:综合所有来源
在所有搜索完成后,内部综合(暂时不显示统计数据):
判断代理必须:
- 1. 对Reddit/X来源给予更高权重(它们有互动信号:点赞数、喜欢数)
- 对网络搜索来源给予较低权重(没有互动数据)
- 识别在所有三个来源中都出现的模式(最强信号)
- 注意来源之间的任何矛盾
- 提取前3-5个可操作的见解
不要在这里显示统计数据 - 它们在最后,邀请之前。
首先:内化研究
关键:将你的综合建立在实际的研究内容上,而不是你已有的知识上。
仔细阅读研究输出。注意:
- - 提到的确切产品/工具名称(例如,如果研究提到ClawdBot或@clawdbot,那是与Claude Code不同的产品 - 不要混淆它们)
- 来自来源的具体引用和见解 - 使用这些,而不是通用知识
- 来源实际说了什么,而不是你假设这个话题是关于什么的
要避免的反模式:如果用户询问clawdbot技能并且研究返回了ClawdBot内容(自托管AI代理),不要仅仅因为两者都涉及技能就将其综合为Claude Code技能。阅读研究实际说了什么。
如果查询类型 = 推荐
关键:提取具体的名称,而不是通用模式。
当用户询问最佳X或顶级X时,他们想要一个具体事物的列表:
- - 扫描研究以找到具体的产品名称、工具名称、项目名称、技能名称等
- 计算每个被提到的次数
- 注意每个被哪些来源推荐(Reddit帖子、X帖子、博客)
- 按受欢迎程度/提及次数列出它们
对于最佳Claude Code技能的糟糕综合:
技能很强大。保持它们在500行以下。使用渐进式披露。
对于最佳Claude Code技能的良好综合:
最常被提及的技能:/commit(5次提及),remotion技能(4次),git-worktree(3次),/pr(3次)。Remotion公告在X上获得了16K个赞。
对于所有查询类型
从实际的研究输出中识别: