stitch
GitHub用于在浏览器中播放由静态图片、对话、音乐和视频组成的序列。支持本地或远程文件,可添加字幕、背景音乐及设置画面比例,提供预览和导出功能。
Trigger Scenarios
Install
npx skills add openstory-so/openstory --skill stitch -g -y
SKILL.md
Frontmatter
{
"name": "stitch",
"metadata": {
"opencode\/slash": "true"
},
"description": "Play stills, dialogue, music, and video as one sequence in the browser with the stitch command. Use when the user runs \/stitch, or asks to stitch, preview, or play a cut from local or remote (http(s) URL) image, audio, and video files.",
"argument-hint": "[--frame 9:16] [--music file] [--subs file.srt] <image-or-video> [--poster file] [--fallback file] [--audio file] [--seconds n] [--cue start-end text]...",
"user-invocable": true
}
stitch
/stitch runs the stitch command and leaves it running. The page it opens is the player.
Command
From the directory that holds the files, with paths that reach them, or with http(s) URLs anywhere a file goes:
npx @openstory/stitch@latest \
--frame 9:16 \
--music score.mp3 --music-gain -3 \
--subs lines.srt \
shot.mp4 --poster board.png --cue 0-1.5 "Love that accent." \
board.png --audio line.wav --seconds 3 --cue 0-2 "Coming over?"
- Put the stills and videos in play order. Each is a path or an
http(s)URL. The command reads a URL itself and serves it to the page from its own origin, so a remote without CORS headers still plays and exports. - A
.mp4,.webm, or.movis a video. Its dialogue is the audio inside the file. Do not pass--audiofor a video. - A
.png,.jpg,.jpeg, or.webpis a still. The command reads its width and height. --audioadds a line (a.wav,.mp3,.m4a, or.ogg) to the still before it. Repeat it for another line. The still stays up for the longer of--secondsand that sound.--secondsdefaults to 4.--cue START-END TEXTis a subtitle on the clip before it. Quote the text. Times are seconds from the start of that clip.--subs lines.srt(or.vtt) is one subtitle file for the whole cut. Times in the file are from the start of the first clip. A cue that crosses a cut is split onto both clips. Use this instead of one--cueper line when a file already exists.--posteris the still shown while the cut opens. It belongs on an opening video.--fallbackis the picture tried when the still before it fails to load.--musicis the bed under the whole cut, a.wav,.mp3,.m4a, or.ogg.--music-gainchanges only that bed, in dB. It defaults to 0. The page can turn that bed off; dialogue stays.--frame 9:16(or1080x1920) is the shape of the page. Give it when the shape is known: without it the command reads the first clip to find out. Every clip is fitted into that box.- Run that
npxcommand and give the user thehttp://127.0.0.1:URL it prints. Leave the process running until they are done.--no-openskips opening a browser.
Installing this command
Prefer the OpenStory plugin, which includes this skill plus create-style and create-sequence: npx skills add openstory-so/skills. Grok, Claude Code, Codex, and the ChatGPT desktop app install that repo as a marketplace plugin named OpenStory. If /stitch is missing, tell the user to install the plugin.
npx @openstory/stitch@latest skill copies this skill and the player contract into .agents/skills/ and .claude/skills/. --global copies both trees into the home directory.
Embedding the player
Wiring StitchedPlayer, a PlaybackClip list, music, or an MP4 export is the stitch-player skill. Read that skill before writing a clip list.
Version History
- 85b16bc Current 2026-10-18 17:16
Dependencies
-
suggested
openstory-so/skills


