itwanger/vibe-science / skills/one-minute-remotion
one-minute-remotion
VerifiedVibeScience:把小学、初中、高中的数理化生知识点或 AI 概念做成1至2分钟中文科普视频,覆盖写稿、自选音色配音、连续动画、手机端字幕和MP4。文字稿保存到one-minute/,超时保留全文。“下一步”只推进一个阶段,配音完成后停下供试听。用于知识点短视频、一分钟或两分钟科普、课堂概念短片、写或润色one-minute目录稿件,或明确调用one-minute-remotion;普通长视频不属于本技能范围。
scripts/start_studio.py
View on GitHub#!/usr/bin/env python3
"""Start Studio in a detached session; return without waiting for server exit."""
import argparse
import json
from pathlib import Path
import shutil
import socket
import subprocess
import sys
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--project', required=True, type=Path)
parser.add_argument('--shared-video', required=True, type=Path)
parser.add_argument('--port', required=True, type=int)
args = parser.parse_args()
project = args.project.expanduser().resolve()
entry = args.shared_video.expanduser().resolve() / 'tools/remotion.mjs'
node = shutil.which('node')
if not node or not entry.is_file() or not (project / 'project.json').is_file():
parser.error('Need node, shared tools/remotion.mjs and project/project.json')
if not 1 <= args.port <= 65535:
parser.error('Port must be between 1 and 65535')
try:
with socket.create_connection(('localhost', args.port), timeout=1):
parser.error('Port already in use; verify/reuse the existing project service or choose a free port')
except OSError:
pass
folder = project / 'preview/studio'
folder.mkdir(parents=True, exist_ok=True)
log = folder / 'studio.log'
state = folder / 'studio.json'
# Keep each launch record, including failed attempts, for diagnosis.
if state.exists():
parser.error('Studio launch record exists; inspect its PID, log and readiness before starting again')
with log.open('ab') as output:
child = subprocess.Popen(
[node, str(entry), 'studio', '--project', str(project), '--port', str(args.port)],
cwd=project, stdin=subprocess.DEVNULL, stdout=output,
stderr=subprocess.STDOUT, start_new_session=True,
)
record = {
'status': 'starting', 'pid': child.pid, 'project': str(project),
'port': args.port, 'candidateUrl': f'http://localhost:{args.port}',
'log': str(log), 'state': str(state),
'next': 'Check log, listening port and HTTP response; do not wait for the server process to exit',
}
state.write_text(json.dumps(record, ensure_ascii=False, indent=2) + '\n')
print(json.dumps(record, ensure_ascii=False, indent=2))
return 0
if __name__ == '__main__':
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |