domains / research / last-30-days-topic-research / last30days
Both copies implement the same last30days research workflow (parse intent, run a Python research script, then WebSearch, then synthesize), but they disagree on execution mode and include material steps the other lacks. The sickn33 copy uses a background script with TaskOutput and a setup-check/config section, while the LeoYeAI copy mandates a foreground 5-minute run, adds YouTube as a source, requires displaying parsed intent before tool calls, and includes a skill-root discovery loop. Crowning one would hide a real alternative procedure.
| Repository | Path |
|---|---|
| sickn33/agentic-awesome-skills | plugins/agentic-awesome-skills-claude/skills/last30days/SKILL.md |
| LeoYeAI/openclaw-master-skills | skills/last30days-skill/SKILL.md |
| Role | Repository | Path |
|---|---|---|
| peer | sickn33/agentic-awesome-skills | plugins/agentic-awesome-skills-claude/skills/last30days/SKILL.md |
| peer | LeoYeAI/openclaw-master-skills | skills/last30days-skill/SKILL.md |
| adapter | sickn33/agentic-awesome-skills | skills/last30days/SKILL.md |
| adapter | LeoYeAI/openclaw-master-skills | skills/last30days/SKILL.md |
---
name: last30days
description: "Research a topic from the last 30 days on Reddit + X + YouTube + Web, become an expert, and write copy-paste-ready prompts for the user's target tool."
---
# last30days: 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")
2. **TARGET TOOL** (if specified): Where they'll use the prompts (e.g., "Nano Banana Pro", "ChatGPT", "Midjourney")
3. **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
- `[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
**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 | GENERAL]`
**DISPLAY your parsing to the user.** Before running any tools, output:
```
I'll research {TOPIC} across Reddit, X, YouTube, and the web to find what's been discussed in the last 30 days.
Parsed intent:
- TOPIC = {TOPIC}
- TARGET_TOOL = {TARGET_TOOL or "unknown"}
- QUERY_TYPE = {QUERY_TYPE}
Research typically takes 2-8 minutes (niche topics take longer). Starting now.
```
If TARGET_TOOL is known, mention it in the intro: "...to find {QUERY_TYPE}-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.
---
## Setup Check
The skill works in three modes based on available API keys:
1. **Full Mode** (both keys): Reddit + X + YouTube + WebSearch - best results with engagement metrics
2. **Partial Mode** (one key): Reddit-only or X-only + YouTube + WebSearch
3. **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:
```bash
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 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 (FOREGROUND — do NOT background this)**
**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.**
```bash
# Find skill root — works in repo checkout, Claude Code, or Codex install
for dir in \
"." \
"${CLAUDE_PLUGIN_ROOT:-}" \
"$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 "ERROR: Could not find scripts/last30days.py" >&2
exit 1
fi
TOPIC_FILE="$(mktemp)"
trap 'rm -f "$TOPIC_FILE"' EXIT
cat <<'LAST30DAYS_TOPIC' > "$TOPIC_FILE"
$ARGUMENTS
LAST30DAYS_TOPIC
python3 "${SKILL_ROOT}/scripts/last30days.py" "$(cat "$TOPIC_FILE")" --emit=compact
```
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 if keys exist
- Output ALL results including YouTube transcripts
- Signal if WebSearch is needed
**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: 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: `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
- 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
---
## Conflicts
- **sickn33/agentic-awesome-skills::plugins/agentic-awesome-skills-claude/skills/last30days/SKILL.md** runs the script in the background and says to use TaskOutput to wait for completion; **LeoYeAI/openclaw-master-skills::skills/last30days-skill/SKILL.md** says to run the script in the FOREGROUND with a 5-minute timeout and explicitly forbids run_in_background.
- **sickn33/agentic-awesome-skills::plugins/agentic-awesome-skills-claude/skills/last30days/SKILL.md** lists sources as Reddit + X + Web; **LeoYeAI/openclaw-master-skills::skills/last30days-skill/SKILL.md** lists sources as Reddit, X, YouTube, and web, and requires reading the YouTube section of the script output.
- **sickn33/agentic-awesome-skills::plugins/agentic-awesome-skills-claude/skills/last30days/SKILL.md** includes a Setup Check section with an optional ~/.config/last30days/.env creation step; **LeoYeAI/openclaw-master-skills::skills/last30days-skill/SKILL.md** has no such setup section and instead declares required env/bins in metadata.
- **LeoYeAI/openclaw-master-skills::skills/last30days-skill/SKILL.md** requires displaying the parsed intent to the user before calling any tools; **sickn33/agentic-awesome-skills::plugins/agentic-awesome-skills-claude/skills/last30days/SKILL.md** does not include this display step.
- **LeoYeAI/openclaw-master-skills::skills/last30days-skill/SKILL.md** includes a skill-root discovery loop to locate scripts/last30days.py; **sickn33/agentic-awesome-skills::plugins/agentic-awesome-skills-claude/skills/last30days/SKILL.md** hardcodes ~/.claude/skills/last30days/scripts/last30days.py.