anbeime/skill / skills/historical-interview-scripts/historical-interview-scripts
historical-interview-scripts
Verified自媒体创作者在策划历史名人访谈短视频时,当需要融合古今反差与网络热梗打造爆款,使用本技能可自动生成包含吸睛标题、主持人串词与爆笑问答的完整结构化脚本,轻松产出高传播力的趣味短视频文案。
scripts/agents/storyboard_agent.py
View on GitHub#!/usr/bin/env python3
"""
分镜策划智能体
"""
from typing import Dict, List, Any
from .base_agent import BaseAgent
class StoryboardAgent(BaseAgent):
"""分镜策划智能体"""
def execute(self, script: str, visual_prompts: Dict[str, Dict], duration: int = 60) -> List[Dict]:
"""
生成分镜脚本
Args:
script: 访谈文案
visual_prompts: 视觉提示词
duration: 视频时长(秒)
Returns:
list: 分镜列表
"""
self.log(f"开始生成分镜脚本...")
# 分析文案
script_structure = self._analyze_script_structure(script)
# 生成分镜
storyboards = []
total_duration = 0
for i, section in enumerate(script_structure):
# 计算时长
section_duration = self._estimate_duration(section)
# 生成分镜
storyboard = self._generate_storyboard(
i + 1,
section,
visual_prompts,
section_duration
)
storyboards.append(storyboard)
total_duration += section_duration
if total_duration >= duration:
break
self.log(f"✓ 完成:生成{len(storyboards)}个分镜,总时长{total_duration}秒")
return storyboards
def _analyze_script_structure(self, script: str) -> List[Dict]:
"""
分析文案结构
Args:
script: 访谈文案
Returns:
list: 文案结构列表
"""
# 模拟结构分析(实际使用时替换为真实API调用)
return [
{
'type': 'introduction',
'content': '大家好,欢迎来到历史人物直播间!',
'speaker': 'host',
'timestamp': '00:00-00:10'
},
{
'type': 'dialogue',
'content': '今天我们邀请到了秦始皇,请自我介绍一下',
'speaker': 'host',
'timestamp': '00:10-00:15'
},
{
'type': 'dialogue',
'content': '大家好,我是秦始皇,扫六合、统天下,但今天我想聊聊创业心得',
'speaker': 'qin_shihuang',
'timestamp': '00:15-00:30'
}
]
def _estimate_duration(self, section: Dict) -> int:
"""
估算片段时长
Args:
section: 文案片段
Returns:
int: 时长(秒)
}
"""
# 根据字数估算时长
word_count = len(section['content'])
# 正常语速约为每秒4-5个字
return max(5, word_count // 4)
def _generate_storyboard(self, index: int, section: Dict, visual_prompts: Dict, duration: int) -> Dict:
"""
生成分镜
Args:
index: 分镜序号
section: 文案片段
visual_prompts: 视觉提示词
duration: 时长
Returns:
dict: 分镜信息
"""
# 根据说话人选择角色
speaker = section.get('speaker', 'host')
# 选择视觉提示词
visual_prompt = visual_prompts.get(speaker, visual_prompts.get('qin_shihuang', {}))
return {
'scene_index': index,
'scene_type': section['type'],
'duration': duration,
'dialogue': section['content'],
'speaker': speaker,
'visual_prompt': visual_prompt,
'camera': '中景' if section['type'] == 'dialogue' else '全景',
'background': f'直播间背景,{speaker}的专属颜色',
'transition': '切' if index == 1 else '淡入淡出'
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |