Skip to content

zenstory-ai/video-recap-skills / skills/video-recap

video-recap

Verified

把一段或多集视频做成带画框字幕的中文解说成片或纯原声高光短片。用户提供 .mp4 / .mov / .mkv / .webm,要求做影视解说、短剧二创、加旁白配音、跨集混剪或导出剪映草稿时使用;串联完成看片识台词、定主线与留原声、按台词停顿切镜头、写词检查、TTS 配音与混音加字幕。触发词:视频解说、影视解说、视频旁白、生成解说、视频 recap、video recap、voiceover、narration、recap。

FileKindSize
SKILL.mdskill md18.4 KB
assets/dashboard/app.jsscript16.2 KB
assets/dashboard/index.htmlother867 B
assets/dashboard/styles.cssother22.6 KB
assets/dashboard/tokens.cssother8.9 KB
assets/dashboard/views.jsscript31.4 KB
references/audio-modes.mdmarkdown3.6 KB
references/config-playbook.mdmarkdown8.1 KB
references/creative-editing-playbook.mdmarkdown12.3 KB
references/data-schema.mdmarkdown34.6 KB
references/index-tts.mdmarkdown2.1 KB
references/jianying/LICENSE.duo-videoother1.0 KB
references/jianying/SOURCE.mdmarkdown703 B
references/jianying/empty_draft_meta_info.jsonconfig1.7 KB
references/jianying/empty_jy_material_video.jsonconfig1.8 KB
references/jianying/empty_jy_meta_material_value.jsonconfig358 B
references/jianying/empty_jy_project_info.jsonconfig3.6 KB
references/jianying/empty_jy_segment.jsonconfig1.3 KB
references/jianying/empty_jy_text_styles.jsonconfig440 B
references/jianying/empty_yj_material_audio.jsonconfig865 B
references/jianying/empty_yj_material_text.jsonconfig2.4 KB
references/packaging.mdmarkdown6.8 KB
references/promotional-copy.mdmarkdown4.1 KB
references/prompt-templates.mdmarkdown2.0 KB
references/research-guide.mdmarkdown2.7 KB
references/resource-library.mdmarkdown12.1 KB
references/shot-review.mdmarkdown4.8 KB
scripts/agent_text.pyscript2.7 KB
scripts/artifacts.pyscript972 B
scripts/asr.pyscript12.5 KB
scripts/asr_timing_evidence.pyscript4.2 KB
scripts/assemble.pyscript31.0 KB
scripts/assemble_constants.pyscript894 B
scripts/assembly_contract.pyscript10.3 KB
scripts/assembly_settings.pyscript3.8 KB
scripts/audio_automation.pyscript6.6 KB
scripts/audio_mix.pyscript18.5 KB
scripts/briefing/__init__.pyscript101 B
scripts/briefing/builder.pyscript31.1 KB
scripts/briefing/context.pyscript6.1 KB
scripts/briefing/timeline.pyscript23.0 KB
scripts/codec_peak.pyscript5.1 KB
scripts/cut.pyscript148 B
scripts/cut_cli.pyscript12.4 KB
scripts/cut_contract.pyscript13.3 KB
scripts/cut_qc.pyscript1.9 KB
scripts/cut_render.pyscript13.2 KB
scripts/dashboard/__init__.pyscript159 B
scripts/dashboard/data.pyscript24.6 KB
scripts/dashboard/io.pyscript7.1 KB
scripts/dashboard/runs.pyscript21.8 KB
scripts/dashboard/templates.pyscript9.6 KB
scripts/dashboard_server.pyscript9.3 KB
scripts/detect.pyscript22.2 KB
scripts/doctor.pyexecutablescript12.9 KB
scripts/entry_suggestion.pyscript4.6 KB
scripts/export_jianying.pyscript5.6 KB
scripts/extract.pyscript2.5 KB
scripts/final_qc.pyscript19.0 KB
scripts/frame_grid.pyscript10.6 KB
scripts/jianying/__init__.pyscript49 B
scripts/jianying/builders.pyscript11.3 KB
scripts/jianying/model.pyscript2.7 KB
scripts/jianying/optional.pyscript1012 B
scripts/jianying/schema.pyscript2.5 KB
scripts/jianying/templates.pyscript1.0 KB
scripts/jianying/timeline_contract.pyscript5.8 KB
scripts/jianying/tracks.pyscript2.0 KB
scripts/jianying/writer.pyscript7.8 KB
scripts/lib.pyscript29.6 KB
scripts/library.pyscript31.1 KB
scripts/lint_summary.pyscript5.0 KB
scripts/loudness.pyscript14.7 KB
scripts/materials.pyscript22.1 KB
scripts/media.pyscript18.8 KB
scripts/narration_audio.pyscript13.5 KB
scripts/narration_lint.pyscript24.1 KB
scripts/narrative_selection.pyscript8.9 KB
scripts/packaging.pyscript6.1 KB
scripts/packaging_fonts.pyscript12.0 KB
scripts/packaging_plates.pyscript31.2 KB
scripts/packaging_studio.pyscript34.1 KB
scripts/providers/__init__.pyscript72 B
scripts/providers/fish_audio.pyscript3.1 KB
scripts/providers/index_tts.pyscript8.8 KB
scripts/recap.pyscript183 B
scripts/recap_cli.pyscript6.9 KB
scripts/recap_inspect.pyscript16.5 KB
scripts/recap_runner.pyscript22.0 KB
scripts/recap_runtime.pyscript11.8 KB
scripts/recap_source.pyscript1.8 KB
scripts/recap_stage_qc.pyscript2.7 KB
scripts/recap_timeline.pyscript7.7 KB
scripts/render_preflight.pyscript1.7 KB
scripts/resources/__init__.pyscript200 B
scripts/resources/lock.pyscript6.8 KB
scripts/resources/project_binding.pyscript16.1 KB
scripts/sentence_boundaries.pyscript28.8 KB
scripts/sentence_gate.pyscript8.6 KB
scripts/sfx_mix.pyscript14.6 KB
scripts/shot_review.pyscript18.9 KB
scripts/source_subtitles.pyscript7.2 KB
scripts/speech_ownership.pyscript9.3 KB
scripts/storyboard.pyscript21.8 KB
scripts/subtitles/__init__.pyscript56 B
scripts/subtitles/core.pyscript19.0 KB
scripts/subtitles/render.pyscript8.0 KB
scripts/timeline.pyscript8.2 KB
scripts/timeline_emit.pyscript5.4 KB
scripts/tts_audio.pyscript9.6 KB
scripts/tts_cache.pyscript4.5 KB
scripts/understand.pyscript171 B
scripts/understanding_brief.pyscript6.3 KB
scripts/understanding_cache.pyscript8.0 KB
scripts/understanding_runner.pyscript9.8 KB
scripts/understanding_storyboard.pyscript11.9 KB
scripts/validate.pyscript5.7 KB
scripts/visual_render.pyscript10.1 KB
scripts/vlm.pyscript16.4 KB
scripts/voiceover.pyscript28.0 KB

