Commit Graph

285 Commits

Author SHA1 Message Date
Matt Van Horn 0e4df9f38a fix: Clean up final display - no Sources, end with invitation
- Suppress "Sources:" output from WebSearch (redundant noise)
- Reorder: Research Complete stats → What I learned → Share your vision
- Simplified KEY PATTERNS to 3 items
- Clean ending users see while waiting for their input

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 12:38:51 -08:00
Matt Van Horn 85e7b6445c fix: Run WebSearch before script for better working state
Users now see the script's progress display as the "working state"
while waiting, rather than the WebSearch tool call.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 12:32:49 -08:00
Matt Van Horn e926a5aabd fix: Remove redundant Web Agent from banner display
WebSearch shows as visible tool calls, so announcing it in the
banner was redundant. Now only Reddit and X agents are shown
in the initial display.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 12:29:36 -08:00
Matt Van Horn 18696e7b05 fix: Enforce strict 30-day date filtering
Previously Reddit was returning ~60% old content (some from 2022).
This commit adds multiple layers of date enforcement:

- Reddit prompt: Explicit from_date/to_date with "fewer results > older results"
- Hard filter: filter_by_date_range() in normalize.py excludes old content
- WebSearch Date Detective: Extracts dates from URLs (/2026/01/24/) and
  snippets ("January 24, 2026", "3 days ago")
- WebSearch scoring: +10 bonus for verified dates, -20 penalty for unknown

The skill now guarantees only content from the last 30 days.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 12:23:34 -08:00
Matt Van Horn 354e8bad03 docs: Update README with marketing copy
Add new tagline emphasizing AI moves fast and this skill keeps you current.
Replace em-dashes with regular dashes/colons throughout.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 11:57:52 -08:00
Matt Van Horn 407801f8be feat: Add parallel research agents with Judge synthesis
- Deploy 3 agents in parallel: Reddit+X, WebSearch, Backup WebSearch
- Add visual progress indicators (🟠🔵🌐)
- Add Judge Agent to synthesize all sources
- Include web authors in top voices (e.g., "John on Medium")
- Weight Reddit/X higher than WebSearch (engagement signals)

Makes the research feel magical with parallel execution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 10:51:07 -08:00
Matt Van Horn dde996a228 fix: Update SKILL.md to execute WebSearch after script
- Add WebSearch to allowed-tools
- Add --include-web flag to script invocation
- Add WebSearch Execution section with instructions
- Update summary format to include web sources

The skill now instructs Claude to use WebSearch after the
Python script runs, when the WEBSEARCH REQUIRED marker appears.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 10:40:53 -08:00
Matt Van Horn f98a0b9f35 feat: Add WebSearch as third source with zero-config fallback
Add Claude's built-in WebSearch tool as a third research source for
/last30days. This enables the skill to work out of the box with zero
API keys while preserving Reddit/X as the primary sources.

Key changes:
- Add WebSearchItem schema for web results (no engagement metrics)
- Add score_websearch_items() with 55/45 relevance/recency weighting
- Apply -15pt source penalty so WebSearch ranks below Reddit/X
- Add --include-web CLI flag to opt-in to WebSearch
- Return 'web' mode when no API keys configured (zero-config)
- Update render.py with [WEB] source label formatting

When WebSearch is enabled, the script outputs instructions for Claude
to use its built-in WebSearch tool, then synthesize results together.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 10:23:32 -08:00
Matt Van Horn 6d5e4467c2 Reorder examples: Legal first, Dog second, Remotion third
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 10:03:18 -08:00
Matt Van Horn 3c381b9305 Add Codex + Claude Code workflow example
Shows /last30days discovering emerging developer workflows:
- MCP integration pattern for combining Claude Code + Codex
- Review loop workflow (Claude builds → Codex reviews → Claude fixes)
- Actual implementation with claude mcp add command

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 07:41:44 -08:00
Matt Van Horn d9c8968f19 Add 2 new examples: DeepSeek R1 news research, Cursor rules best practices
Stress tested skill with 10 diverse scenarios (all passed):
- Cursor rules files (coding AI tools)
- TypeScript prompting for Claude
- DeepSeek R1 trending topic
- v0 by Vercel
- Stable Diffusion product photography (deep mode)
- Indie games
- MCP servers for Claude Code
- Nano Banana Pro UI mockups
- Mechanical keyboards (quick mode)
- AI music videos with Udio + Runway

