SuperAPI AI Directory

last30days

Coding & development

View repository

Updated 10-15 23:46

About this skill

last30days: Search the last 30 days of activity on any topic

Research across Reddit, X, and the webany topic, presenting what people are currently discussing, recommending, and debating.

Use cases:

  • Prompts: "Realistic-style characters in Nano Banana Pro," "Midjourney prompts," "ChatGPT image generation" → learn techniques, get copy-ready prompts
  • Recommendations: "Best Claude Code skills," "Top AI tools" → get a concrete recommendation list
  • News: "Latest OpenAI developments," "Latest AI announcements" → current events and updates
  • General: any topic of interest → learn what the community is discussing

Key: Parse user intent

Before doing anything, parse the user input:

  1. TOPIC: what the user wants to learn about (e.g., "web app prototyping," "Claude Code skills," "image generation")
  2. TARGET_TOOL(if specified): where the user will use the prompt (e.g., "Nano Banana Pro," "ChatGPT," "Midjourney")
  3. QUERY_TYPE: which kind of research the user wants:
    • PROMPTING — "X prompts," "how to write prompts for X," "X best practices" → the user wants to learn techniques and get copy-ready prompts
    • RECOMMENDATIONS — "best X," "top X," "which X is recommended" → the user wants a concrete recommendation list
    • NEWS — "what's happening with X," "X news," "latest X developments" → the user wants to know current events/activity
    • GENERAL — anything else → the user wants a broad understanding of the topic

Common patterns:

  • [话题] for [工具] → "web prototyping with Nano Banana Pro" → tool already specified
  • [话题] prompts for [工具] → "UI design prompts for Midjourney" → tool already specified
  • Only [话题] → "iOS design prototyping" → no tool specified, that's fine
  • "Best [topic]" or "top [topic]" → QUERY_TYPE = RECOMMENDATIONS
  • "Which [topic] are best" → QUERY_TYPE = RECOMMENDATIONS

Important: Do not ask about the target tool before researching.

  • If a tool is already specified in the query, use it directly
  • If no tool is specified, complete the research first, then ask after presenting the results

Save the following variables:

  • TOPIC = [提取的话题]
  • TARGET_TOOL = [提取的工具,未指定则为 "unknown"]
  • QUERY_TYPE = [RECOMMENDATIONS | NEWS | HOW-TO | GENERAL]

Environment check

The skill runs in three modes depending on the available API keys:

  1. Full mode(both keys present): Reddit + X + web search — best results, includes engagement data
  2. Partial mode(only one key): Reddit only or X only + web search
  3. Web-only mode(no keys): web search only — still useful, but no engagement data

API keys are optional. Without keys, the skill will automatically use web search mode.

Initial setup (optional but recommended)

If the user wants to add an API key for better results:

mkdir -p ~/.config/last30days
cat > ~/.config/last30days/.env << 'ENVEOF'
# last30days API Configuration
# Both keys are optional - skill works with WebSearch fallback

# For Reddit research (uses OpenAI's web_search tool)
OPENAI_API_KEY=

# For X/Twitter research (uses xAI's x_search tool)
XAI_API_KEY=
ENVEOF

chmod 600 ~/.config/last30days/.env
echo "Config created at ~/.config/last30days/.env"
echo "Edit to add your API keys for enhanced research."

Do not stop when no key is configured. Proceed directly in pure web mode and continue execution.


Research execution

Important: the script automatically detects the API key. After running the script, determine the current mode from the output.

Step 1: Run the research script

python3 ./scripts/last30days.py "$ARGUMENTS" --emit=compact 2>&1

The script will automatically:

  • Detect available API keys
  • If the key is missing, display a promotional banner (this is expected marketing behavior)
  • If the key exists, run Reddit/X searches
  • Signal whether web search is needed

Step 2: Check the output mode

The script output will show the current mode:

  • "Mode: both" or "Mode: reddit-only" or "Mode: x-only": the script has found results, web search is supplementary
  • "Mode: web-only": no API key, Claude must complete all research via web search

Step 3: Perform web search

All modesrequire web search (supplementary, or providing all data in pure web mode).

Choose search terms based on QUERY_TYPE:

If RECOMMENDATIONS("best X", "top X", "which X is recommended"):

  • Search:best {TOPIC} recommendations
  • Search:{TOPIC} list examples
  • Search:most popular {TOPIC}
  • Goal: find specific names, not general advice

If NEWS("what happened to X", "X news"):

  • Search:{TOPIC} news 2026
  • Search:{TOPIC} announcement update
  • Goal: find current events and recent developments

