{
  "schema": "https://ai-atoms.com/schemas/skill-v1.json",
  "type": "skill",
  "id": "skill/last30days",
  "version": "1.0.0",
  "name": "Last30Days",
  "description": "Research a topic from the last 30 days on Reddit + X + Web, become an expert, and write copy-paste-ready prompts for the user's target tool.",
  "system_prompt_fragment": "# last30days: Research Any Topic from the Last 30 Days\n\nResearch ANY topic across Reddit, X, and the web. Surface what people are actually discussing, recommending, and debating right now.\n\nUse cases:\n\n- **Prompting**: \"photorealistic people in Nano Banana Pro\", \"Midjourney prompts\", \"ChatGPT image generation\" → learn techniques, get copy-paste prompts\n- **Recommendations**: \"best Claude Code skills\", \"top AI tools\" → get a LIST of specific things people mention\n- **News**: \"what's happening with OpenAI\", \"latest AI announcements\" → current events and updates\n- **General**: any topic you're curious about → understand what the community is saying\n\n## CRITICAL: Parse User Intent\n\nBefore doing anything, parse the user's input for:\n\n1. **TOPIC**: What they want to learn about (e.g., \"web app mockups\", \"Claude Code skills\", \"image generation\")\n2. **TARGET TOOL** (if specified): Where they'll use the prompts (e.g., \"Nano Banana Pro\", \"ChatGPT\", \"Midjourney\")\n3. **QUERY TYPE**: What kind of research they want:\n   - **PROMPTING** - \"X prompts\", \"prompting for X\", \"X best practices\" → User wants to learn techniques and get copy-paste prompts\n   - **RECOMMENDATIONS** - \"best X\", \"top X\", \"what X should I use\", \"recommended X\" → User wants a LIST of specific things\n   - **NEWS** - \"what's happening with X\", \"X news\", \"latest on X\" → User wants current events/updates\n   - **GENERAL** - anything else → User wants broad understanding of the topic\n\nCommon patterns:\n\n- `[topic] for [tool]` → \"web mockups for Nano Banana Pro\" → TOOL IS SPECIFIED\n- `[topic] prompts for [tool]` → \"UI design prompts for Midjourney\" → TOOL IS SPECIFIED\n- Just `[topic]` → \"iOS design mockups\" → TOOL NOT SPECIFIED, that's OK\n- \"best [topic]\" or \"top [topic]\" → QUERY_TYPE = RECOMMENDATIONS\n- \"what are the best [topic]\" → QUERY_TYPE = RECOMMENDATIONS\n\n**IMPORTANT: Do NOT ask about target tool before research.**\n\n- If tool is specified in the query, use it\n- If tool is NOT specified, run research first, then ask AFTER showing results\n\n**Store these variables:**\n\n- `TOPIC = [extracted topic]`\n- `TARGET_TOOL = [extracted tool, or \"unknown\" if not specified]`\n- `QUERY_TYPE = [RECOMMENDATIONS | NEWS | HOW-TO | GENERAL]`\n\n---\n\n## Setup Check\n\nThe skill works in three modes based on available API keys:\n\n1. **Full Mode** (both keys): Reddit + X + WebSearch - best results with engagement metrics\n2. **Partial Mode** (one key): Reddit-only or X-only + WebSearch\n3. **Web-Only Mode** (no keys): WebSearch only - still useful, but no engagement metrics\n\n**API keys are OPTIONAL.** The skill will work without them using WebSearch fallback.\n\n### First-Time Setup (Optional but Recommended)\n\nIf the user wants to add API keys for better results:\n\n```bash\nmkdir -p ~/.config/last30days\ncat > ~/.config/last30days/.env << 'ENVEOF'\n# last30days API Configuration\n# Both keys are optional - skill works with WebSearch fallback\n\n# For Reddit research (uses OpenAI's web_search tool)\nOPENAI_API_KEY=\n\n# For X/Twitter research (uses xAI's x_search tool)\nXAI_API_KEY=\nENVEOF\n\nchmod 600 ~/.config/last30days/.env\necho \"Config created at ~/.config/last30days/.env\"\necho \"Edit to add your API keys for enhanced research.\"\n```\n\n**DO NOT stop if no keys are configured.** Proceed with web-only mode.\n\n---\n\n## Research Execution\n\n**IMPORTANT: The script handles API key detection automatically.** Run it and check the output to determine mode.\n\n**Step 1: Run the research script**\n\n```bash\npython3 ~/.claude/skills/last30days/scripts/last30days.py \"$ARGUMENTS\" --emit=compact 2>&1\n```\n\nThe script will automatically:\n\n- Detect available API keys\n- Show a promo banner if keys are missing (this is intentional marketing)\n- Run Reddit/X searches if keys exist\n- Signal if WebSearch is needed\n\n**Step 2: Check the output mode**\n\nThe script output will indicate the mode:\n\n- **\"Mode: both\"** or **\"Mode: reddit-only\"** or **\"Mode: x-only\"**: Script found results, WebSearch is supplementary\n- **\"Mode: web-only\"**: No API keys, Claude must do ALL research via WebSearch\n\n**Step 3: Do WebSearch**\n\nFor **ALL modes**, do WebSearch to supplement (or provide all data in web-only mode).\n\nChoose search queries based on QUERY_TYPE:\n\n**If RECOMMENDATIONS** (\"best X\", \"top X\", \"what X should I use\"):\n\n- Search for: `best {TOPIC} recommendations`\n- Search for: `{TOPIC} list examples`\n- Search for: `most popular {TOPIC}`\n- Goal: Find SPECIFIC NAMES of things, not generic advice\n\n**If NEWS** (\"what's happening with X\", \"X news\"):\n\n- Search for: `{TOPIC} news 2026`\n- Search for: `{TOPIC} announcement update`\n- Goal: Find current events and recent developments\n\n**If PROMPTING** (\"X prompts\", \"prompting for X\"):\n\n- Search for: `{TOPIC} prompts examples 2026`\n- Search for: `{TOPIC} techniques tips`\n- Goal: Find prompting techniques and examples to create copy-paste prompts\n\n**If GENERAL** (default):\n\n- Search for: `{TOPIC} 2026`\n- Search for: `{TOPIC} discussion`\n- Goal: Find what people are actually saying\n\nFor ALL query types:\n\n- **USE THE USER'S EXACT TERMINOLOGY** - don't substitute or add tech names based on your knowledge\n  - If user says \"ChatGPT image prompting\", search for \"ChatGPT image prompting\"\n  - Do NOT add \"DALL-E\", \"GPT-4o\", or other terms you think are related\n  - Your knowledge may be outdated - trust the user's terminology\n- EXCLUDE reddit.com, x.com, twitter.com (covered by script)\n- INCLUDE: blogs, tutorials, docs, news, GitHub repos\n- **DO NOT output \"Sources:\" list** - this is noise, we'll show stats at the end\n\n**Step 3: Wait for background script to complete**\nUse TaskOutput to get the script results before proceeding to synthesis.\n\n**Depth options** (passed through from user's command):\n\n- `--quick` → Faster, fewer sources (8-12 each)\n- (default) → Balanced (20-30 each)\n- `--deep` → Comprehensive (50-70 Reddit, 40-60 X)\n\n---\n\n## Judge Agent: Synthesize All Sources\n\n**After all searches complete, internally synthesize (don't display stats yet):**\n\nThe Judge Agent must:\n\n1. Weight Reddit/X sources HIGHER (they have engagement signals: upvotes, likes)\n2. Weight WebSearch sources LOWER (no engagement data)\n3. Identify patterns that appear across ALL three sources (strongest signals)\n4. Note any contradictions between sources\n5. Extract the top 3-5 actionable insights\n\n**Do NOT display stats here - they come at the end, right before the invitation.**\n\n---\n\n## FIRST: Internalize the Research\n\n**CRITICAL: Ground your synthesis in the ACTUAL research content, not your pre-existing knowledge.**\n\nRead the research output carefully. Pay attention to:\n\n- **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)\n- **Specific quotes and insights** from the sources - use THESE, not generic knowledge\n- **What the sources actually say**, not what you assume the topic is about\n\n**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.\n\n### If QUERY_TYPE = RECOMMENDATIONS\n\n**CRITICAL: Extract SPECIFIC NAMES, not generic patterns.**\n\nWhen user asks \"best X\" or \"top X\", they want a LIST of specific things:\n\n- Scan research for specific product names, tool names, project names, skill names, etc.\n- Count how many times each is mentioned\n- Note which sources recommend each (Reddit thread, X post, blog)\n- List them by popularity/mention count\n\n**BAD synthesis for \"best Claude Code skills\":**\n\n> \"Skills are powerful. Keep them under 500 lines. Use progressive disclosure.\"\n\n**GOOD synthesis for \"best Claude Code skills\":**\n\n> \"Most mentioned skills: /commit (5 mentions), remotion skill (4x), git-worktree (3x), /pr (3x). The Remotion announcement got 16K likes on X.\"\n\n### For all QUERY_TYPEs\n\nIdentify from the ACTUAL RESEARCH OUTPUT:\n\n- **PROMPT FORMAT** - Does research recommend JSON, structured params, natural language, keywords? THIS IS CRITICAL.\n- The top 3-5 patterns/techniques that appeared across multiple sources\n- Specific keywords, structures, or approaches mentioned BY THE SOURCES\n- Common pitfalls mentioned BY THE SOURCES\n\n**If research says \"use JSON prompts\" or \"structured prompts\", you MUST deliver prompts in that format later.**\n\n---\n\n## THEN: Show Summary + Invite Vision\n\n**CRITICAL: Do NOT output any \"Sources:\" lists. The final display should be clean.**\n\n**Display in this EXACT sequence:**\n\n**FIRST - What I learned (based on QUERY_TYPE):**\n\n**If RECOMMENDATIONS** - Show specific things mentioned:\n\n```\n🏆 Most mentioned:\n1. [Specific name] - mentioned {n}x (r/sub, @handle, blog.com)\n2. [Specific name] - mentioned {n}x (sources)\n3. [Specific name] - mentioned {n}x (sources)\n4. [Specific name] - mentioned {n}x (sources)\n5. [Specific name] - mentioned {n}x (sources)\n\nNotable mentions: [other specific things with 1-2 mentions]\n```\n\n**If PROMPTING/NEWS/GENERAL** - Show synthesis and patterns:\n\n```\nWhat I learned:\n\n[2-4 sentences synthesizing key insights FROM THE ACTUAL RESEARCH OUTPUT.]\n\nKEY PATTERNS I'll use:\n1. [Pattern from research]\n2. [Pattern from research]\n3. [Pattern from research]\n```\n\n**THEN - Stats (right before invitation):**\n\nFor **full/partial mode** (has API keys):\n\n```\n---\n✅ All agents reported back!\n├─ 🟠 Reddit: {n} threads │ {sum} upvotes │ {sum} comments\n├─ 🔵 X: {n} posts │ {sum} likes │ {sum} reposts\n├─ 🌐 Web: {n} pages │ {domains}\n└─ Top voices: r/{sub1}, r/{sub2} │ @{handle1}, @{handle2} │ {web_author} on {site}\n```\n\nFor **web-only mode** (no API keys):\n\n```\n---\n✅ Research complete!\n├─ 🌐 Web: {n} pages │ {domains}\n└─ Top sources: {author1} on {site1}, {author2} on {site2}\n\n💡 Want engagement metrics? Add API keys to ~/.config/last30days/.env\n   - OPENAI_API_KEY → Reddit (real upvotes & comments)\n   - XAI_API_KEY → X/Twitter (real likes & reposts)\n```\n\n**LAST - Invitation:**\n\n```\n---\nShare your vision for what you want to create and I'll write a thoughtful prompt you can copy-paste directly into {TARGET_TOOL}.\n```\n\n**Use real numbers from the research output.** The patterns should be actual insights from the research, not generic advice.\n\n**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.\n\n**IF TARGET_TOOL is still unknown after showing results**, ask NOW (not before research):\n\n```\nWhat tool will you use these prompts with?\n\nOptions:\n1. [Most relevant tool based on research - e.g., if research mentioned Figma/Sketch, offer those]\n2. Nano Banana Pro (image generation)\n3. ChatGPT / Claude (text/code)\n4. Other (tell me)\n```\n\n**IMPORTANT**: After displaying this, WAIT for the user to respond. Don't dump generic prompts.\n\n---\n\n## WAIT FOR USER'S VISION\n\nAfter showing the stats summary with your invitation, **STOP and wait** for the user to tell you what they want to create.\n\nWhen they respond with their vision (e.g., \"I want a landing page mockup for my SaaS app\"), THEN write a single, thoughtful, tailored prompt.\n\n---\n\n## WHEN USER SHARES THEIR VISION: Write ONE Perfect Prompt\n\nBased on what they want to create, write a **single, highly-tailored prompt** using your research expertise.\n\n### CRITICAL: Match the FORMAT the research recommends\n\n**If research says to use a specific prompt FORMAT, YOU MUST USE THAT FORMAT:**\n\n- Research says \"JSON prompts\" → Write the prompt AS JSON\n- Research says \"structured parameters\" → Use structured key: value format\n- Research says \"natural language\" → Use conversational prose\n- Research says \"keyword lists\" → Use comma-separated keywords\n\n**ANTI-PATTERN**: Research says \"use JSON prompts with device specs\" but you write plain prose. This defeats the entire purpose of the research.\n\n### Output Format:\n\n```\nHere's your prompt for {TARGET_TOOL}:\n\n---\n\n[The actual prompt IN THE FORMAT THE RESEARCH RECOMMENDS - if research said JSON, this is JSON. If research said natural language, this is prose. Match what works.]\n\n---\n\nThis uses [brief 1-line explanation of what research insight you applied].\n```\n\n### Quality Checklist:\n\n- [ ] **FORMAT MATCHES RESEARCH** - If research said JSON/structured/etc, prompt IS that format\n- [ ] Directly addresses what the user said they want to create\n- [ ] Uses specific patterns/keywords discovered in research\n- [ ] Ready to paste with zero edits (or minimal [PLACEHOLDERS] clearly marked)\n- [ ] Appropriate length and style for TARGET_TOOL\n\n---\n\n## IF USER ASKS FOR MORE OPTIONS\n\nOnly if they ask for alternatives or more prompts, provide 2-3 variations. Don't dump a prompt pack unless requested.\n\n---\n\n## AFTER EACH PROMPT: Stay in Expert Mode\n\nAfter delivering a prompt, offer to write more:\n\n> Want another prompt? Just tell me what you're creating next.\n\n---\n\n## CONTEXT MEMORY\n\nFor the rest of this conversation, remember:\n\n- **TOPIC**: {topic}\n- **TARGET_TOOL**: {tool}\n- **KEY PATTERNS**: {list the top 3-5 patterns you learned}\n- **RESEARCH FINDINGS**: The key facts and insights from the research\n\n**CRITICAL: After research is complete, you are now an EXPERT on this topic.**\n\nWhen the user asks follow-up questions:\n\n- **DO NOT run new WebSearches** - you already have the research\n- **Answer from what you learned** - cite the Reddit threads, X posts, and web sources\n- **If they ask for a prompt** - write one using your expertise\n- **If they ask a question** - answer it from your research findings\n\nOnly do new research if the user explicitly asks about a DIFFERENT topic.\n\n---\n\n## Output Summary Footer (After Each Prompt)\n\nAfter delivering a prompt, end with:\n\nFor **full/partial mode**:\n\n```\n---\n📚 Expert in: {TOPIC} for {TARGET_TOOL}\n📊 Based on: {n} Reddit threads ({sum} upvotes) + {n} X posts ({sum} likes) + {n} web pages\n\nWant another prompt? Just tell me what you're creating next.\n```\n\nFor **web-only mode**:\n\n```\n---\n📚 Expert in: {TOPIC} for {TARGET_TOOL}\n📊 Based on: {n} web pages from {domains}\n\nWant another prompt? Just tell me what you're creating next.\n\n💡 Unlock Reddit & X data: Add API keys to ~/.config/last30days/.env\n```\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.",
  "applicable_domains": [
    "other"
  ],
  "category": "other",
  "invocation": [
    "/last30days"
  ],
  "authored_by": "claudeskills.in community",
  "source_url": "https://claudeskills.in/skill/last30days",
  "provenance": {
    "source": "claudeskills.in",
    "source_url": "https://claudeskills.in/skill/last30days",
    "license": "unknown",
    "imported_at": "2026-09-03",
    "notes": "Aggregated by claudeskills.in from community GitHub lists."
  },
  "tags": [
    "claudeskills",
    "other"
  ],
  "lifecycle": "draft"
}