Agent skill
generate-script
使用 Gemini API 生成 JSON 剧本。由 create-episode-script subagent 调用。读取 step1 中间文件和 project.json,调用 Gemini 生成符合 Pydantic 模型的 JSON 剧本。
Install this agent skill to your Project
npx add-skill https://github.com/ArcReel/ArcReel/tree/main/agent_runtime_profile/.claude/skills/generate-script
SKILL.md
generate-script
使用 Gemini API 生成 JSON 剧本。此 skill 由 create-episode-script subagent 调用,不直接面向用户。
前置条件
- 项目目录下存在
project.json(包含 style、overview、characters、clues) - 已完成 Step 1 预处理:
- narration:
drafts/episode_N/step1_segments.md - drama:
drafts/episode_N/step1_normalized_script.md
- narration:
用法
# 生成指定剧集的剧本
python .claude/skills/generate-script/scripts/generate_script.py --episode {N}
# 自定义输出路径
python .claude/skills/generate-script/scripts/generate_script.py --episode {N} --output scripts/ep1.json
# 预览 Prompt(不实际调用 API)
python .claude/skills/generate-script/scripts/generate_script.py --episode {N} --dry-run
生成流程
脚本内部通过 ScriptGenerator 完成以下步骤:
- 加载 project.json — 读取 content_mode、characters、clues、overview、style
- 加载 Step 1 中间文件 — 根据 content_mode 选择
step1_segments.md(narration)或step1_normalized_script.md(drama) - 构建 Prompt — 将项目概述、风格、角色、线索和中间文件内容组合成完整 prompt
- 调用 Gemini API — 使用
gemini-3-flash-preview模型,传入 Pydantic schema 作为response_schema约束输出格式 - Pydantic 验证 — 用
NarrationEpisodeScript(narration)或DramaEpisodeScript(drama)校验返回 JSON - 补充元数据 — 写入 episode、content_mode、统计信息(片段/场景数、总时长)、时间戳
输出格式
生成的 JSON 文件保存至 scripts/episode_N.json,核心结构:
episode、content_mode、novel(title、chapter、source_file)- narration 模式:
segments数组(每个片段包含 visual、novel_text、duration_seconds 等) - drama 模式:
scenes数组(每个场景包含 visual、dialogue、action、duration_seconds 等) metadata:total_segments/total_scenes、created_at、generatorduration_seconds:全集总时长(秒)
--dry-run 输出
打印将发送给 Gemini 的完整 prompt 文本,不调用 API、不写文件。用于检查 prompt 质量和长度。
支持的两种模式规格详见
.claude/references/content-modes.md。
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
web-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
release
项目发版流程:询问版本步进类型,更新前后端版本号,锁定依赖,提交、打 tag 并推送。当用户提到"发版"、"release"、"bump version"、"升版本"、"打 tag"、"发布新版本"时使用此 skill。
generate-clues
生成线索设计参考图(道具/环境)。当用户说"生成线索图"、"画道具设计"、想为重要物品或场景创建参考图、或有 major 线索缺少 clue_sheet 时使用。确保跨场景视觉一致。
generate-characters
生成角色设计参考图(三视图)。当用户说"生成角色图"、"画角色设计"、想为新角色创建参考图、或有角色缺少 character_sheet 时使用。确保视频中角色形象一致。
Didn't find tool you were looking for?