
Hook Analyzer
- 2 installs
- 411 repo stars
- Updated August 4, 2026
- bytedance/agentkit-samples
Hook Analyzer is a Claude skill (ByteDance AgentKit sample) that extracts a video's first-three-seconds shots and structures them so an LLM can score the opening hook across five dimensions.
About
Hook Analyzer is a ByteDance AgentKit skill that extracts the first-three-seconds shot data from a video breakdown result. It builds structured context with visual descriptions, keyframe image URLs and camera movement to feed a five-dimension hook scoring done by an LLM. It only extracts data; it does not do the scoring itself. Developers use it to evaluate and improve a short video's opening retention.
- Extracts the first-three-seconds shot data from a video breakdown
- Builds structured context (keyframe URLs, camera moves) for LLM hook scoring
- Feeds a 5-dimension hook-attractiveness rubric
Hook Analyzer by the numbers
- 2 all-time installs (skills.sh)
- Ranked #1,166 of 1,335 Generative Media skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
hook-analyzer capabilities & compatibility
- Capabilities
- video analysis · hook scoring · keyframe extraction
- Use cases
- video generation · data analysis · marketing
- Pricing
- Free
What hook-analyzer says it does
视频前三秒钩子分析技能从分镜拆解结果中提取前三秒的分镜数据,并构造结构化的分析上下文
此脚本只做**数据提取**,不做 LLM 评分(评分由 Agent 的 LLM 完成)
每个分镜最多取前 3 帧关键帧,避免 token 超限
npx skills add https://github.com/bytedance/agentkit-samples --skill hook-analyzerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2 |
|---|---|
| repo stars | ★ 411 |
| Last updated | August 4, 2026 |
| Repository | bytedance/agentkit-samples ↗ |
What it does
Extract first-three-seconds shot data from a video breakdown to score its opening hook.
Who is it for?
Evaluating and improving the opening hook of short videos for retention.
Skip if: Doing the scoring itself; the docs note scoring is done by the agent's LLM, not this script.
When should I use this skill?
You have a video breakdown JSON and want to analyze the strength of its first-three-seconds hook.
What you get
Structured first-three-seconds data (with keyframe URLs) ready for a five-dimension LLM hook score.
- structured first-three-seconds segment data with keyframe URLs for scoring
By the numbers
- five-dimension scoring rubric
- extracts up to 3 keyframes per shot
Files
视频前三秒钩子分析 (Hook Analyzer)
概述
视频前三秒钩子分析技能从分镜拆解结果中提取前三秒的分镜数据,并构造结构化的分析上下文,包含视觉内容描述、关键帧图片 URL、运镜方式等信息,为后续的 LLM 多维度评分分析提供输入。
适用场景
1. 短视频优化:评估视频开头的吸引力,提升 3 秒留存率 2. 创意评审:从5个维度量化分析钩子质量 3. 竞品对标:对比不同视频开头的钩子策略
分析维度
本技能提取的数据供以下 5 个维度评分(由 LLM 完成评分):
| 维度 | 权重 | 评估要点 |
|---|---|---|
| 视觉冲击力 | 30% | 画面构图、色彩、光影、运镜动感 |
| 语言钩子 | 25% | 文案与画面配合度、悬念制造 |
| 情绪唤起 | 15% | 画面情绪、人物表情、氛围营造 |
| 信息密度 | 15% | 有效信息量、核心价值传达 |
| 节奏掌控 | 15% | 分镜切换节奏、平台特性适配 |
使用步骤
方式一:从文件读取分镜数据
# 1. 先使用 video-breakdown skill 处理视频并获取分镜结果
python ../video-breakdown-skill/scripts/process_video.py "https://example.com/video.mp4" > breakdown.json
# 2. 提取前三秒分镜数据
python scripts/analyze_hook_segments.py breakdown.json方式二:通过 stdin 管道传入
cat breakdown.json | python scripts/analyze_hook_segments.py -输出格式
{
"segment_count": 3,
"total_duration": 2.8,
"total_video_segments": 15,
"analysis_mode": "multimodal",
"segments": [
{
"index": 0,
"start_time": 0.0,
"end_time": 1.0,
"duration": 1.0,
"visual_content": "画面描述",
"speech_text": "语音文字",
"shot_type": "特写",
"camera_movement": "推镜头",
"function_tag": "开场",
"frame_images": [
{"type": "image_url", "image_url": {"url": "https://..."}}
],
"frame_count": 3
}
]
}钩子类型分类
分析结果可用于识别以下钩子类型:
- 痛点型:直击用户痛点,引发共鸣
- 好奇型:设置悬念,引发好奇
- 冲突型:制造对比或冲突吸引注意
- 价值型:直接展示价值承诺
- 情感型:以情感共鸣打动用户
- 视觉冲击型:通过强烈视觉效果吸引
- 悬念型:留下悬念引导继续观看
评分标准
| 分数段 | 等级 | 描述 |
|---|---|---|
| 9-10 | 顶级 | 极强的吸引力和创意 |
| 7-8 | 优秀 | 具备良好的吸引力 |
| 5-6 | 一般 | 有改进空间 |
| 3-4 | 较弱 | 需要重大改进 |
| 1-2 | 很差 | 基本没有吸引力 |
注意事项
1. 此脚本只做数据提取,不做 LLM 评分(评分由 Agent 的 LLM 完成) 2. 提取的 frame_images 字段中包含关键帧 URL,可供 Vision 模型直接分析 3. 每个分镜最多取前 3 帧关键帧,避免 token 超限 4. 输入必须是 process_video 返回的完整 JSON 数据
故障排除
| 问题 | 解决方案 |
|---|---|
| 输出为空 segments | 确认输入 JSON 包含 segments 字段且不为空 |
| 前三秒无分镜 | 视频可能从静止画面开始,检查原始数据 |
| 关键帧 URL 失效 | TOS 签名 URL 可能已过期,重新拆解获取 |
"""
从分镜拆解结果中提取前三秒分镜数据,构造钩子分析上下文。
Usage:
python scripts/analyze_hook_segments.py <breakdown_json_file>
cat breakdown.json | python scripts/analyze_hook_segments.py -
Examples:
python scripts/analyze_hook_segments.py breakdown_result.json
echo '{"segments":[...]}' | python scripts/analyze_hook_segments.py -
"""
import json
import sys
def analyze_hook_segments(breakdown_data: dict) -> dict:
"""
提取并分析视频前三秒的分镜数据,为钩子分析提供结构化上下文。
Args:
breakdown_data: 完整的分镜拆解结果(包含 segments 字段)
Returns:
dict: 前三秒分镜的结构化分析上下文
"""
segments = breakdown_data.get("segments", [])
if not segments:
return {
"error": "没有分镜数据",
"segment_count": 0,
"total_duration": 0,
"segments": [],
}
# 提取前三秒的分镜
first_segments = []
cumulative_time = 0
for seg in segments:
end_time = seg.get("end_time", 0)
if cumulative_time >= 3.0 and first_segments:
break
first_segments.append(seg)
cumulative_time = end_time
# 构造分析上下文(支持多模态)
context = {
"segment_count": len(first_segments),
"total_duration": cumulative_time,
"total_video_segments": len(segments),
"analysis_mode": "multimodal",
"segments": [],
}
# 为每个分镜构造详细信息
for s in first_segments:
frame_urls = s.get("frame_urls", [])
segment_info = {
"index": s.get("segment_index", 0),
"start_time": s.get("start_time", 0),
"end_time": s.get("end_time", 0),
"duration": s.get("duration", 0),
"visual_content": s.get("visual_content", ""),
"speech_text": s.get("speech_text", ""),
"shot_type": s.get("shot_type", ""),
"camera_movement": s.get("camera_movement", ""),
"function_tag": s.get("function_tag", ""),
"headline": s.get("headline", ""),
"content_tags": s.get("content_tags", []),
"voice_type": s.get("voice_type", ""),
"clip_url": s.get("clip_url", ""),
}
# 关键帧图片(供 vision 模型使用),每个分镜最多取前3帧
if frame_urls:
segment_info["frame_images"] = [
{"type": "image_url", "image_url": {"url": url}}
for url in frame_urls[:3]
]
segment_info["frame_count"] = len(frame_urls)
else:
segment_info["frame_images"] = []
segment_info["frame_count"] = 0
context["segments"].append(segment_info)
total_frames = sum(s.get("frame_count", 0) for s in context["segments"])
print(
f"前三秒提取完成: {len(first_segments)}个分镜, "
f"总时长{cumulative_time:.1f}s, 关键帧{total_frames}张",
file=sys.stderr,
)
return context
if __name__ == "__main__":
if len(sys.argv) < 2:
print("Usage: python analyze_hook_segments.py <breakdown_json_file>")
print(" cat breakdown.json | python analyze_hook_segments.py -")
sys.exit(1)
source = sys.argv[1]
if source == "-":
data = json.load(sys.stdin)
else:
with open(source, "r", encoding="utf-8") as f:
data = json.load(f)
result = analyze_hook_segments(data)
print(json.dumps(result, ensure_ascii=False, indent=2))
Related skills
FAQ
Does Hook Analyzer score the hook?
No. The docs state the script only extracts data and the LLM does the scoring across five dimensions.
What input does it need?
The full JSON returned by process_video (a video-breakdown result) containing a segments field.