youtube-research
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseYouTube Research
YouTube 内容调研
Research high-performing YouTube outlier videos, analyze top content with AI, and generate actionable reports.
借助工具研究表现优异的YouTube异常视频(outlier videos),利用AI分析优质内容并生成可落地的报告。
Prerequisites
前置条件
- environment variable. Get key from https://tubelab.net/settings/api
TUBELAB_API_KEY - environment variable (for video analysis)
GEMINI_API_KEY - and
google-genaiPython packagesrequests
- 环境变量。可从 https://tubelab.net/settings/api 获取密钥
TUBELAB_API_KEY - 环境变量(用于视频分析)
GEMINI_API_KEY - 和
google-genaiPython 包requests
Workflow
工作流程
Step 1: Create Run Folder
步骤1:创建运行文件夹
bash
mkdir -p youtube-research/$(date +%Y-%m-%d_%H%M%S)bash
mkdir -p youtube-research/$(date +%Y-%m-%d_%H%M%S)Step 2: Get Channel ID
步骤2:获取频道ID
Read to get the channel ID.
.claude/context/youtube-channel.md读取 文件获取频道ID。
.claude/context/youtube-channel.mdStep 3: Fetch Channel Videos
步骤3:获取频道视频数据
bash
python scripts/get_channel_videos.py CHANNEL_ID --format summaryThis returns JSON with the channel's video titles and view counts.
bash
python scripts/get_channel_videos.py CHANNEL_ID --format summary该命令返回包含频道视频标题和播放量的JSON数据。
Step 4: Analyze Channel
步骤4:分析频道
Analyze the channel data to extract:
- keywords: 4 search terms for the channel's direct niche
- adjacent-keywords: 4 search terms for topics the same audience watches
- audience: 2-3 profiles with objections, transformations, stakes
- formulas: Reusable title templates
See for the full schema and example output.
references/channel-analysis-schema.md分析频道数据以提取:
- keywords:频道核心细分领域的4个搜索关键词
- adjacent-keywords:目标受众关注的相邻领域的4个搜索关键词
- audience:2-3个受众画像,包含痛点、转化路径、核心诉求
- formulas:可复用的标题模板
完整的输出格式和示例可查看 。
references/channel-analysis-schema.mdStep 5: Search for Outliers
步骤5:搜索异常表现视频
Run the outlier search with both keyword sets:
bash
python .claude/skills/youtube-research/scripts/find_outliers.py \
--keywords "keyword1" "keyword2" "keyword3" "keyword4" \
--adjacent-keywords "adjacent1" "adjacent2" "adjacent3" "adjacent4" \
--output-dir youtube-research/{run-folder} \
--top 5This runs two searches:
- Direct niche: keywords with 5K+ views threshold
- Adjacent audience: adjacent-keywords with 10K+ views threshold
Output files:
- - All outliers normalized for video analysis
outliers.json - - Basic markdown report
report.md - - Video thumbnails
thumbnails/*.jpg - - Video transcripts
transcripts/*.txt
使用两组关键词运行异常视频搜索:
bash
python .claude/skills/youtube-research/scripts/find_outliers.py \
--keywords "keyword1" "keyword2" "keyword3" "keyword4" \
--adjacent-keywords "adjacent1" "adjacent2" "adjacent3" "adjacent4" \
--output-dir youtube-research/{run-folder} \
--top 5该命令会执行两类搜索:
- 核心细分领域:使用keywords,播放量阈值为5000+次
- 相邻受众领域:使用adjacent-keywords,播放量阈值为10000+次
输出文件:
- :所有标准化后的异常视频数据,用于后续分析
outliers.json - :基础Markdown报告
report.md - :视频缩略图
thumbnails/*.jpg - :视频字幕
transcripts/*.txt
Step 6: Filter Relevant Videos for Analysis
步骤6:筛选用于分析的相关视频
Read and the user's niche from .
outliers.json.claude/context/youtube-channel.mdCRITICAL: Select MAX 3 videos that are most relevant to the user's niche. Filter by:
- Title relevance: Title contains keywords related to user's niche/topics
- Transcript relevance: If transcript exists, check it mentions relevant topics
- Direct niche priority: Prefer videos from direct keyword search over adjacent
Skip videos that are clearly outside the user's content style (e.g., entertainment/vlogs when user does tutorials).
Write the filtered videos to :
{RUN_FOLDER}/filtered-outliers.jsonjson
{
"outliers": [/* max 3 relevant videos */],
"filter_reason": "Selected based on relevance to [user's niche]"
}读取 和 中的用户细分领域信息。
outliers.json.claude/context/youtube-channel.md关键要求:最多选择3个与用户细分领域最相关的视频,筛选标准如下:
- 标题相关性:标题包含与用户细分领域/主题相关的关键词
- 字幕相关性:若存在字幕,需确认其提及相关主题
- 核心领域优先级:优先选择核心关键词搜索结果中的视频,而非相邻领域
跳过明显不符合用户内容风格的视频(例如用户做教程类内容,却选择娱乐/vlog类视频)。
将筛选后的视频写入 :
{RUN_FOLDER}/filtered-outliers.jsonjson
{
"outliers": [/* 最多3个相关视频 */],
"filter_reason": "基于与[用户细分领域]的相关性筛选"
}Step 7: Analyze Top Videos with AI
步骤7:使用AI分析优质视频
bash
python3 .claude/skills/video-content-analyzer/scripts/analyze_videos.py \
--input {RUN_FOLDER}/filtered-outliers.json \
--output {RUN_FOLDER}/video-analysis.json \
--platform youtube \
--max-videos 3Extracts from each video:
- Hook technique and replicable formula
- Content structure and sections
- Retention techniques
- CTA strategy
See the skill for full output schema and hook/format types.
video-content-analyzerbash
python3 .claude/skills/video-content-analyzer/scripts/analyze_videos.py \
--input {RUN_FOLDER}/filtered-outliers.json \
--output {RUN_FOLDER}/video-analysis.json \
--platform youtube \
--max-videos 3从每个视频中提取以下信息:
- 钩子技巧及可复用公式
- 内容结构与板块划分
- 留存用户的技巧
- CTA策略
完整的输出格式和钩子/内容类型可查看 技能文档。
video-content-analyzerStep 8: Generate Final Report
步骤8:生成最终报告
Read and , then generate .
{RUN_FOLDER}/outliers.json{RUN_FOLDER}/video-analysis.json{RUN_FOLDER}/report.mdReport Structure:
markdown
undefined读取 和 ,然后生成 。
{RUN_FOLDER}/outliers.json{RUN_FOLDER}/video-analysis.json{RUN_FOLDER}/report.md报告结构:
markdown
undefinedYouTube Research Report
YouTube 内容调研报告
Generated: {date}
生成日期:{date}
Top Performing Hooks
高表现钩子Top榜单
Ranked by engagement. Use these formulas for your content.
按互动量排序。可直接复用这些公式创作内容。
Hook 1: {technique} - {channelTitle}
钩子1:{technique} - {channelTitle}
- Video: "{title}"
- Opening: "{opening_line}"
- Why it works: {attention_grab}
- Replicable Formula: {replicable_formula}
- Views: {viewCount} | zScore: {zScore}
- Watch Video
[Repeat for each analyzed video]
- 视频:"{title}"
- 开场台词:"{opening_line}"
- 有效原因:{attention_grab}
- 可复用公式:{replicable_formula}
- 播放量:{viewCount} | zScore:{zScore}
- 观看视频
[为每个分析的视频重复上述结构]
Content Structure Patterns
内容结构模式
| Video | Format | Pacing | Key Retention Techniques |
|---|---|---|---|
| {title} | {format} | {pacing} | {techniques} |
| 视频 | 格式 | 节奏 | 核心留存技巧 |
|---|---|---|---|
| {title} | {format} | {pacing} | {techniques} |
CTA Strategies
CTA策略
| Video | CTA Type | CTA Text | Placement |
|---|---|---|---|
| {title} | {type} | "{cta_text}" | {placement} |
| 视频 | CTA类型 | CTA文案 | 放置位置 |
|---|---|---|---|
| {title} | {type} | "{cta_text}" | {placement} |
All Outliers
所有异常表现视频
Direct Niche
核心细分领域
| Rank | Channel | Title | Views | zScore |
|---|---|---|---|---|
| [List direct niche outliers] |
| 排名 | 频道 | 标题 | 播放量 | zScore |
|---|---|---|---|---|
| [列出核心领域的异常视频] |
Adjacent Audience
相邻受众领域
| Rank | Channel | Title | Views | zScore |
|---|---|---|---|---|
| [List adjacent outliers] |
| 排名 | 频道 | 标题 | 播放量 | zScore |
|---|---|---|---|---|
| [列出相邻领域的异常视频] |
Actionable Takeaways
可落地行动建议
[Synthesize patterns into 4-6 specific recommendations based on video analysis]
Focus on actionable insights. The "Top Performing Hooks" section with replicable formulas should be prominent.[基于视频分析总结4-6条具体的行动建议]
报告需聚焦可落地的洞察,其中包含可复用公式的「高表现钩子Top榜单」部分需突出展示。Quick Reference
快速参考
Full pipeline:
bash
RUN_FOLDER="youtube-research/$(date +%Y-%m-%d_%H%M%S)" && mkdir -p "$RUN_FOLDER" && \
python .claude/skills/youtube-research/scripts/find_outliers.py \
--keywords "k1" "k2" "k3" "k4" \
--adjacent-keywords "a1" "a2" "a3" "a4" \
--output-dir "$RUN_FOLDER" --top 5Then filter outliers for niche relevance (max 3), run video analysis, and generate the report.
完整流程命令:
bash
RUN_FOLDER="youtube-research/$(date +%Y-%m-%d_%H%M%S)" && mkdir -p "$RUN_FOLDER" && \
python .claude/skills/youtube-research/scripts/find_outliers.py \
--keywords "k1" "k2" "k3" "k4" \
--adjacent-keywords "a1" "a2" "a3" "a4" \
--output-dir "$RUN_FOLDER" --top 5之后筛选出与细分领域相关的异常视频(最多3个),运行视频分析,最后生成报告。
Script Reference
脚本参考
get_channel_videos.py
get_channel_videos.py
python .claude/skills/youtube-research/scripts/get_channel_videos.py CHANNEL_ID [--format json|summary]| Arg | Description |
|---|---|
| YouTube channel ID (24 chars) |
| |
python .claude/skills/youtube-research/scripts/get_channel_videos.py CHANNEL_ID [--format json|summary]| 参数 | 描述 |
|---|---|
| YouTube频道ID(24位字符) |
| |
find_outliers.py
find_outliers.py
python .claude/skills/youtube-research/scripts/find_outliers.py --keywords K1 K2 K3 K4 --adjacent-keywords A1 A2 A3 A4 --output-dir DIR [options]| Arg | Description |
|---|---|
| Direct niche keywords (4 recommended) |
| Adjacent topic keywords (4 recommended) |
| Output directory (required) |
| Videos per category (default: 5) |
| Days back to search (default: 30) |
| Also save raw JSON data |
Output: , , ,
outliers.jsonreport.mdthumbnails/transcripts/python .claude/skills/youtube-research/scripts/find_outliers.py --keywords K1 K2 K3 K4 --adjacent-keywords A1 A2 A3 A4 --output-dir DIR [options]| 参数 | 描述 |
|---|---|
| 核心细分领域关键词(推荐4个) |
| 相邻领域关键词(推荐4个) |
| 输出目录(必填) |
| 每个分类返回的视频数量(默认:5) |
| 搜索的时间范围(默认:30天) |
| 同时保存原始JSON数据 |
输出内容:、、、
outliers.jsonreport.mdthumbnails/transcripts/Scoring Algorithm
评分算法
Videos ranked by:
zScore × recency_boost- zScore: How much video outperforms its channel average
- recency_boost: 1.0 for today, decays 5%/day (min 0.3×)
视频排名公式:
zScore × recency_boost- zScore:视频表现超出频道平均水平的程度
- recency_boost:当日视频为1.0,每日衰减5%(最低0.3倍)