scripts/understanding_brief.py

View on GitHub
"""Format research context and rebuild briefs from cached analysis."""

import json

from pathlib import Path

from lib import log, load_background_research
from asr_timing_evidence import asr_evidence_summary_for_brief


from detect import detect_speech_boundary_anchors


from briefing.builder import build_agent_brief
from briefing.context import _clip_text, normalize_background_research


from understanding_cache import _load_json
from understanding_storyboard import (
    _generate_edited_storyboard,
    _generate_source_storyboard,
    _prepend_storyboard_brief_header,
)


def _research_context(work_dir):
    """Fold background_research.json into a compact context string for the VLM prompt.

    The agent does story research first (per references/research-guide.md) and writes
    work_dir/background_research.json; this surfaces synopsis, named characters,
    relationships, plot arcs, and cultural notes so scene VLM analysis can name people
    and read scenes with plot knowledge instead of labelling everyone "黑衣男子".
    Returns "" when no usable research file is present, so behaviour is unchanged.
    """
    data = load_background_research(work_dir)
    if not data:
        return ""
    data = normalize_background_research(data)
    parts = []
    for key in ("synopsis", "episode_context", "worldbuilding"):
        val = _clip_text(data[key], 320)
        if val:
            parts.append(val)
    chars = data["characters"]
    if chars:
        named = ";".join(
            f"{_clip_text(name, 40)}({_clip_text(desc, 120)})"
            for name, desc in list(chars.items())[:12]
            if _clip_text(name, 40)
        )
        if named:
            parts.append("主要人物:" + named)
    details = data["character_details"]
    if details:
        detail_lines = []
        for name, info in list(details.items())[:8]:
            bits = []
            clean_aliases = [_clip_text(alias, 30) for alias in info["aliases"][:3]]
            clean_aliases = [alias for alias in clean_aliases if alias]
            if clean_aliases:
                bits.append("别名" + "/".join(clean_aliases))
            role = _clip_text(info["role"], 60)
            if role:
                bits.append(role)
            clean_rels = [_clip_text(rel, 60) for rel in info["relationships"][:3]]
            bits.extend(rel for rel in clean_rels if rel)
            clean_name = _clip_text(name, 40)
            if clean_name and bits:
                detail_lines.append(f"{clean_name}({';'.join(bits)})")
        if detail_lines:
            parts.append("人物关系:" + ";".join(detail_lines))
    arcs = data["plot_arcs"]
    if arcs:
        arc_lines = []
        for arc in arcs[:6]:
            name = _clip_text(arc.get("name"), 50)
            desc = _clip_text(arc.get("description"), 120)
            status = _clip_text(arc.get("status"), 30)
            if name or desc:
                tail = f"[{status}]" if status else ""
                arc_lines.append(f"{name}:{desc}{tail}".strip(":"))
        if arc_lines:
            parts.append("剧情线:" + ";".join(arc_lines))
    notes = data["cultural_notes"]
    if notes:
        note_lines = []
        for note in notes[:4]:
            item = _clip_text(note.get("item"), 50)
            expl = _clip_text(note.get("explanation"), 100)
            if item or expl:
                note_lines.append(f"{item}:{expl}".strip(":"))
        if note_lines:
            parts.append("背景注释:" + ";".join(note_lines))
    return " ".join(parts).strip()[:1200]


