Communitygithub.com

sci-glow-video-skill

端到端发光线描科普短视频制片工作流(60fps 确定性动画、零配音逐字字幕、BGM 频谱高潮卡点与闪避混音、双版 4K 封面、量化亮度体检与独立子智能体盲审闭环,支持多选题并行量产)。在 Lead-自媒体口播文案 与 Lead-知识讲解动画 基础上,固化文献事实核查、MP3 高潮 Drop 自动对齐、Carbon 策划 + Argon 实现双模型分工、3:4/9:16 纵向五区防撞排版、bloom 亮度护栏与 P0/P1 零缺陷放行标准。当用户要求制作硬核科普动画、发光线描科学讲解视频、跟随 BGM 高潮卡点的知识短视频,或批量生产系列科普动画时使用。

sci-glow-video-skill 是什么?

sci-glow-video-skill is a Claude Code agent skill that 端到端发光线描科普短视频制片工作流(60fps 确定性动画、零配音逐字字幕、BGM 频谱高潮卡点与闪避混音、双版 4K 封面、量化亮度体检与独立子智能体盲审闭环,支持多选题并行量产)。在 Lead-自媒体口播文案 与 Lead-知识讲解动画 基础上,固化文献事实核查、MP3 高潮 Drop 自动对齐、Carbon 策划 + Argon 实现双模型分工、3:4/9:16 纵向五区防撞排版、bloom 亮度护栏与 P0/P1 零缺陷放行标准。当用户要求制作硬核科普动画、发光线描科学讲解视频、跟随 BGM 高潮卡点的知识短视频,或批量生产系列科普动画时使用。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/zy27488/sci-glow-video-skill/tree/HEAD

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Sci-Glow Video Skill (Scientific Glow-Line Explainer Video Full Workflow)

Overview

Stably transforms a hard science topic from a "one-sentence concept" into a complete set of 60-second (or specified duration) glow-line explainer animation deliverables: a pure-text voiceover script, a literature fact-checking table, a precision-cued subtitle script, a 60fps motion-blur master MP4, horizontal and vertical 4K safe-zone covers, and platform-specific promotional copy.

Core philosophy: Hard quality gate with automatic rework (quantified brightness + zero BOM validation + independent read-only sub-agent blind review ≥ 8.5/10). Never force-render a master with P0/P1 defects or overexposed/grey frames.

Dependencies

This Skill orchestrates and builds upon the following upstream capabilities without re-implementing their underlying engines:

  • Lead-Knowledge-Animation (lead-knowledge-animation): Provides a deterministic Canvas/DOM runtime (motion.js, kit.js) and underlying scaffolding (new_film.mjs, beats.py, timeline.py, fonts.py, sfx.py, mix.py, render.mjs, cover.mjs, verify.mjs, qa_video.py, review_pack.py). From AzenYes/leaderai-media-toolkit.
  • Lead-Media-Script (lead-media-script): Provides cold-open hook grammar, relatable analogy structures, and platform-specific publishing document templates for Bilibili, Douyin, Kuaishou (Weibo Story), Xiaohongshu, and YouTube. From AzenYes/leaderai-media-toolkit.
  • uv (uv run): Runs this Skill's companion pure-standard-library CLI script scripts/sci_glow_cli.py.
  • Optional Scientific Literature Retrieval Skills (prioritized if installed in the host): pubmed-database or literature-search-openalex, used for fact-checking authoritative papers and real numerical data; if unavailable, uses web search to verify primary literature.

Quick Start

# 1. Environment and IBM Plex Sans SC 8-weight self-check (automatically throttled download if fonts missing)
uv run <skill_dir>/scripts/sci_glow_cli.py preflight --auto-fix-fonts --output work/preflight.json

# 2. Analyze the frequency spectrum of any user-provided MP3 to find top-3 drop cue points and pre-sidechain parameters
uv run <skill_dir>/scripts/sci_glow_cli.py analyze-bgm --bgm "<BGM.mp3>" --target-duration 60 --top-k 3 --output work/bgm_analysis.json

# 3. Initialize the project dual-directory structure and write safe default parameters (includes 3:4 1080x1440 and bloom 0.26)
uv run <skill_dir>/scripts/sci_glow_cli.py scaffold-project --workspace "<Project Root>" --date 20261118 --topic Optogenetics --ratio 3x4 --output work/scaffold.json

Utility Scripts

All auxiliary calculations are provided via scripts/sci_glow_cli.py. All output is written as UTF-8 without BOM JSON using the --output flag. Raw terminal logs are forbidden.

Sub-commandCore FunctionKey Required Arguments
preflightChecks Node 18+, FFmpeg, Chrome, Playwright (with hints for npmmirror + skip browser re-download), upstream dual skills, and IBM Plex 8 weights; adds --auto-fix-fonts to auto-complete missing .otf files.--output
scaffold-projectCreates Script Output/<Date Topic Explain>/ and .code/<Date Topic Animation>/ directories, runs new_film.mjs, and patches it to enable 3:4 size and bloom: 0.26.--workspace, --date, --topic, --ratio, --output
analyze-bgmDecodes an 8kHz mono wave via FFmpeg, extracts full-range RMS + <180 Hz low-frequency envelope, searches for Drop 1 (title card cue) → Breakdown → Ultimate Climax Drop, and outputs Top-K --music-start and --music-dips.--bgm, --target-duration, --top-k, --output
validate-linesValidates/removes UTF-8 BOM, checks character count at 1080px width (hook <=12 chars, subtitle <=15 chars), balanced parentheses, no end-of-sentence punctuation, 5s hook upper limit, and auto-calculates to lock total duration tail.--lines, --target-duration, --ratio, --output (optional --fix-bom, --apply-tail)
audit-qaCalls upstream qa_video.py and provides a traffic-light report and parameter prescription based on the gold fingerprint (mean 17-20, p99 >= 130, bright <= 3.5%, zero dead zones, zero flicker frames). Also generates an independent blind review prompt.--video, --film-dir, --round, --output

Workflow

When handling multi-question parallel production or a dual-model division of labor, concurrently load multi-agent-batch-playbook.md; visual and layout parameters must strictly adhere to visual-and-layout-guardrails.md.

Step 0: Pre-Work Environment Check and Music Confirmation

  1. Run preflight --auto-fix-fonts --output ...; if Playwright is missing, guide the user to execute: $env:PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD="1"; npm i playwright --registry https://registry.npmmirror.com.
  2. Music Gate: If the user specified a track, use only that track. If unspecified and no fitting track is available on this machine, actively ask the user to provide a music file path or switch to pure sound effects (do not silently skip).

Step 1: Zero-Barrier Script Writing and Primary Literature Fact-Checking (Reuses Lead-Media-Script)

  1. The first 3 seconds must hook the audience with a specific number or counter-intuitive fact, then give a relatable everyday analogy before introducing the scientific term.
  2. Fact-check against at least 2–3 primary journal sources (Nature / Science / NEJM / Cell); fabricating data is strictly forbidden.
  3. Generate a plain-text .txt script and an execution plan .md in Script Output/<YYYYMMDD Topic Explain>/.

Step 2: BGM Spectrum Drop Alignment and Precise Subtitle Duration Locking

  1. Run analyze-bgm --bgm <path> --target-duration <T> --top-k 3 --output work/bgm.json to select the best music_start_sec, and use upstream beats.py to output work/beats.json.
  2. Write work/lines.json: lock the title card T.at to Drop 1, the turning point/crisis at to Breakdown, the breakthrough moment at to Ultimate Climax Drop, and leave room for a callback/concluding image.
  3. Run validate-lines --lines work/lines.json --target-duration <T> --ratio <ratio> --fix-bom --apply-tail --output work/lines_check.json. Only proceed to run upstream timeline.py --beats work/beats.json --music-start <start> --film film/ after all checks pass green.

Step 3: Visual System Design and Deterministic Code Implementation (Reuses Lead-Knowledge-Animation)

[!IMPORTANT] Coding and visual parameters must obey visual-and-layout-guardrails.md: bloom: 0.20–0.28, K.fog: 0.024–0.028, K.hud.corner disabled, scenes.js wrapped in IIFE, transition titles using mode: 'rise', blur: 0 and delayed by +0.36s.

  1. First run scaffold-project to create the dual-directory structure.
  2. Design a non-clashing main color palette. Hand-write 3–5 layers of fine glow primitives for the specific scientific metaphor of this film in film/core.js (repeating generic box cards or stick figures is forbidden).
  3. Write film/scenes.js, film/index.html, and film/cover.html. Then pass upstream fonts.py film/ for subsetting and verify.mjs film/index.html --tol 24 for full zero-difference verification.

Step 4: Sidechain Mixing and Dual-Version 4K Cover Safe-Zone Check

  1. Write work/cues.json as UTF-8 without BOM. Run sfx.py --variants 3 and mix.py (provide --music-start and --music-dips from analyze-bgm output; target -14.0 LUFS / -1.5 dBFS).
  2. Run cover.mjs film/cover.html --out out --name <Topic> --guides. Visually inspect the images in work/Cover Check/ to ensure horizontal version key information lies strictly within the central 4:3 area (x ∈ [240, 1680]).

Step 5: 30fps Draft Quantitative Health Check + Independent Read-Only Sub-Agent Blind Review Loop

See blind-review-protocol.md for details.

  1. Render a half-resolution draft first: render.mjs film/index.html --fps 30 --scale 0.5 --out out/draft_r1.mp4 (can use --workers 8 for a single piece; for multiple concurrent pieces, strictly limit to --workers 4).
  2. Run audit-qa --video out/draft_r1.mp4 --film-dir film --round 1 --output work/qa_r1.json. If brightness or dead-zone metrics are not met, directly change parameters according to the prescription and re-render the draft.
  3. Run review_pack.py out/draft_r1.mp4 --film film/ --out out/review_r1. Spawn an independent read-only research blind review sub-agent (only allowed to read out/review_r1/, forbidden from viewing source code) to perform a 9-dimensional scoring.
  4. If any P0/P1 defects exist or average score < 8.5, it is strictly forbidden to render the 60fps master. Iterate on fixes, self-check, and re-review until all checks pass green.

Step 6: 60fps Motion-Blur Master Direct Output and Complete Delivery

  1. After the blind review passes green, render the final version only once: render.mjs film/index.html --fps 60 --blur 2 --audio work/mix.wav --out out/<Topic>.mp4.
  2. Run audit-qa and qa_video.py --sheet --ref-sheet again. Visually inspect the final contact sheet and delete out/draft*.mp4 temporary files.
  3. Following Lead-Media-Script and copy_template.md, finalize work/Script and Cover.md. Deliver the complete file package to the user, along with a list of audio segments that require human ear listening for re-recording.

Rate Limiting

  • analyze-bgm, validate-lines, scaffold-project, audit-qa are all run locally with no external network requests.
  • When preflight --auto-fix-fonts fetches missing .otf font files from the CDN, it includes a built-in cross-process OS file lock + time.monotonic() rate limiter (1.0 req/s). It implements 3 exponential backoff retries for 5xx errors, and throws a RateLimitError to abort the request upon encountering HTTP 429.

Common Mistakes

  1. PowerShell UTF-8 BOM causes mix.py to crash: PowerShell 5.1's default Set-Content -Encoding UTF8 writes the EF BB BF byte order mark. All .json files must be written by Python's encoding='utf-8', a cli tool, or [IO.File]::WriteAllText (without BOM).
  2. Using default bloom: 0.9 and mode: 'center' causes ghosting: A large glow-line subject paired with 0.9 bloom will definitely break bright > 3.5%. A center title locked to 14px blur will ruin the light-sweep transition. Must follow visual-and-layout-guardrails.md to lower to 0.20–0.28 and switch to rise (blur: 0).
  3. Chromium Worker overload and "self-reviewing" during multi-piece concurrency: For 3–4 parallel pieces, throttling with --workers 4 is mandatory. Crucially, the same context that wrote the code must never self-approve; sign-off must be exclusively delegated to the read-only blind review sub-agent via the isolated out/review_rN/ directory.

相关技能