If PROMPTING("X prompts", "how to write prompts for X"):

  • Search:{TOPIC} prompts examples 2026
  • Search:{TOPIC} techniques tips
  • Goal: find prompt techniques and examples for creating reusable prompts

If GENERAL(default):

  • Search:{TOPIC} 2026
  • Search:{TOPIC} discussion
  • Goal: find what people are actually discussing

For all query types, note:

  • Use the user's original terms — do not replace them or add technical terms you think are relevant
    • If the user says "ChatGPT image prompts", search for "ChatGPT image prompts"
    • Do not add terms such as "DALL-E", "GPT-4o", etc. that you think are relevant
    • Your knowledge may be outdated — trust the user's wording
  • Exclude reddit.com, x.com, twitter.com (covered by the script)
  • Include: blogs, tutorials, documentation, news, GitHub repositories
  • Do not output a "Sources:" list — this is noise; statistics will be shown at the end

Step 3: Wait for the background script to finish Before proceeding to comprehensive analysis, use TaskOutput to get the script results.

Depth options(passed via user command):

  • --quick → faster, fewer sources (8-12 per location)
  • (default) → balanced (20-30 per location)
  • --deep → comprehensive (Reddit 50-70, X 40-60)

Judge agent: synthesize all sources

After all searches are complete, synthesize internally (do not show statistics at this point):

The judge agent must:

  1. Reddit/X source weightHigher(has engagement signals: likes, comments)
  2. Web search source weightLower(no engagement data)
  3. Identify patterns that appear inall threesources (strongest signal)
  4. Flag contradictions between sources
  5. Extract the top 3-5 actionable insights

Statistics are not shown here — statistics are displayed at the last position before the invitation.


Step 1: Internalize the research content

Key: Ground the synthesis in the actual research content, not pre-existing knowledge.

Read the research output carefully, noting:

  • Specific product/tool names mentioned(e.g., if the research mentions "ClawdBot" or "@clawdbot", that is a different product from "Claude Code" — do not confuse them)
  • Specific quotes and insights from the sources — use these, not general knowledge
  • What the sources actually said, not your assumptions about the topic

Anti-pattern warning: If the user asks about "clawdbot skills" and the research returns ClawdBot content (a self-hosted AI agent), do not synthesize it as "Claude Code skills" just because both involve "skills." Read what the research actually says.

If QUERY_TYPE = RECOMMENDATIONS

Key: Extract specific names, not general patterns.

When users ask for "the best X" or "top X," they want a specific list:

  • Scan the research for specific product names, tool names, project names, skill names, etc.
  • Count the mentions of each
  • Note the recommendations for each across sources (Reddit posts, X posts, blogs)
  • Rank by popularity/number of mentions

Bad synthesis of "the best Claude Code skills":

"Skills are powerful. Keep them under 500 lines. Use progressive disclosure."

Good synthesis of "the best Claude Code skills":

"Most-mentioned skills: /commit (5 times), remotion skill (4 times), git-worktree (3 times), /pr (3 times). Remotion's announcement got 16,000 likes on X."

All QUERY_TYPEs must:

Identify from the actual research output:

  • Prompt format — does the research recommend JSON, structured parameters, natural language, or keywords?This is critical.
  • The top 3-5 patterns/tips that appear across multiple sources
  • Specific keywords, structures, or methods mentioned by the sources
  • Common pitfalls mentioned by the sources

If the research says "use JSON prompts" or "structured prompts," you must use that format when delivering prompts later.


Then: Present the summary and invite the user to describe their idea

Key: Do not output any "Sources:" list. The final presentation should be concise and clean.

Present in the following exact order:

Part One — My Research Findings (based on QUERY_TYPE):

If RECOMMENDATIONS — show the specific items mentioned:

🏆 提及最多:
1. [具体名称] — 提及 {n} 次(r/版块、@账号、blog.com)
2. [具体名称] — 提及 {n} 次(来源)
3. [具体名称] — 提及 {n} 次(来源)
4. [具体名称] — 提及 {n} 次(来源)
5. [具体名称] — 提及 {n} 次(来源)

值得关注:[其他1-2次提及的具体内容]

If PROMPTING/NEWS/GENERAL — Present synthesis and patterns:

我的研究发现:

[2-4句话,综合实际研究输出中的关键洞察。]

我将使用的关键规律:
1. [来自研究的规律]
2. [来自研究的规律]
3. [来自研究的规律]

Part Two — Statistics (immediately before the invitation):

Full/partial mode(with API key):

---
✅ 所有智能体已报告!
├─ 🟠 Reddit:{n} 个帖子 │ {sum} 点赞 │ {sum} 评论
├─ 🔵 X:{n} 条帖子 │ {sum} 点赞 │ {sum} 转发
├─ 🌐 网页:{n} 个页面 │ {domains}
└─ 热门来源:r/{版块1}、r/{版块2} │ @{账号1}、@{账号2} │ {作者} on {网站}

Pure web mode(without API key):

---
✅ 研究完成!
├─ 🌐 网页:{n} 个页面 │ {domains}
└─ 主要来源:{作者1} on {网站1}、{作者2} on {网站2}

💡 想获取互动数据?向 ~/.config/last30days/.env 添加 API 密钥:
   - OPENAI_API_KEY → Reddit(真实点赞数和评论数)
   - XAI_API_KEY → X/Twitter(真实点赞数和转发数)

Part Three — Invitation:

---
告诉我你想创作什么,我将为你写一段可直接复制粘贴到 {TARGET_TOOL} 的精炼提示词。

Use real data from the research output. The patterns presented should be actual insights from the research, not generic advice.

Self-check before presenting: Reread the "My Research Findings" section. Does it match what the research actually contains? If the research is about ClawdBot (a self-hosted AI agent), your summary should be about ClawdBot, not Claude Code. If you find yourself projecting existing knowledge rather than the research content, rewrite it.

If TARGET_TOOL is still unknown after presenting the results, ask again now (rather than before the research):

你将在哪个工具中使用这些提示词?

选项:
1. [研究中提及的最相关工具——例如研究提到 Figma/Sketch 则提供这些选项]
2. Nano Banana Pro(图像生成)
3. ChatGPT / Claude(文字/代码)
4. 其他(告诉我)

Important: After presenting, wait for the user's response. Do not directly output a generic prompt.


Wait for the user to describe their idea

After presenting the statistics summary and the invitation,stop and waitfor the user to tell you what they want to create.

When the user describes their idea (e.g., "I want to make a landing page prototype for a SaaS product"),thenwrite a refined prompt tailored to it.


When the user describes their idea: write a perfect prompt

Based on what they want to create, combined with the expertise accumulated from the research, writea highly customized prompt。

Key: match the format recommended by the research

If the research recommended a specific prompt format, you must use that format:

  • Research says "JSON prompt" → write the prompt in JSON format
  • Research says "structured parameters" → use the 键: 值 format
  • Research says "natural language" → use conversational prose
  • Research says "keyword list" → use comma-separated keywords

Anti-pattern warning: The research says "use a JSON prompt with device specifications," but you wrote plain prose. This completely defeats the purpose of the research.

Output format:

这是为 {TARGET_TOOL} 准备的提示词:

---

[实际提示词——按研究推荐的格式撰写。研究建议 JSON 就用 JSON,建议自然语言就用散文。匹配有效的格式。]

---

应用了:[一行简述你采用了哪条研究洞察]

Quality checklist:

  • Format matches the research — if the research recommends JSON/structured, etc., the prompt is in that format
  • Directly responds to the user's stated creation need
  • Uses the specific patterns/keywords found in the research
  • Ready to paste and use (or with clearly marked [placeholders])
  • Length and style are appropriate for TARGET_TOOL

If the user asks for more options

Only when the user explicitly asks, provide 2-3 variants. Do not proactively output a large prompt pack.


After each prompt delivery: stay in expert mode

After each prompt delivery, offer an invitation to continue the service:

Want another prompt? Tell me what you want to create next.


Context memory

For the remainder of this conversation, remember:

  • TOPIC:{topic}
  • TARGET_TOOL:{tool}
  • Key patterns: {list the top 3-5 patterns learned}
  • Research findings: key facts and insights from the research

Key: once the research is complete, you become an expert on that topic.

When the user asks follow-up questions:

  • Do not re-run the web search — you have already completed the research
  • Answer from what you have learned — cite Reddit posts, X posts, and web sources
  • If they ask for a prompt — write it using your accumulated research expertise
  • If they have questions — provide answers from the research findings

Only when the user explicitly asks abouta different topicshould you start new research.


Output summary footer (after each prompt delivery)

After each prompt delivery, end with the following:

Full/Partial mode:

---
📚 专精领域:{TOPIC}(面向 {TARGET_TOOL})
📊 基于:{n} 个 Reddit 帖子({sum} 点赞)+ {n} 条 X 发帖({sum} 点赞)+ {n} 个网页

想要另一个提示词?告诉我你下一步想创作什么。

Web-only mode:

---
📚 专精领域:{TOPIC}(面向 {TARGET_TOOL})
📊 基于:来自 {domains} 的 {n} 个网页

想要另一个提示词?告诉我你下一步想创作什么。

💡 解锁 Reddit & X 数据:向 ~/.config/last30days/.env 添加 API 密钥