Convert reference videos into a standard reverse-engineering package that users can review directly and downstream generation Skills can consume. By default, only analyze and verify; do not call paid generation, do not upload the original video, and do not publish assets.
Before starting
- Confirm that the video provided by the user is readable and the authorization boundaries. When the user does not specify an output directory, directly use the current workspace under
outputs/100x-video-reverse/<video-stem>-<timestamp>/, do not ask additional questions for directory selection; always read the source file only and output to a new independent directory. - Always read workflow.md、output-contract.md and native-output.md. When performing model analysis, then read analysis-prompt.md. When involving commercial copy, dense editing, external uploads, or preparing to hand off to the generation stage, read failure-gates.md. Only read golden-baseline.mdwhen evaluating, replacing, or upgrading this Skill. By default, delivery is deterministically generated by
scripts/digest.pyfrom the machine package; the Agent does not manually rearrange segments. - Check
ffmpeg、ffprobe、Pythonjsonschemaand local read/write permissions. Whenjsonschemais missing, the validator must hard stop; only supplement dependencies in an isolated environment, do not perform global installation. Before calling any external model, verify the official model list and input limits in real time; user-specified models take priority. If verification cannot be performed, stop external calls, but continue completing the local evidence package.
Execution flow
- Use
scripts/prepare_evidence.pyto establish source file fingerprints, specifications, dual-threshold cut point proposals, dense frames, and independent audio tracks. Automatic cut points are only diagnostic signals, not true shot boundaries. - View the complete video and the evidence package at the same time, prioritize using the current Agent's existing local media understanding capabilities, and do not require the user to configure an additional API. Only when the current task has explicitly authorized external semantic analysis may the golden-sample Google official
gemini-3.7-flashbe used; before calling, the real ID and video input capability must be verified from the official model list. If unavailable, retain the original error and stop the external stage; do not silently switch to an old model. Correct the shot timeline according toreferences/analysis-prompt.md, distinguish observable facts, inferences, and unknowns, and do not replace semantic shot cutting with fixed intervals. - Establish stable asset IDs and cross-shot consistency anchors, covering people, products, scenes, props, costumes, audio, and text. Brands, prices, efficacy, dialogue, and on-screen text that cannot be seen or heard clearly must not be filled in.
- Generate the complete
reverse.json: shots, four types of keyframes, asset references, audio/subtitles, general prompts, model-adapted prompts, segmented plans, stitching instructions, andmust_not_change. Each segment must also includeexecution_plan: target duration, generation status, selected model, generation method, and input materials; when model capabilities have not been verified in real time, explicitly writeneeds_model_selection, and must not disguise it as executable. - Use
scripts/materialize_reverse_media.pyto materialize shot frames and asset screenshots to relative paths within the package, and generatematerialization_manifest.json. Existing media may be reused only when the source SHA-256, request timestamp, and file SHA-256 all match the provenance; otherwise hard stop, do not overwrite. - Use
scripts/validate_reverse_package.pyto perform media and contract prechecks. Hard errors must be fixed before continuing; warnings must be retained and explained, and must not be changed to pass. - After strict verification passes, run
scripts/digest.py, then deliver as-is according to native-output.md . Codex uses--format fragment --fragment-dir <本轮 thread 可视化目录>: The first tab is a narrow 9:16 player on the left + a segmented asset board on the right, with each segment fixedly showing the first frame/highlight frame/last frame of the same group; images can be dragged out for JPEG preview, and when the original image is needed, copy the original frame path within the package. "Shot positioning" retains per-shot linkage; clicking any of the three frames or a shot will pause and position the video, first showing Chinese operation instructions, then showing the English generation prompt of the segment to which it belongs. On narrow screens it changes to a vertical structure but the three frames remain in the same group. Other clients default to using--format md; when client capabilities cannot be determined, do not gamble on inline protocols.
When the user gives viewing feedback, map each piece of feedback to a specific shot, asset, or prompt field, and clearly mark it as "user preference/correction"; do not reverse-map it into observed facts about the source video. Create a new revision package, change only the affected fields and media, then fully verify; do not overwrite the previous version.
Command
python <skill-root>\scripts\prepare_evidence.py --video <source.mp4> --out <new-package-dir>
python <skill-root>\scripts\materialize_reverse_media.py --video <source.mp4> --package <new-package-dir>\reverse.json --source-manifest <new-package-dir>\source_manifest.json
python <skill-root>\scripts\validate_reverse_package.py --package <new-package-dir>\reverse.json --source-manifest <new-package-dir>\source_manifest.json --require-media --report <new-package-dir>\validation.json
python <skill-root>\scripts\digest.py --package <new-package-dir> --format md
# Codex 内联;多包时改用 --out-root,自动生成 1 个批次总览 + N 个独立详情
python <skill-root>\scripts\digest.py --out-root <batch-root> --format fragment --fragment-dir <thread-visualization-dir>
<new-package-dir> must not exist or must be empty. Do not use --out to point to the source video directory.
Boundaries that must not be crossed
- Passing validation for a reverse-engineering package only means the structure, evidence, and references are executable; it does not mean the final video's visual similarity meets the standard.
- Do not generate, retry generation, do post-production, or score within this Skill. These should be handled by an independent Skill consuming this output contract.
- The Agent's native reply is only
reverse.jsonand the presentation layer for media within the package, not a second source of business truth; any revision should first change the machine package, then refresh the current reply. - Clicking a shot displays the prompt of the generation segment to which that shot belongs; the generation unit of the machine contract is the segment, and it must not falsely claim that independent per-shot prompts exist.
- Operational labels, statuses, asset categories, and generation methods visible by default use Chinese; model IDs, asset IDs, verbatim evidence, and English generation prompts retain their original values. If the human-readable fields of a historical package are in English, only prompt and retain the original text; do not fabricate translations via digest.
- Do not write "fixed 10-second slices" as shot truth because of a vendor's current limitations. Prioritize segmentation by real shots and narrative boundaries; the validator's 10 seconds is only a configurable downstream compatibility warning.
- Without explicit authorization, do not upload local videos to public URLs, object storage, or third-party services.
- Do not copy candidate code with unclear licensing or contrary usage; only absorb methods and failure lessons verified on the same sample.
Completion criteria
At completion, the following must exist:source_manifest.json、evidence/evidence_manifest.json, evidence media,reverse.json、materialization_manifest.json and validation.json; strict media validation has zero hard errors. The first tab of the Codex fragment must display a full-duration preview; the desktop version uses a narrow player column + wide segmented asset board, with each segment fixedly having three slots: first/highlight/last, kept in the same group, and missing assets shown as error slots. Dragging the three frames must produce at least usable JPEG files, and the original images are obtained by copying paths within the package; clicking the three frames or a shot can locate and view the prompt of the segment to which it belongs. The operational default layer uses Chinese, English prompts are expanded as needed; the other five blocks are then expanded. For multiple packages, a lightweight batch overview must first be given, then independent details for each by number; failed entries must not disappear. The machine package path must still be given in the body.--legacy-unverified-media is only allowed for auditing historical packages and is prohibited for new handoffs.
Known limitations
- The "original film" within the fragment is a budget-compliant full-duration low-bitrate H.264/AAC presentation copy, not a second source file; the original path and SHA-256 are still based on
source_manifest.json. A single fragment is subject to a 1 MB limit; when it cannot fit, explicitly degrade to frame images and do not truncate the video. - What fragment drags out directly is a budgeted JPEG preview derivative, not the original frame inside the package; dragging also provides the browser
File、ChromiumDownloadURL, data URI, and original frame path. Whether the target application accepts the corresponding drag-and-drop format is still up to it; to obtain the original image losslessly, use "Copy original frame path". - The Claude Code Artifact path has not yet undergone real host acceptance; it cannot be confirmed that rendering falls back to
--format md。