New examples demonstrate:
- News/sentiment research (DeepSeek R1)
- Coding AI tool best practices (Cursor)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 07:26:26 -08:00
Matt Van Horn 891307f6c2 Fix xAI API: migrate to Agent Tools API
xAI deprecated search_parameters - now requires Agent Tools API:
- Changed endpoint from /v1/chat/completions to /v1/responses
- Changed from messages array to input array format
- Changed from search_parameters to tools: [{"type": "x_search"}]
- Updated model selection to grok-4-1-fast (required for x_search tool)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:02:43 -08:00
Matt Van Horn a0bcfc9514 Add new examples: rap songs, legal prompting, Suno music
- Updated intro to emphasize prompt research + general discovery
- Added "Best Rap Songs Right Now" example (pure research use case)
- Added "Legal Prompting" example (hallucination prevention patterns)
- Added "Suno AI Music" example with actual MP3 output
- Updated usage examples and tagline

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 19:43:58 -08:00
Matt Van Horn 169720c607 Add dog-as-human example images to README
Shows the viral trend result:
- Original golden retriever with harness and pink tag
- ChatGPT transformation: same hair color, tongue out, harness, tag

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:37:35 -08:00
Matt Van Horn d564e482c9 Add viral dog trend example to README
Shows how /last30days discovers trends you didn't know existed:
- "Dog as human" viral phenomenon (600-900+ upvote threads)
- Renaissance portraits, noir detectives, chibi characters

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:25:25 -08:00
Matt Van Horn 19c44f5502 Add README with Remotion launch video example
Shows the full workflow: research → synthesis → prompt generation
Includes the actual generated prompt for a 50-second launch video

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:14:18 -08:00
Matt Van Horn a552314443 CRITICAL: Enforce using prompt FORMAT from research
If research says "use JSON prompts", the generated prompt MUST be JSON.
Previously the skill would learn about JSON format then ignore it and
write plain prose - defeating the purpose of the research.

- Add PROMPT FORMAT as required field to capture during research
- Add explicit anti-pattern warning about ignoring format
- Update quality checklist to verify format matches research

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:00:34 -08:00
Matt Van Horn 4e871a4f35 Fix spinner spam in non-TTY mode (Claude Code)
- Detect if running in real terminal vs captured output
- In TTY: show animated spinner with carriage returns
- In non-TTY: print simple static messages (no animation)
- Prevents output file from exploding with spinner frames

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:57:33 -08:00
Matt Van Horn 7b3150a69d Add --debug flag for verbose logging
- Add LAST30DAYS_DEBUG env var / --debug flag
- Log HTTP requests, responses, and errors
- Show API error details when debug enabled
- Helps diagnose API failures

Usage: python3 last30days.py "topic" --debug

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:54:31 -08:00
Matt Van Horn 9604d0ba46 Add error handling for X/xAI API calls
- Wrap xAI search in try/except like Reddit
- Show error message but continue with Reddit results
- Parse function checks for API errors before processing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:50:05 -08:00
Matt Van Horn 546f93fe43 Remove caching - always fetch fresh data
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:28:49 -08:00
Matt Van Horn 26e8d53089 Add clear cache indicators to output
- Show " CACHED RESULTS (Xh old)" in compact output header
- Add "use --refresh for fresh data" hint
- Track from_cache and cache_age_hours in Report schema
- Update UI to show cache age in stderr message

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:25:45 -08:00
Matt Van Horn 1e44f9d9b4 Fix Reddit search to return actual discussion threads
- Update prompt to search for "site:reddit.com/r/ {topic}"
- Add explicit filtering for /r/*/comments/* URLs
- Block garbage domains (developers.reddit.com, business.reddit.com)
- Make prompt lenient for older threads when recent ones scarce
- Require returning threads found, never empty items

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:22:52 -08:00
Matt Van Horn 9daf671b82 Add animated progress UI with ASCII art
- New ui.py module with colored output and animations
- Animated spinner during Reddit/X searches
- Progress tracking for enrichment phase [1/N]
- Fun random status messages per phase
- Mini ASCII banner at start
- Completion summary with timing

Makes the research feel more alive while waiting!

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:11:45 -08:00
Matt Van Horn 664b1cc52d Fix output order and Reddit extraction
1. Output order: What I learned → TARGET TOOL → KEY PATTERNS → Research Complete → Share vision
2. Fixed Reddit returning empty results - OpenAI was finding URLs but not extracting content
   - Updated prompt to explicitly require extraction from search results
   - Added "MUST include threads" instruction to prevent empty items

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:02:05 -08:00
Matt Van Horn c9d4320b9b Fix UX: research first, ask about tool after
Previously asked "What tool?" before running research, which was
backwards for exploratory queries like "iOS design mockups".

Now:
- If tool is specified in query, use it
- If tool NOT specified, run research first
- Ask about target tool AFTER showing results (with smarter options based on what research found)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 15:54:23 -08:00
Matt Van Horn e141ff07ea Fix cache loading with Report.from_dict() method
The Report.to_dict() serializes range as {from, to} but constructor
expects range_from/range_to. Added from_dict() classmethod to properly
deserialize cached data, reconstructing all nested objects (Engagement,
Comment, SubScores, RedditItem, XItem).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 15:46:09 -08:00
Matt Van Horn 101c3ad07a Fix synthesis hallucination - ground in actual research content
The skill was finding correct sources (e.g., ClawdBot content) but Claude
was synthesizing based on its pre-existing knowledge (Claude Code skills)
instead of what the research actually said.

Added strong grounding instructions:
- CRITICAL warning to base synthesis on actual research, not pre-existing knowledge
- Anti-pattern example: don't conflate "clawdbot skills" with "Claude Code skills"
- Self-check reminder before displaying summary
- Updated "What I learned" template to emphasize traceability to sources

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 15:40:36 -08:00
Matt Van Horn 40f9dc4877 Fix output order and add Reddit error handling
- SKILL.md: Move "What I learned" BEFORE "Research Complete" stats
- Add error tracking to Report schema (reddit_error, x_error fields)
- Wrap OpenAI API calls in try/catch with clear error messages
- Show explicit error or "no results" messages in compact output
- Fix false positive error detection for null error fields

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 15:26:33 -08:00
Matt Van Horn 72e4f79d65 Reorder: patterns → expert → stats → invitation
Stats near bottom so they're visible in terminal when output finishes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:50:40 -08:00
Matt Van Horn 4f027fe972 Reorder output: stats → patterns → expert → invitation
Show proof of work first:
1. Research stats (upvotes, likes, sources)
2. Key patterns discovered (5 bullet points)
3. "I'm now an expert in X"
4. "Share your vision..."

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:49:20 -08:00
Matt Van Horn f603323ca8 Add --quick and --deep flags for research depth
- quick: 8-12 sources each, faster response
- default: 20-30 sources each (unchanged behavior)
- deep: 50-70 Reddit, 40-60 X for comprehensive research

Adjusts API timeouts based on depth. Cache keys include depth
so different depths are cached separately.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:41:55 -08:00
Matt Van Horn 19d2c41161 Wait for user's vision before writing prompts
- After stats summary, invite user to share what they want to create
- Wait for their response instead of auto-dumping generic prompts
- Write ONE tailored prompt based on their specific vision
- Only provide multiple options if they ask for more
- Stay in expert mode for follow-up requests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:30:19 -08:00
Matt Van Horn c037eea15f Refocus skill on prompt-first output with stats summary
- Parse user intent for TOPIC and TARGET_TOOL upfront
- Ask follow-up if target tool unclear
- Show impressive stats summary after research (upvotes, likes, etc.)
- Primary output is now copy-paste-ready prompts for target tool
- Keep expert context for follow-up custom prompt requests
- Research is internalized, not dumped back at user

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:26:01 -08:00
Matt Van Horn 5ca4829be4 Initial commit: last30days skill
Research topics across Reddit + X from the last 30 days using
OpenAI and xAI APIs. Features:
- Auto model selection (GPT-5.x, Grok-3)
- Popularity-aware scoring (relevance + recency + engagement)
- Reddit thread enrichment with real metrics
- Near-duplicate detection
- Multiple emit modes (compact, json, context, path)
- 24h caching with --refresh bypass
- NUX for API key setup
- 87 passing unit tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 12:37:31 -08:00