Commit Graph

111 Commits

Author SHA1 Message Date
Matt Van Horn 444bd6e185 feat(bird): add installation and status functions 2026-02-03 10:57:57 -08:00
Matt Van Horn a7fb951257 feat(bird): add detection functions for Bird CLI
- is_bird_installed() checks if bird command is in PATH
- is_bird_authenticated() runs bird whoami to verify auth
- check_npm_available() checks if npm can install bird

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 10:57:26 -08:00
Matt Van Horn 8ae00ea214 docs: Add Bird CLI implementation plan
12-task implementation plan for integrating Bird CLI as free X/Twitter
search alternative. Includes detection, interactive install, search
dispatch, and main flow integration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 10:53:03 -08:00
Matt Van Horn 950810be92 docs: Add Bird CLI integration design
Adds design doc for integrating Bird CLI as an alternative X/Twitter
search source. Bird uses browser cookies (free, no API key) and
provides direct GraphQL access to X.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 10:50:59 -08:00
Matt Van Horn cc892d736b revert: restore original argument-hint format (testing) 2026-01-28 13:43:10 -08:00
Matt Van Horn 6cc7dad86e fix: YAML frontmatter and GPT-5 model fallback
- Fix invalid YAML in SKILL.md argument-hint (closes #8)
  Wrapped value in single quotes to properly escape double quotes

- Add automatic model fallback for GPT-5 access errors (closes #9)
  When OpenAI returns 400 for unverified orgs, retry with gpt-4o

- Add tests for model fallback logic

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:07:33 -08:00
Matt Van Horn 3a4a727f4b Run Reddit and X searches in parallel, fix timeout handling
- Refactor run_research() to use ThreadPoolExecutor for parallel execution
- Reddit timeout/crash no longer blocks X search from running
- Add catch for ConnectionResetError/OSError in http.py
- Per-item error handling in Reddit enrichment (one failure doesn't crash all)
- Increase API timeouts from 60/90/120 to 90/120/180 seconds
- Add ClawdBot setup example to README

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:33:41 -08:00
Matt Van Horn 86422a74af feat: Add honesty warning when results aren't from last 30 days
Adds ⚠️ LIMITED RECENT DATA warning when:
- Fewer than 5 items are confirmed from the date range
- Tells Claude to be transparent with user about data freshness

Example output for obscure topic (June Oven):
"Only 4 item(s) confirmed from 2025-12-26 to 2026-01-25.
Results below may include older/evergreen content."

Popular topics (clawdbot, nano banana) don't show the warning.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:00:53 -08:00
Matt Van Horn e1d3570667 feat: Add automatic retry with simpler query for sparse Reddit results
If initial search returns <5 threads, extract core subject and retry:
- "best nano banana prompting practices" → retry with "nano banana"
- Combines results from both searches, deduped by URL

Note: OpenAI's web_search still tends to find old content. This retry
helps cast a wider net but doesn't fully solve the recency issue.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 10:44:29 -08:00
Matt Van Horn 2d43571875 fix: Simplify Reddit prompt and increase search volume
OpenAI's web_search doesn't reliably find recent Reddit content.
Strategy change: request MORE threads and let server-side date
filtering handle it.

Changes:
- Increased depth config (20-30 → 30-50 default)
- Simplified prompt to search broadly and include all matches
- Let server-side date filter remove old content
- Removed aggressive pre-filtering that was limiting results

Tradeoff: Some topics have more X coverage than Reddit due to
web_search limitations. This is acceptable.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 10:35:14 -08:00
Matt Van Horn acd7a533c0 fix: Emphasize recency in Reddit search to find recent threads
The model was finding old threads (Nov-Dec 2025) that got filtered out,
leaving 0 results even for popular topics like "nano banana prompts".

Changes:
- Add explicit date filters: "after:{from_date}" and "2026"/"January 2026"
- Emphasize RECENT content is critical, old threads are filtered anyway
- Tell model to verify dates before including threads

Before: 0-2 Reddit threads for "nano banana prompting practices"
After: 16 Reddit threads from January 2026

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 10:15:43 -08:00
Matt Van Horn b77d821f8d docs: Add Top Claude Code Skills example to README
Shows /last30days as a discovery tool for finding popular resources
in rapidly evolving ecosystems - ranked by community engagement.

Includes Remotion (17.3K likes), SkillsMP marketplace, Superpowers,
and Trail of Bits security skills.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:50:40 -08:00
Matt Van Horn 66d7b87049 docs: Add ClawdBot use cases example to README
Shows /last30days as a product research tool - discovering real-world
use cases with engagement metrics from r/LocalLLaMA, r/selfhosted, and
X posts from @steipete, @danpeguine, @dreetje.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:48:35 -08:00
Matt Van Horn 7dc3e7b716 fix: Improve Reddit search prompt to find actual discussions
- Add EXTRACT CORE KEYWORDS step to search for main subject, not full phrase
  ("killer features of clawdbot" → search "clawdbot")
- Remove hardcoded subreddit list that biased results toward design/dev subs
- Simplify search strategies and URL validation rules
- Make prompt more concise - GPT-5.2 responds better to clearer instructions

Before: 0 threads found for "killer features of clawdbot"
After: 7 threads found including r/LocalLLaMA (43pts), r/selfhosted (26pts)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:42:31 -08:00
Matt Van Horn 6fbfbb9ccc feat: Add web-only fallback mode with API key promo
- Skill now works without any API keys using WebSearch fallback
- Shows promo banner marketing Reddit/X data when keys are missing
- Partial mode (one key) shows shorter tip for the missing source
- Updated SKILL.md to document three modes: Full, Partial, Web-Only
- Added get_missing_keys() to env.py for promo logic
- Added show_promo(), start_web_only(), show_web_only_complete() to ui.py
- Updated render_compact() to include inline promo for web-only mode

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:32:24 -08:00
Matt Van Horn 6831e624b8 docs: Add photorealistic aging portrait example
Shows multi-panel consistency for photorealistic people:
- JSON structure with face preservation
- Same person at ages 10, 20, 40, 80
- Heterochromia + freckles maintained across panels
- Real generated result

Also added to SKILL.md intro examples.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 16:28:15 -08:00
Matt Van Horn 7f1ab7a2e9 fix: Remove duplicate stats display from Judge section
Stats were showing twice - once in Judge section, once at end.
Now Judge section just synthesizes internally, stats only appear
at the end right before invitation.

Order: What I learned -> Stats -> Share your vision

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 16:22:55 -08:00
Matt Van Horn 2192743c74 docs: Add iOS app mockup example (SwimMom for Nano Banana Pro)
Shows JSON-structured prompting for UI mockups:
- Layer-based structure (frame -> layout -> content)
- iOS 18 design system references
- 8pt grid and element limits
- Real generated mockup result

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 16:14:56 -08:00
Matt Van Horn 60c663697e fix: Reorder output - stats right before invitation
New order:
1. What I learned / KEY PATTERNS (or Most mentioned)
2. Stats (All agents reported back!)
3. Share your vision (last)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 16:09:52 -08:00
Matt Van Horn bcb1c7d71b feat: Reorder use cases - Prompting first, rename HOW-TO to PROMPTING
Prompting is the primary use case, so it should be first:
1. Prompting - "Midjourney prompts", "ChatGPT image generation"
2. Recommendations - "best Claude Code skills", "top AI tools"
3. News - "what's happening with OpenAI"
4. General - any topic

Also renamed HOW-TO query type to PROMPTING for clarity.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 16:07:35 -08:00
Matt Van Horn c8504d3b30 fix: Use user's exact terminology, don't add outdated tech names
Claude was "helpfully" adding DALL-E, GPT-4o to searches when user
asked about "ChatGPT image prompting". This uses outdated knowledge.

Now explicitly instructs: use the user's exact terminology, don't
substitute or add tech names. Trust the user knows what they're
asking about.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 15:05:45 -08:00
Matt Van Horn 6577da0b14 feat: More emojis and bring back Judge Agent in display
Updated research banner:
- Added Judge Agent: "Standing by to synthesize..."
- Better emoji descriptions: "Scanning for gold", "Catching latest takes"

Updated completion display:
- "All agents reported back!"
- "Judge Agent: Weighing the evidence..."
- Emojis on the Judge's evaluation criteria

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 15:03:41 -08:00
Matt Van Horn 6a7c29010d fix: Answer follow-up questions from research, don't re-search
After research is complete, Claude is an expert. Follow-up questions
should be answered from the research findings, not trigger new
WebSearches. Only do new research for a different topic.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 15:01:35 -08:00
Matt Van Horn b6cdbc9058 fix: Display research banner before background script starts
Since script runs in background, users don't see its live output.
Now Claude displays the fancy emoji banner immediately before
starting the background script.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 15:00:30 -08:00
Matt Van Horn 5f8623f129 feat: Smart query detection for better research results
Added QUERY_TYPE detection:
- RECOMMENDATIONS ("best X") → searches for lists, extracts specific names
- NEWS → searches for current events
- HOW-TO → searches for tutorials
- GENERAL → broad topic research

For RECOMMENDATIONS queries, synthesis now extracts specific entity names
with mention counts instead of generic patterns.

Example: "best Claude Code skills" now returns:
  "Most mentioned: /commit (5x), remotion (4x), git-worktree (3x)"
Instead of:
  "Skills are good. Keep them under 500 lines."

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 13:23:31 -08:00
Matt Van Horn 68420ca1e2 fix: Run Reddit/X script in background for parallel execution
Start the script first with run_in_background:true, then do WebSearch.
Both run in parallel so users see the script's progress display while
WebSearch also fetches results.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 12:48:07 -08:00
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