# Story Studio: Chinese history videos, script to JianYing draft (konlu/story-studio) — skill card for AI agents

> AgentGid skill card. Checked on 2026-11-02 against commit bb6cb5a.
> Every fact comes from the pack's own files at that commit. Numbers marked "as reported" are the author's.
> Human page: https://agentgid.com/skills/konlu/story-studio/

> Note: the pack has changed since this check; re-read its files before relying on details.

## Explain it to a non-programmer
Your assistant makes Chinese short videos about history and real people, one step at a time. It can write the script and voice it with Doubao (a paid speech service) or use your own recording. It plans and draws the pictures and builds an editable project in the JianYing Pro video editor. You switch on only the steps you want.

## Who it is for
- You make Chinese talking-head videos about history or famous real people for Channels, Douyin or similar
- You want a script that checks facts first and does not invent numbers, quotes or scenes
- You already have a script or a recorded voice and want pictures and a timed JianYing project from them
- You use Claude Code, Codex or Cursor
- Not for: You work in English: the scripts, prompts and rules are all Chinese
- Not for: You want a finished MP4 by default: it stops at a JianYing project you open and export yourself
- Not for: You edit on a Mac and need it to just work: the author targets JianYing on Windows

## What it is
- Kind: knowledge, scripts
- License: see the repository
- Repository: https://github.com/konlu/story-studio

## What it does
- Three switches decide the job: write (topic, fact check, script, hooks, word count), illustrate (storyboard, prompts or real images) and draft (timeline, zoom moves, JianYing project). Voice is a separate step between them.
- Writing has two built-in styles: historical narrative, learned from 57 scripts of 4 accounts, and real-women life stories from one Channels account. Facts come first: a fact table and timeline, no invented numbers or quotes.
- Length: "about N characters" means within 5 percent, and it reports the real count.
- Voice: either Doubao speech makes the MP3 after you confirm voice, speed and text, or you give your own final MP3.
- Timing: the local Coli speech-to-text tool makes subtitles from the final voice; shots follow real speech times, about 8 seconds per picture, never split by character count.
- Pictures: three styles (historical realism, thick-paint historical comic, black-and-white narrative) with 12 reference images; a full image job also makes two titled covers, 3:4 and 4:3.
- Draft: a 1080×1920, 30 fps JianYing project with the whole voice track, a slow push or pull on every picture and a zoom punch at cuts, no on-screen subtitles unless asked.
- Never cuts: facts over style, no paid voice or images without your choice, old drafts kept (new version names)

## Skills
| Skill | Call | Changes code? | In plain words |
|---|---|---|---|
| story-studio | plain language in Chinese ("使用 $story-studio，只写稿 / 只做配图 / 现有素材做剪映草稿") | no | Makes a Chinese history or life-story short video, from script to an editable JianYing project |

### story-studio
- Asks for: Which steps you want: write, pictures, JianYing draft (any mix)
- Asks for: The person or event, the writing style and the target length
- Asks for: For voice: your Doubao speech key, speaker ID and resource ID, or your own final MP3
- Asks for: Picture style (realism, thick-paint comic, black-and-white) and how many pictures
- Gives: Script, title options, fact table with timeline, source notes
- Gives: narration.mp3 with a record of voice settings and file hashes; a Coli subtitle file checked against the script
- Gives: STORYBOARD.md and STORYBOARD.json with times, script anchors and one prompt per shot; images named by shot; COVER_3x4.png and COVER_4x3.png
- Gives: An editable JianYing project in its drafts folder, plus plan.json and semantic_alignment.json; final.mp4 only if you ask
- Say: "使用 $story-studio，只写一篇关于「林巧稚」的人物故事口播稿。"

## Know before installing
- Doubao voice costs money per use. The assistant must ask first; it sends nothing paid until you choose a voice path.
- One voice attempt, no automatic retry: a network timeout may still be billed, so check the console before asking again.
- If you let it save your Doubao key, on macOS and Linux it is a plain file readable only by you (mode 0600); on Windows it is encrypted for your user. The DOUBAO_TTS_API_KEY variable works instead.
- The skill tells your assistant to install tools itself without making you run commands: Homebrew or apt (sudo) packages, a private Python and Node.js, and on Windows JianYing via winget with its agreements accepted.
- The author's target is JianYing on Windows; on macOS and Linux the project files are made, but full export in the desktop app is not verified.
- The writing library is about 350 transcripts of other accounts' Channels videos, kept for style only. They are not checked facts.

