一键生成3-5 分钟国风 AI 漫剧:主题→剧本→角色卡→分镜→图生视频→配音→对口型→BGM→字幕→拼接。内置三级成本熔断(硬限/预警/降级),支持失败续跑。触发词:AI 漫剧、生成漫剧、国风漫剧、仙侠短剧、comic drama、做漫剧。
主入口 skill,串起家族其他 8 个子 skill 完成 3-5 分钟国风漫剧生成。
cost_cap 立即阻止,不得强行继续三渲二国风 + 仙侠.checkpoint.json 恢复,不重做已完成步骤子 skillStep本 skill 如何调用huo15-comic-script1python ../huo15-comic-script/scripts/script_gen.pyhuo15-comic-character2python ../huo15-comic-character/scripts/character.pyhuo15-comic-storyboard3python ../huo15-comic-storyboard/scripts/storyboard.pyhuo15-comic-video4python ../huo15-comic-video/scripts/video.pyhuo15-comic-dub5python ../huo15-comic-dub/scripts/dub.pyhuo15-comic-lipsync6python ../huo15-comic-lipsync/scripts/lipsync.pyhuo15-comic-bgm7python ../huo15-comic-bgm/scripts/bgm.pyhuo15-comic-edit8python ../huo15-comic-edit/scripts/edit.py
必填: theme(主题一句话)、 duration_total(秒数,180/240/300)
可选: style、 genre、 character_hints、 cost_cap、 enable_lipsync
python
from _shared.cost_guard import estimate_total, CostGuard, BudgetExceeded
n_scenes = duration_total // 5
est = estimate_total(
n_scenes=n_scenes, n_characters=3, total_chars=800,
resolution=resolution, # 720p 默认 / 1080p 贵 2.3×
fast=fast_mode, # seedance-fast 打 5 折
enable_lipsync=enable_lipsync,
enable_bgm=enable_bgm,
)
guard = CostGuard(cap=cost_cap or 600.0, project_dir=project_dir)
try:
guard.preflight(est["total"])
except BudgetExceeded as e:
# 立即报给用户降级建议,等用户选择
report_to_user(str(e))
return
text
收到!将生成 {duration_total}s 国风漫剧({n_scenes} 镜头)
主题:{theme}
风格:{style} / 类型:{genre}
预估成本:
· 剧本 ¥0.00(本地)
· 角色 ¥{image}
· 视频 ¥{video}
· TTS ¥{tts}
· 口型 ¥{lipsync}
· BGM ¥{bgm}
· 合计 ¥{total}(熔断上限 ¥{cap})
确认开始吗?
每步前 checkpoint 查重( if cp.is_done(step): skip),每步后 guard.charge(step, item, cost),触发预警即告知用户,触发熔断即停并给降级方案。
输出 output/{project_slug}/final.mp4 路径、实际成本、耗时。
scripts/run.py:
bash
python scripts/run.py \
--theme "少年剑仙三年归来" \
--duration 240 \
--style 三渲二国风 \
--genre 仙侠 \
--cap 600
详见 scripts/run.py。
_shared/cost_guard.py 的 BudgetExceeded 抛出时,默认提供 5 选 1:
--fast(seedance-fast 打 5 折,视频占大头,省 ~40%)Agent 必须让用户二次确认任何降级,不得自动降级。
视频占比最高(~85%)→ 优先调视频参数:
fast=True → 视频减半resolution=480p → 视频再减半scene_duration=4 → 视频线性减 20%Lipsync 成本从 2026-04 起大幅下降(Kling 2.6: ¥0.72/5s),不再是大头。
不建议 让 scripts/script_gen.py 调 Anthropic SDK 生成剧本,因为:
script_gen.py 走 SDK 要消耗 token,Agent 直写不花钱推荐流程:Agent 按 huo15-comic-script/SKILL.md 的 JSON schema 直接写 script.json 到 output/{slug}/,然后:
bash
# 跳过 LLM 调用,只校验
python huo15-comic-script/scripts/script_gen.py \
--theme "..." --duration 240 \
--input-json output/{slug}/script.json \
--out output/{slug}/script.json
run.py 支持 SCRIPT_PREWRITTEN=1 环境变量跳过 SDK 调用路径。
Demo 见 examples/demo-xianxia-180s.json。
output/{project}/.checkpoint.json 记录每步与镜头级状态:
json
{
"script": "done",
"characters": "done",
"storyboard": "done",
"videos": "running",
"videos.S01": "done",
"videos.S02": "done",
"videos.S03": "running",
...
}
重启时扫描,从 next_pending() 续跑,已完成镜头不重做。