一键导入
content-analyzer
Analyze video/text content to identify highlights, key topics, and optimal clip points for short video creation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze video/text content to identify highlights, key topics, and optimal clip points for short video creation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Calculate Four Pillars (四柱) from birth date/time using lunar calendar conversion. Foundation skill for all BaZi analysis.
Create and manage artifact.json for task outputs. Use when creating code files, documentation, or any files that should be tracked as artifacts.
Create and manage artifact.json for task outputs. Use at the START of every task to define planned deliverables before beginning research.
Provide career guidance and recommendations based on BaZi elemental strengths, Day Master traits, and current luck cycles.
Calculate and interpret 10-year luck cycles (大运) and annual fortune (流年) for timing insights and life trend predictions.
Analyze BaZi compatibility for romantic relationships (合婚). Examines elemental harmony, Day Master interaction, and long-term compatibility potential.
| name | content-analyzer |
| description | Analyze video/text content to identify highlights, key topics, and optimal clip points for short video creation. |
分析视频/文字内容,识别精彩片段、关键话题,为短视频创作提供智能建议。
分析这个视频的内容: ./output/downloads/video.mp4
帮我分析这段文案的亮点:
今天分享三个改变我人生的习惯...
# 如果输入是视频,先转录
INPUT="[USER_INPUT]"
if [[ -f "$INPUT" ]]; then
# 检查是否已有转录
TRANSCRIPT="${INPUT%.mp4}.txt"
if [ ! -f "$TRANSCRIPT" ]; then
echo "正在转录音频..."
# 使用 Whisper 转录
whisper "$INPUT" --model base --language zh --output_format txt --output_dir ./temp/
fi
else
# 直接处理文本输入
echo "$INPUT" > ./temp/content.txt
TRANSCRIPT="./temp/content.txt"
fi
import re
from collections import Counter
# 读取文本
with open(TRANSCRIPT_PATH, 'r') as f:
text = f.read()
# 基础分析
total_chars = len(text)
sentences = re.split(r'[。!?\n]', text)
sentences = [s.strip() for s in sentences if len(s.strip()) > 5]
print(f"=== 内容分析报告 ===\n")
print(f"总字数: {total_chars}")
print(f"句子数: {len(sentences)}")
print(f"预估阅读时间: {total_chars / 300:.1f} 分钟")
print(f"预估语音时长: {total_chars / 4:.0f} 秒\n")
# 关键词提取(简化版)
# 停用词
stopwords = set(['的', '是', '在', '和', '了', '有', '我', '你', '他', '她', '它',
'这', '那', '就', '也', '都', '会', '能', '要', '可以', '一个'])
words = re.findall(r'[\u4e00-\u9fff]+', text)
word_freq = Counter(w for w in words if len(w) >= 2 and w not in stopwords)
top_keywords = word_freq.most_common(10)
print("## 核心关键词:")
for word, count in top_keywords:
print(f" - {word}: {count}次")
# 识别数字/列表内容(通常是亮点)
numbered_points = re.findall(r'[第一二三四五六七八九十\d][、::].*?[。!?]', text)
if numbered_points:
print(f"\n## 发现要点列表 ({len(numbered_points)}个):")
for point in numbered_points[:5]:
print(f" → {point.strip()}")
# 识别情感高潮(感叹句)
exclamations = [s for s in sentences if '!' in s or '?' in s]
if exclamations:
print(f"\n## 情感高潮点 ({len(exclamations)}处):")
for ex in exclamations[:3]:
print(f" 🔥 {ex}")
# 提取金句(包含引号或特殊表达)
quotes = re.findall(r'[「"'].*?[」"']', text)
if quotes:
print(f"\n## 金句提取:")
for q in quotes[:3]:
print(f" 💬 {q}")
# 基于规则的精彩片段识别
highlights = []
for i, sentence in enumerate(sentences):
score = 0
# 评分规则
if '秘密' in sentence or '技巧' in sentence: score += 3
if '推荐' in sentence or '必须' in sentence: score += 2
if '震惊' in sentence or '惊讶' in sentence: score += 2
if re.search(r'\d+[个种条]', sentence): score += 2
if '!' in sentence: score += 1
if len(sentence) > 20 and len(sentence) < 50: score += 1
if score >= 3:
highlights.append({
'index': i,
'text': sentence,
'score': score
})
highlights.sort(key=lambda x: x['score'], reverse=True)
print("\n## 推荐短视频片段:")
for h in highlights[:5]:
print(f"\n### 推荐度: {'⭐' * min(h['score'], 5)}")
print(f"内容: {h['text']}")
print(f"位置: 第 {h['index'] + 1} 句")
cat > ./output/analysis_report.md << 'EOF'
# 内容分析报告
## 📊 基础统计
- 总字数: X
- 句子数: X
- 预估时长: X 秒
## 🎯 核心话题
1. 话题 A
2. 话题 B
3. 话题 C
## 🔥 精彩片段推荐
### 片段 1 (推荐度: ⭐⭐⭐⭐⭐)
- 位置: 00:30 - 00:45
- 内容: "..."
- 原因: 包含数字要点、情感高潮
### 片段 2 (推荐度: ⭐⭐⭐⭐)
- 位置: 01:20 - 01:35
- 内容: "..."
- 原因: 实用技巧分享
## 💡 制作建议
1. **开场 Hook**: 使用片段 1 作为开场吸引注意
2. **核心内容**: 围绕核心话题展开
3. **结尾 CTA**: 添加互动引导
## 📝 短视频脚本建议
### 版本 A (15秒)
精简版,只保留核心金句
### 版本 B (30秒)
标准版,包含完整观点
### 版本 C (60秒)
详细版,包含案例说明
EOF
echo "✅ 分析报告已生成: ./output/analysis_report.md"
./output/analysis_report.mdhighlight-finder 精确定位时间点shorts-generator 生成短视频script-to-video 生成优化版本