def _load_understanding_artifacts_for_brief(work_dir):
    """Load existing analysis artifacts for a brief-only regeneration pass.

    Material-library restores are allowed to reuse expensive analysis artifacts,
    but cut pass 2 must still rebuild `agent_narration_brief.md` against the
    rendered OUTPUT timeline. This helper deliberately performs no extraction,
    ASR, VLM, or external API calls; it only reads already-present JSON. An absent
    artifact contributes [] (the brief documents the thin substrate); a corrupt one raises.
    """
    work_dir = Path(work_dir)

    def _own(name):
        path = work_dir / name
        return _load_json(path) if path.exists() else []

    return _own("vlm_analysis.json"), _own("asr_result.json"), _own("silence_periods.json")


def _write_brief_from_existing_artifacts(video, work_dir, args, video_duration):
    """Regenerate only the agent brief from existing artifacts."""
    scenes, asr_result, silence_periods = _load_understanding_artifacts_for_brief(
        work_dir
    )
    if not (Path(work_dir) / "speech_boundary_anchors.json").exists():
        detect_speech_boundary_anchors(work_dir, asr_result)

    _finish_brief(
        video, work_dir, args, video_duration,
        storyboard_scenes=scenes, brief_scenes=scenes,
        asr_result=asr_result, silence_periods=silence_periods,
        status="brief_only", done_label="brief-only 完成", force=False,
    )


def _finish_brief(
    video, work_dir, args, video_duration, *, storyboard_scenes, brief_scenes,
    asr_result, silence_periods, status, done_label, force,
):
    """Storyboards, writing brief and the JSON status line."""
    work_dir = Path(work_dir)
    source_storyboard = None
    scenes_json = work_dir / "scenes.json"
    if scenes_json.exists():
        source_storyboard = _generate_source_storyboard(
            work_dir, Path(video), storyboard_scenes, scenes_json, force=force
        )
    edited_storyboard = _generate_edited_storyboard(work_dir, video, force=force)
    cut_mode = (work_dir / "clip_plan_validated.json").exists()

    brief_path = build_agent_brief(
        brief_scenes,
        asr_result,
        silence_periods,
        video_duration,
        work_dir,
        args.style,
        asr_evidence=asr_evidence_summary_for_brief(work_dir, video),
        extra_context=getattr(args, "context", None),
    )
    _prepend_storyboard_brief_header(
        brief_path, source_storyboard, edited_storyboard, cut_mode=cut_mode
    )
    log("=" * 50)
    log(f"{done_label}。写作 brief: {brief_path}")
    print(
        json.dumps(
            {
                "status": status,
                "work_dir": str(work_dir),
                "brief": str(brief_path),
                "scenes": len(storyboard_scenes),
                "asr_segments": len(asr_result),
            },
            ensure_ascii=False,
        )
    )
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
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: 196kUpdated Claude CodeCodexVerifiedInstall