Turn a screenplay into AI-video pre-production assets — shot list, character/scene/prop sheets, per-shot prompts
A DeepSeek Harness run mode · copy one folder and it's live · the entire methodology is plain markdown
English · 简体中文
In August 2026 DeepSeek open-sourced its own agent harness, dsh. It lets you package a whole way of working as a run mode (an agent preset): one directory, copied into place, and a new AI of your own shows up in the Web UI's mode dropdown.
This repo is one of those modes. It's called Script Breakdown Workflow, and it does exactly one thing: turn a screenplay into pre-production assets for AI video generation.
Switch to this mode, hand it a script, and it will:
- Classify it — short-form/web drama, feature/series, or commercial. Shot granularity differs completely between them.
- Break it down the way a director briefs a crew — logline, theme and emotional register, narrative structure, scene overview, director's statement — then list every shot (number / scene / shot size / camera move / action / dialogue / duration / notes).
- Build a visual asset library — one Chinese Jimeng prompt per character, location and prop, each with cross-shot consistency anchors.
- Write per-shot video prompts — one seven-part Jimeng prompt per shot, ready to paste straight into the generator.
The output is a structured markdown package in your workspace that you can start working from immediately.
It does not generate video or images, and calls no generation API. It does the other half of the job — the half that is laborious, easy to get inconsistent, and that nobody wants to do.
Prerequisites: Node.js, and having run the Harness at least once (so that ~/.dsh exists).
npx @deepseek-ai/dsh webInstall:
git clone https://github.com/feicaiclub/script-breakdown-dsh.git
cd script-breakdown-dsh && ./install.shThe script does one thing: copy preset/ to ~/.dsh/.agent-presets/script-breakdown/. Preset directories are re-scanned on every read, so it is live immediately — no restart.
Use it: open the Web UI → switch the mode dropdown to 剧本拆解工作流 → drop in a .txt / .md script (or just paste the text) → say "break down this script".
Uninstall: ./install.sh --uninstall
Three stages, with a confirmation gate between each one. It will not run the whole thing and dump a pile of files on you — after each stage lands on disk it stops, reports the paths and the key numbers, and asks: continue / revise / redo.
A fourth skill, script-breakdown, is the router that orchestrates all of it: classification, stage dispatch, output acceptance, redo/backup, and the run log. It never writes the deliverables itself.
Anyone who has done AI video knows the painful part: the same character does not look the same in shot 3 and shot 11.
This workflow solves it with two hard rules — upstream files are the single source of truth, and the model is not allowed to recite from memory:
- Stage 2 reads only
01and the script. Stage 3 reads only01and02— it does not even look at the script anymore - The duration column is copied verbatim; stage 3 may not change it
- Asset anchors ("greying short hair", "faded apron") are quoted into every shot word for word
- Nothing may be introduced that isn't in
01/02; the prompt count matches the shot count one to one
Revising is the normal case. Say "redo the shot list" or "change shot 7" and it will:
- Copy the current file into
历史版本/as01-分镜总表.v2.20260817-031318.md - Regenerate
- Append a row to
.script-breakdown/run-log.md(metadata and paths only — never script or prompt text) - Warn you that downstream files may now be stale and ask whether to redo those too — your call; it never cascades on its own
Zero shell, zero deletion throughout. Every backup is kept; when they pile up it tells you to clean them out yourself in your file manager.
拆解结果/<script name>/
├─ 原始剧本.md # only when you pasted text; uploaded files are never touched
├─ 00-拆解报告.md # breakdown report
├─ 01-分镜总表.md # shot list
├─ 02-资产提示词.md # asset prompts
├─ 03-逐镜视频提示词.md # per-shot video prompts
└─ 历史版本/ # automatic backups before every redo, all kept
.script-breakdown/
└─ run-log.md # timestamp, action, output path for every step
Below are the reference examples that ship in the repo's own templates — this is what the output looks like:
01-分镜总表.md
| 镜号 | 场次 | 景别 | 运镜 | 画面内容 | 台词/旁白 | 时长 | 备注 |
|---|---|---|---|---|---|---|---|
| 01 | 第1场 | 中景 | 固定 | 面馆内,小雨推门而入,风铃晃动,老板抬头。 | 小雨:老板,一碗阳春面。 | 5秒 | 门铃音效 |
| 02 | 第1场 | 特写 | 推 | 老板的手把荷包蛋轻轻打进面碗。 | — | 5秒 | 热气升腾 |
02-资产提示词.md
25 岁左右的中国年轻女性,圆脸,齐肩黑发微乱,眼下有熬夜的青色;穿浅灰连帽卫衣, 袖口起球,双肩包单肩挎着;体态疲惫,走路略拖,坐定时习惯把手机屏幕按灭又点亮。
- 一致性锚点:齐肩黑发、浅灰连帽卫衣、眼下青色
03-逐镜视频提示词.md
小雨(齐肩黑发、浅灰连帽卫衣、眼下青色)坐在吧台前低头吃面, 第一口咽下后眼眶发红,一滴泪滑进碗里,动作停顿。深夜面馆内景, 暖黄灯光。镜头:近景,固定机位。光线柔和的侧光,氛围克制而动人。 时长 10 秒。
No lead-in text before the code block — so you can copy the whole thing in one go.
Please read this section. It decides whether you'll be disappointed.
Where this came from: I first had DeepSeek search the web for how script breakdown is generally done and how AI-video prompts are generally written — the common requirements and the common process — and then built that into a working framework on DeepSeek Harness.
So it is a generic skeleton, not a finished product:
- Shot granularity uses generic defaults (5s baseline, 3s for fast cuts, 10s for emotional beats), not your production's
- Prompt constraints are deliberately loose — they check that subject, action, environment, camera language, lighting and duration are all present; quantification stops at coarse tiers like 80–150 characters per prompt, nothing pinned to the precision your format actually needs
- The seven-part structure targets Jimeng; another platform needs another structure
- Asset prompts cover appearance / wardrobe / material / consistency only — no overall art direction, no micro-expressions, no frame-accurate timeline
It runs, but it doesn't know your industry. A brand TVC team, a vertical short-drama team and a product-animation team do not need the same shot list at all.
The good news: filling in your own standards takes almost no code.
The entire methodology is markdown. Edit it in any text editor, save, and the next conversation uses the new version — preset directories are re-scanned on every read, so no restart and no reinstall.
① Frame-accurate timing, micro-expressions
Add columns to preset/skills/script-breakdown-stage1/templates/storyboard-table.md (e.g. "micro-expression", "beat"), then change the duration rule in the SKILL.md next to it. Stage 3 copies the new duration column — but its own SKILL.md and jimeng-shot-template.md each restate the old tiers, so change those too or the two rules will contradict each other.
② A different video generation platform
The seven-part structure is Jimeng-specific. For Kling / Hailuo / Veo, replace preset/skills/script-shot-prompts/templates/jimeng-shot-template.md wholesale and rewrite the "七段式" and "写作规则" sections of the adjacent SKILL.md for the new platform (English input, parameters, negative prompts, and so on).
③ Overall art direction
Add a stage before stage 1. Create preset/skills/script-visual-design/SKILL.md producing 00-视觉设定.md (palette, camera-language thesis, reference styles), then add a line to the persona in preset/agent.cordis.yml and have later stages reference it.
④ Voice-over script / subtitles / BGM cues Easiest path: copy an existing skill directory as a template — the structure, frontmatter and reference wiring are all there — rename it, rewrite the content, and mount it in the persona.
Before deciding what to change, run one of your own real scripts end to end. You'll find out fast which layer falls short.
.
├── install.sh install / uninstall
├── preset/
│ ├── preset.yml mode name and description (what the dropdown shows)
│ ├── agent.cordis.yml persona router + tool rows + compaction + skill mounting
│ └── skills/
│ ├── script-breakdown/ router: orchestration, acceptance, redo/backup, run log
│ │ └── references/ chunking & guardrails · redo & run-log · report template · trigger corpus
│ ├── script-breakdown-stage1/ stage 1
│ │ ├── references/ the directing method
│ │ └── templates/ shot list template
│ ├── script-asset-prompts/ stage 2
│ │ └── templates/ asset sheet template
│ └── script-shot-prompts/ stage 3
│ └── templates/ per-shot Jimeng prompt template
└── assets/ README figures
14 files, 646 lines, roughly 13,000 characters of methodology. Zero TypeScript, zero dependencies, zero build.
A few design points worth calling out:
- Skills are progressively disclosed. Only four
descriptionlines (~460 characters total) stay resident in context. ASKILL.mdbody is read only when it matches;references/andtemplates/are read only when that body names them. So 13,000 characters of methodology costs almost nothing day to day — adding your own standards to it is cheap. - Only five tool rows are mounted:
tool-fs/tool-fs-search/tool-ask-user/tool-todo/tool-skill. No shell, no network, no generation API — it is physically unable to delete your files or quietly call a service. - Skills are preset-scoped, registered into this mode's own layer, so they don't pollute your other modes.
- Long scripts are chunked by scene/act (triggered at 20,000 characters), shot numbers stay continuous across the whole film, and the pieces are merged before anything is written. The threshold is a safety multiple of the host
tool-result-pruner's 8,192-character truncation line, not an arbitrary number. - Why a preset instead of a plugin: plugins need TypeScript, bundling and dependencies. A preset is a directory — copy it and it runs, edit it and it's live. For a methodology-shaped product, a preset is the lower-friction vehicle.
What it does not do
- Generate video or images, or call any generation API
- Read PDF / docx — save as
.txt/.md, or paste the text - Delete anything, or write outside
拆解结果/and.script-breakdown/ - Process non-scripts (technical docs, prose, data tables) — those are refused outright, with no directory created
Known limits
- Prompts are Chinese and Jimeng-flavoured. Another platform or language means editing templates (see above)
- Files over 500 KB (~200,000 characters) are refused; submit in parts
- If a single chunk of a long script still exceeds context, it stops and asks you to split manually
- Breakdown quality tracks script quality. Blocking the script never specified will not be invented for you — that is deliberate: shots are derived from what the script actually says, never from invented plot or characters
- Ran your own script and found a layer too loose? Open an issue naming the file and the section
- Built a better template (another platform's dialect, another industry's shot list)? PRs welcome, or just paste it in an issue
- Added a new stage (voice-over, subtitles, cost estimation…)? Especially welcome — that's exactly how this skeleton is supposed to grow
The value here isn't the version I built. It's that it's a skeleton you can change.
Apache-2.0 © FEICAI CLUB
Not affiliated with DeepSeek. DeepSeek Harness is open-sourced by DeepSeek AI under MIT. "Jimeng" is a ByteDance product; this project only produces text prompts aimed at it and calls none of its APIs.
This workflow isn't a one-off. It's how we make everything: read the source, measure the numbers, check them again, and be honest about the costs.
What the site is publishing now runs along the same line as this repo —
#AGENT #SKILL #CLAUDE-CODE #CODEX #HARNESS#CONTEXT-ENGINEERING #PROMPT-FRAMEWORK #MCP-TOOLING #RAG #EVAL
Beyond AI agents and AI coding, we also cover AI writing, AI comics and short drama, AI image generation and UI design — and how all of it actually lands in a real industry. Alongside the articles there are resource packs, an events area and a paid community.
Subscribe and this kind of deep-dive keeps coming
If this workflow has value for you, star the repo ⭐️ — and help more people find it