## Install (official commands)
- Codex, Claude Code (macOS / Linux): `git clone https://github.com/konlu/story-studio.git ~/.codex/skills/story-studio` — For Claude Code or other assistants replace .codex with .claude or .agents. Then ask the assistant to set up the tools when you need voice, transcription or drafts. Remove: `delete the story-studio skills folder and the data folder ~/.local/share/story-studio (no uninstall script)`.
- Codex, Claude Code (Windows PowerShell): `git clone https://github.com/konlu/story-studio.git "$HOME\.codex\skills\story-studio"` Remove: `delete the story-studio skills folder and %LOCALAPPDATA%\story-studio`.
- Downloaded zip: `./install.sh` — On Windows double-click install.bat. It copies the folder into the first of ~/.codex, ~/.claude or ~/.agents that exists, then runs a check that downloads nothing.
- Any assistant with a terminal: The author suggests asking the assistant to clone https://github.com/konlu/story-studio into its skills folder.

## What runs on the user's machine
- Code on the machine: yes (voice, transcription, image checks, JianYing drafts and word counts (pure writing needs no setup))
- Network: optional
- Zip installer: Copies the folder into a skills folder under your home and runs the setup check, which downloads nothing and writes no settings.
- Setup, when you agree (bootstrap install): With no Python 3.10+, downloads uv 0.13.5 from GitHub, checks its SHA-256 and installs a private Python 3.11. Then, per step: pip installs pyJianYingDraft 0.3.1, Pillow, NumPy and websockets 15.0.1 into a private venv; Node.js LTS from nodejs.org (checksum checked) and npm installs Coli 0.0.20; FFmpeg and libmediainfo via brew, or sudo -n apt-get, or the gyan.dev build on Windows. Everything goes to ~/.local/share/story-studio or %LOCALAPPDATA%\story-studio; global PATH is not changed.
- Windows setup with -InstallJianying: Installs JianYing Pro silently with winget, accepting package and source agreements; without winget, downloads the vendor installer named in Microsoft's winget manifest and checks its SHA-256.
- Setup with --with-imagegen: Fetches OpenAI's imagegen instructions from the openai/skills main branch (not pinned to a commit) into your skills folder if missing.
- Voice settings: voice_settings.py saves voice.json (speaker, resource, speed) and, if you allow, the key file in the data folder.
- Doubao voice, after you confirm: doubao_tts.py opens one WebSocket to openspeech.bytedance.com with your key in the X-Api-Key header and sends the whole narration text. Writes narration.mp3 and narration.voice.json (hashes, no key) and checks the file with ffprobe and ffmpeg. Refuses without --voice-confirmed or if the MP3 already exists.
- Transcription: Runs Coli locally on the final MP3 and writes coli_asr.json, transcript.srt and timing files to a new folder. The first transcription may download a speech model; audio is not uploaded.
- JianYing draft: export_jianying.py writes a new project folder into JianYing's drafts folder (found from its settings or the standard place, e.g. ~/Movies/JianyingPro/... on macOS), copies your images and audio into it, and writes jianying_draft.json and resolved_plan.json next to plan.json. --overwrite keeps the old project as a backup.
- Local MP4 (only if asked): render.py renders final.mp4 with ffmpeg next to plan.json.
- Pictures: No image code in the pack: your assistant's own image tool draws them (the pack prefers GPT Image 2).
- Word count and corpus search: history_tool.py reads the bundled corpus and counts characters; standard library only, no network.

## Settings
- `DOUBAO_TTS_API_KEY`: Doubao speech key, read instead of a saved key file
- `JY_PROJECTS_ROOT`: JianYing drafts folder (also --drafts-root)
- `COLI_BIN`: path to the Coli program
- `STORY_STUDIO_CONFIG`: where runtime.json lives; must be outside the skill folder
- `XDG_DATA_HOME`: base of the data folder on macOS and Linux

## Examples (from the pack's own files)
- The timeline plan behind every JianYing draft: output format defined in modules/render-history-video/references/plan.md

## Author's numbers (as reported, not run by AgentGid)
- A built-in reference library of 370+ high-like short-video scripts. Source: konlu/story-studio/README.md
- The historical style was learned from 57 high-like scripts of 4 accounts. Source: konlu/story-studio/modules/history-writing/GUIDE.md

## How to tell it works
Ask in Chinese for a script only, for example "使用 $story-studio，只写一篇关于「林巧稚」的人物故事口播稿。". You should get a script with its real character count and a fact table, and no setup or voice step. That shows the write switch works on its own.

## Related
- GuanYixuan/pyJianYingDraft
- marswaveai/coli
- k2-fsa/sherpa-onnx
- openai/skills
- astral-sh/uv

## Safety
Setup downloads and installs software on your computer without asking you to run commands: checked downloads from GitHub, nodejs.org and gyan.dev, Homebrew or sudo apt packages, and on Windows a silent JianYing install with its agreements accepted. The optional imagegen fetch is not pinned to a commit. Your Doubao key goes only to openspeech.bytedance.com; on macOS and Linux a saved key is a plain file with owner-only access.
