音乐先行、踩点剪辑的电影感意境短视频生成器(Seedream+Kling)。Music-first, beat-synced cinematic MV generator — a Claude Code skill.
SaferSkills independently audited compose-cinematic-mv (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Turn a text intention (a mood / imagery / scene idea) plus music into a short vertical cinematic MV: design an original scene → first-frames with Seedream 4.0 (text-to-image) → motion with Kling (image-to-video) → cut the shots on the music's beats with ffmpeg. The aesthetic is modeled on Xiaohongshu creator Rainshae (lone figure in a vast landscape, cold cinematic mood, 3:4) — see reference/style-patterns.md.
The feeling comes from cuts riding the music, with short information-dense shots — not from pretty stills alone. So this skill is music-first and beat-synced.
ffmpeg/ffprobe, curl, openssl, bc.~/.config/rainshae-mv/credentials.env (chmod 600): ARK_API_KEY (Volcengine Ark / Seedream), KLING_AK, KLING_SK (Kling open platform). Source it: set -a; . ~/.config/rainshae-mv/credentials.env; set +a.ark.cn-beijing.volces.com and api-beijing.klingai.com — see Network gotchas below; a local proxy will break these unless bypassed.From the user's intention, invent a NEW scene in the Rainshae idiom (title formula {年份},你{第二人称处境}, lone figure / vast nature / strong mood / 3:4). Do not reproduce the reference creator's specific scenes (no "英国白崖", "长安", etc.). Read reference/style-patterns.md and skim ~/Documents/xhs-rainshae/Rainshae_视频提示词反推.md for the pattern, then create fresh.
Pick a background track that fits the scene's mood before planning shots. Reference the example videos for what fits: slow (~60–80 BPM), solo piano / ambient / strings, melancholic-serene ("深夜疗愈"), with phrase rise-and-fall (not a static drone).
78_ or containing gbia) have heavy surface hiss — denoise can't save them. Prefer modern/clean uploads. Verify the noise floor before committing: the quietest 0.5s RMS should be very low for a clean digital recording (≲ −60 dB); a noisy 78 sits around −40 dB. Check with:ffmpeg -v error -i x.mp3 -af "aformat=channel_layouts=mono,asetnsamples=22050,astats=metadata=1:reset=1,ametadata=print:key=lavfi.astats.Overall.RMS_level:file=nf.txt" -f null - ; grep RMS_level= nf.txt | sed -E 's/.*=//' | sort -n | head -1
ffmpeg -ss <start> -t 26 -i src.mp3 -af "loudnorm=I=-16:TP=-1.5,afade=t=in:st=0:d=1.2,afade=t=out:st=23.5:d=2.5" -ar 44100 -ac 2 excerpt.mp3
scripts/find_beats.sh excerpt.mp3 → space-separated beat times. These are your cut points.For each shot write a model-ready English image prompt (subject, setting, era, framing, light, palette, mood, lens, film grain) ending in the right aspect. Generate concurrently (Seedream allows it):
set -a; . ~/.config/rainshae-mv/credentials.env; set +a
scripts/gen_image.sh "<prompt s1>" shot1.jpeg &
scripts/gen_image.sh "<prompt s2>" shot2.jpeg &
... ; waitView each frame (Read tool) and regenerate any that miss before spending video credits.
Submit up to 5 concurrent tasks; generate short single clips (duration 5, matching the ~2–3s shots — cheaper and fits fast cutting). Poll every ~6–8s.
scripts/kling.sh submit shot1.jpeg "<video prompt s1>" kling-v1-6 5 # -> task_id
# ...submit all, collect task_ids, then poll each until task_status=succeed
scripts/kling.sh poll <task_id> # -> url when done
curl --noproxy '*' -o clip1.mp4 "<url>" # CDN needs --noproxyParse with grep (avoid python, see gotchas): status grep -oE '"task_status":"[a-z]+"'; url grep -oE '"url":"[^"]+"'.
Build plan.tsv (one line per shot, in order): clip<TAB>inpoint<TAB>duration, where the cumulative durations equal your chosen downbeat cut points. Then:
scripts/assemble.sh plan.tsv excerpt.mp3 out.mp4Verify: probe duration, extract a couple frames at cut boundaries (Read) to confirm each cut changes the image. Deliver the mp4 (or give its path if file-delivery is unavailable).
HTTPS_PROXY=127.0.0.1:7890), TLS to volces.com/klingai.com gets reset. Fix on their side: rule mode + DIRECT rules for volces.com and klingai.com. For downloads, always curl --noproxy '*' — result CDNs (kechuangai.com for Kling, Ark image CDN) are NOT covered by those rules and the proxy MITMs them (self-signed-cert / truncated downloads).PermissionError: Operation not permitted on stdlib import (_path_importer_cache). All scripts here are python-free. (If you do use python for SSL, python.org's interpreter lacks CA certs → ssl.create_default_context(cafile="/etc/ssl/cert.pem").)find_beats.sh uses an ffmpeg RMS envelope.1303 parallel task over resource pack limit. Submit in batches of ≤5: poll+download the first batch, then submit the next.ModelNotOpen). Kling: the API resource pack must be purchased (1102 Account balance not enough) — distinct from klingai.com consumer credits.com.apple.quarantine/provenance and the sandbox denies access (Operation not permitted) — keep a run's working files together and don't depend on re-reading prior-session media.doubao-seedream-4-0-250828; Kling kling-v1-6 (std). Endpoints: ark.cn-beijing.volces.com/api/v3/images/generations, api-beijing.klingai.com/v1/videos/image2video.SKILL.md — this playbook.scripts/find_beats.sh — audio → downbeat times (ffmpeg RMS envelope).scripts/gen_image.sh — Seedream 4.0 text-to-image (curl); run in parallel.scripts/kling.sh — Kling image-to-video submit/poll (openssl JWT).scripts/assemble.sh — beat-synced assembler: (clip, in-point, duration) shots + music.reference/style-patterns.md — the Rainshae style规律 (title/visual/pacing/music) for creating original scenes.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.