SuperAPI AI Directory

generate-script

Coding & development

View repository

Updated 10-15 17:17

About this skill

generate-script

Use the Gemini API to generate a JSON script.

Prerequisites

  1. The project directory contains project.json(including style, overview, characters, clues)
  2. Step 1 completed:
    • narration:drafts/episode_N/step1_segments.md
    • drama:drafts/episode_N/step1_normalized_script.md
  3. Step 2 completed: characters and clues have been written to project.json

Usage

# 生成指定剧集的剧本
python .claude/skills/generate-script/scripts/generate_script.py <project> --episode <N>
Specify the output path

python .claude/skills/generate-script/scripts/generate_script.py --episode --output

Preview Prompt (without actually calling the API)

python .claude/skills/generate-script/scripts/generate_script.py --episode --dry-run


## 示例

```bash
# 生成 test0205 项目第 1 集的剧本
python .claude/skills/generate-script/scripts/generate_script.py test0205 --episode 1

# 预览将发送给 Gemini 的 Prompt
python .claude/skills/generate-script/scripts/generate_script.py test0205 --episode 1 --dry-run

Output

The generated JSON file is saved to projects/<project>/scripts/episode_N.json

Supported modes

  • narration(storytelling mode): 9:16 portrait, keep the original text in novel_text
  • drama(episodic animation mode): 16:9 landscape, scene adaptation