AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
Python ai-promptsai-skillblueskyclaudeclaude-codeclawhubdeep-researchhackernewsinstagramopenclawpolymarketrecencyredditresearchsocial-mediatiktoktrendstwitterweb-searchyoutube
Fix output order and Reddit extraction
Matt Van Horn664b1cc52dfd
diff --git a/SKILL.md b/SKILL.mdindex 231f4f9e..a60d87ba 100644--- a/SKILL.md+++ b/SKILL.md@@ -109,7 +109,7 @@ Identify from the ACTUAL RESEARCH OUTPUT:## THEN: Show Summary + Invite Vision-**CRITICAL ORDER**: Display sections in this EXACT sequence (insights FIRST, stats LAST):+**CRITICAL ORDER**: Display sections in this EXACT sequence:```---@@ -117,6 +117,16 @@ What I learned:[2-4 sentences synthesizing key insights FROM THE ACTUAL RESEARCH OUTPUT. Quote or paraphrase what the sources said. If sources mention a specific product (ClawdBot, Cursor, etc.), use that name - don't substitute your own knowledge. The synthesis should be traceable back to the research results above.]+---+TARGET TOOL: {tool from research or user input}++KEY PATTERNS I'll use:+1. [Pattern from research]+2. [Pattern from research]+3. [Pattern from research]+4. [Pattern from research]+5. [Pattern from research]+---π Research Complete@@ -126,7 +136,7 @@ Analyzed {total_sources} sources from the last 30 daysββ Top voices: r/{sub1}, r/{sub2}, @{handle1}, @{handle2}----Share your vision for what you want to create and I'll write a thoughtful prompt you can copy-paste directly into {TARGET_TOOL or "your tool of choice"}.+Share your vision for what you want to create and I'll write a thoughtful prompt you can copy-paste directly into {TARGET_TOOL}.```**Use real numbers from the research output.** The patterns should be actual insights from the research, not generic advice.diff --git a/scripts/lib/openai_reddit.py b/scripts/lib/openai_reddit.pyindex f07b027e..52ae76ad 100644--- a/scripts/lib/openai_reddit.py+++ b/scripts/lib/openai_reddit.py@@ -17,28 +17,37 @@ DEPTH_CONFIG = {REDDIT_SEARCH_PROMPT = """Search Reddit for discussions about: {topic}-Focus on threads from the last 30 days. Find {min_items}-{max_items} high-quality, relevant threads.+Use web search to find {min_items}-{max_items} relevant Reddit threads from the last 30 days.-IMPORTANT: Return ONLY valid JSON in this exact format, no other text:+CRITICAL: After searching, you MUST extract information from the Reddit URLs you found and return them as JSON.++For EACH Reddit thread URL you find in your search results, extract:+- The thread title+- The full Reddit URL+- The subreddit name+- Approximate date if visible+- Why it's relevant to "{topic}"++Return ONLY valid JSON in this exact format:{{"items": [{{- "title": "Thread title",- "url": "https://reddit.com/r/...",+ "title": "Actual thread title from Reddit",+ "url": "https://www.reddit.com/r/subreddit/comments/...","subreddit": "subreddit_name","date": "YYYY-MM-DD or null if unknown",- "why_relevant": "Brief explanation of relevance",+ "why_relevant": "Brief explanation of relevance to {topic}","relevance": 0.85}}]}}Rules:+- You MUST include threads from the search results - do NOT return empty items- relevance is 0.0 to 1.0 (1.0 = highly relevant)- date must be YYYY-MM-DD format or null-- Include diverse subreddits if applicable-- Prefer threads with substantive discussions-- Do NOT include engagement metrics (upvotes, comments) - those will be fetched separately"""+- Include threads from diverse subreddits+- Prefer threads with substantive discussions"""def search_reddit(