YouTube search and transcript extraction runs automatically when yt-dlp
is installed. Searches for topic videos from the last N days, fetches
auto-generated transcripts for top results, and feeds them through the
same scoring pipeline (relevance + recency + engagement) as Reddit/X.
New files:
- youtube_yt.py: search, transcript extraction, VTT cleanup
Modified files:
- schema.py: YouTubeItem dataclass, updated Report
- normalize.py: normalize_youtube_items()
- score.py: YouTube engagement scoring (views-dominated)
- dedupe.py: YouTube deduplication
- render.py: YouTube section in compact output
- env.py: is_ytdlp_available() check
- ui.py: YouTube progress messages
- last30days.py: _search_youtube(), parallel execution with Reddit/X
- SKILL.md: YouTube in stats box, citation priority
- README.md: YouTube docs, yt-dlp requirement, Peter shoutout
Inspired by Peter Steinberger's yt-dlp + summarize toolchain approach.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Vendor Bird's Twitter GraphQL search client directly into /last30days,
eliminating the dependency on `npm install -g @steipete/bird`. X search
now works out of the box with just Node.js 22+ and browser cookies.
- Add vendored bird-search.mjs wrapper (search-only subset of Bird v0.8.0)
- Vendor @steipete/sweet-cookie for browser cookie extraction
- Update bird_x.py to call vendored Node.js module instead of `bird` binary
- Update README.md and SKILL.md for v2.1 (remove Bird CLI install steps)
- Include Bird's MIT LICENSE in vendor directory
The fallback chain is: vendored search -> xAI API key -> web-only mode.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
"Research typically takes 2-8 minutes (niche topics take longer)."
Shown right after parsed intent, before research starts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace generic "[topic]" and --days=7 with concrete examples that
show the range: prompting, news, recommendations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Every invitation now includes 2-3 specific examples based on what the
research actually found. PROMPTING mode explicitly offers to write prompts
with creative examples. NEWS suggests follow-up questions about the
biggest stories. GENERAL suggests specific deep-dives and applications.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GENERAL mode said "write a prompt for it" which sounds weird for people/topics
("write a prompt for Kanye West"). Changed to "describe what you're working on
and I'll help." Added "I'm now an expert on {TOPIC}" prefix to all 4 modes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Invitation adapts to QUERY_TYPE: NEWS gets "ask me anything",
PROMPTING gets "share your vision", RECOMMENDATIONS gets "compare options"
- Follow-up handler reads intent: questions get answers, not forced prompts
- Restored V1's "if they ask a question, answer it" context memory line
- URL formatting rule: "per Rolling Stone" not raw URLs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add citation priority rule: @handles > r/subreddits > web sources
- Fix examples: "per @honest30bgfan_" instead of "per Rolling Stone"
- Add "lead with people, not publications" instruction
- Stats box: web now shows "(supplementary)" instead of domain list
- No changes to actual research — same quality, better attribution framing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add .claude-plugin/marketplace.json and plugin.json manifests
- Use ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/skills/last30days} for script path
- Plugin install: uses CLAUDE_PLUGIN_ROOT when set
- Manual install: falls back to ~/.claude/skills/last30days (no breakage)
- SKILL.md stays at root, plugin.json points skills to "./"
Users can now install via:
claude plugin marketplace add mvanhorn/last30days-skill
claude plugin install last30days@last30days
Inspired by PR #1 (galligan) — lighter approach without repo restructure.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
User preferred V1's "I'll research X across Reddit, X, and the web..."
with explicit Parsed intent block over V2's emoji format.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Feature audit found 11 things v2 dropped from v1. Restored the 7 that affect
output quality: quality checklist for prompts, anti-pattern examples, self-check
instruction, "don't re-search" context memory, prompt format anti-pattern,
multi-prompt guidance, and emoji footer with engagement counts.
Also adds visible query parsing display (🔍 **{TOPIC}** · {QUERY_TYPE}) and
the full v1-vs-v2 comparison test plan with all 17 test queries from README.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The old v1 skill worked because context: fork was SILENTLY IGNORED
due to Claude Code bug #17283. The skill ran inline in the main
conversation. Claude Code 2.1+ fixed the bug and now properly
honors fork mode, creating an isolated subagent that ignores all
instruction ordering (text output, bash-first, etc.).
Fix: remove context: fork so the skill runs inline again, matching
the behavior the user knows works. Also restored v1-style
instruction flow: parse intent first, then run script, then WebSearch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The agent in fork mode ignores text output instructions and jumps
straight to WebSearch. Reverted to the original "YOUR FIRST ACTION:
Run this command. EXECUTE." pattern that actually worked. Embedded
progress display as echo statements inside the bash command so they
can't be skipped. The agent was not running the Python script at all
when the first instruction was about text output.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The agent was skipping the progress text because it was buried after
parsing logic at line 41. Restructured so the FIRST section is
"YOUR FIRST OUTPUT" with the progress block, BEFORE any tool call
instructions. Added explicit "DO NOT skip this" enforcement.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The ui.py spinner/color output goes to stderr which Claude Code
buffers invisibly. Instead, have the agent output a visible progress
block with emoji showing Reddit/X/Web agents deploying.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add back the brief topic acknowledgment ("Researching X — searching
Reddit for upvotes...") and descriptive intro that the v1 skill had.
The v2 version was jumping straight into script execution with no
user-facing feedback about what was being researched.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Stats: replace BAD/GOOD examples with strict fill-in-the-blank template
- Reddit: add subreddit-targeted fallback search, soften scoring penalties
(engagement -10→-3, date confidence -10→-5), add minimum result guarantee
- Citations: limit to 1 per insight, short format, no engagement metrics
- Summary: add bold topic headers template for structured paragraphs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Reverted description to original public repo copy
- Restored H1 heading, moved imperative instruction to bold paragraph
- Added BAD/GOOD examples enforcing emoji tree stats format
- Required @handle and r/subreddit citation in ALL summary types
- Removed agent:Explore and disable-model-invocation from frontmatter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Explore agent was treating SKILL.md as documentation to summarize
instead of instructions to follow. Removed agent:Explore from frontmatter
and restructured opening to immediately command script execution.
Also adds release plan for Bird CLI v2.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wrap value in single quotes to properly escape nested double quotes.
This fixes skills CLI installation.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update skill name and description (remove TEST markers)
- Update script path to ~/.claude/skills/last30days/
- Clean up header, keep Bird CLI features prominent
Ready for local testing as the main skill.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove over-prescriptive format requirements
- Let Claude choose table vs stacked naturally based on content
- Keep critical requirement: Sources line with @handles
- Claude Code's renderer handles the responsive wrapping
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace ASCII table with stacked card format
- Each card: Tool/Mentions/Use Case/Sources on separate lines
- Cards separated by horizontal rule (────)
- Doesn't break when terminal window is narrow
- Still includes @handles in Sources line
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Changed from numbered list to ASCII box-drawing table format
- Added "Key Sources" column that MUST include @handles from X posts
- Added explicit instructions to parse and display highest-engagement handles
- Matches the output quality of the original xAI version
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Claude was summarizing qualitatively ('mostly casual conversation')
instead of summing actual engagement numbers from the output.
Added CRITICAL note to:
- Parse [Xlikes, Yrt] from each X post
- Sum totals for the stats display
- Show top voices with engagement (e.g., @handle (15K likes))
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Now reads from ~/.config/last30days/.env like the regular skill.
Bird CLI + API keys both work together.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add LAST30DAYS_CONFIG_DIR env var to override config location
- Set LAST30DAYS_CONFIG_DIR="" in test skill for clean mode
- Test skill now ignores existing API keys to show Bird install prompt
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
- 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>
- 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>
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>