SuperAPI AI Directory

short-drama-produce

General & other

View repository

Updated 10-16 09:30

About this skill

Produce after confirmation

This skill is only responsible for safely delivering already-written production specifications to the adapter configured in the runtime environment. Image prompts still belong to $short-drama-image-prompts, video prompts belong to $short-drama-video-prompts, dialogue and recording tables belong to $short-drama-write, voice identity belongs to $short-drama-assets。

Quick Start

Only after the user explicitly requests actual generation, take this round's prompt from the current 图片提示词.md、分镜.md or 视频提示词.md and create a bounded run job. The creator-first job's source must point to the current Markdown that owns this prompt,source_entry must name the second-level heading allowed by that document:图片提示词.md use IMG-*, 视频提示词.md use MOTION-*,分镜.md use SHOT-*(modality is image, body takes that shot's ### 冻结关键帧提示词). This selector only extracts the first frame; the last frame must first be established as an independent IMG-* state image entry by the image prompt stage, then prepare an image job from 图片提示词.md . The creator can also provide an existing starting frame— generating the image in their own tools and then putting it into the project is equally valid; when the image never enters the project, follow the storyboard's PLAN-...; after the output lands in 剧集/<EP>/制作成果/images/ , the storyboard owner can bind it as 用途:起始帧 's REF-.... When real reference images exist, you must also fill in each one's reference_bindings slot, order, path, Chinese name, purpose, and allowed/forbidden control scope; the built-in video adapter reads the 用途 field here as the vendor's own role, accepting only the values it publishes (MiniMax is first_frame/last_frame/reference_image/reference_video/reference_audio, Seedance has three reference_*); a job with reference images but no binding will fail directly, and no role will be guessed for it. Local images are sent directly by the built-in adapter as base64 data URIs, with no need to build your own upload service. MOTION-* 's "Reference Audio" lines likewise enter reference_bindingsone by one, after the images, with role fixed to reference_audio、character and copying that line's 角色; when the adapter profile does not declare acceptance of reference_audio , run fails before submission, see adapter-contract.md. When an entry's "Input Reference Image" is written as PLAN-... , those images are in the creator's own tools and no file exists in the project to send: prepare fails directly and explains to first put the real files into the project and rewrite it as REF-...; do not treat the plan as input, and do not silently drop the reference. references can be omitted and generated from the binding order, or can be an explicit mirror of the same order. The output is placed in 剧集/<EP>/制作成果/; this job is a temporary input to the production tool, not a sixth creative document:

python3 {技能目录}/scripts/production_tool.py prepare <project> --job <临时-job.json>

First show the complete preview of prepare ; at this point no vendor is called.

Hard gate

Every production run must go through the following four steps, and the order cannot be merged:

  1. Create a bounded job: one modality, an explicit quantity, a complete prompt/spec, reference files, parameters, output path, and adapter profile.
  2. Run prepare, show the complete returned preview to the creator, especially the count, prompt, source entry, reference bindings, references, outputs, overwrite, and adapter. The creator-first job will mechanically verify at this step the copyable prompt in the selected title, as well as the reference image slots, order, paths, Chinese names, and control boundaries; any drift fails closed.
  3. Wait for the creator tosee this previewand explicitly confirm. Only with explicit consent for this current task should you run confirm; "continue," "finish it all," "the budget is fine," upstream content having been accepted, or having previously confirmed another version all do not count as confirmation for this production run.
  4. Run run. It will consume one confirmation before starting the adapter; after success or failure, executing it again must require re-confirmation, to prevent a failed retry from accidentally incurring a second charge.

If any of the job, prompt, parameters, output paths, or direct inputs changes, the old confirmation immediately becomes invalid. Do not fill in confirmation on the creator's behalf. The currently confirmed job is the only unit of work for this round; after the run ends, report the result and hand back control, without automatically preparing the next batch or starting a review.

分镜.md 's "input reference image" paths are only readable grounds and usage intent at the creation stage, not a production input snapshot. When entering production, the creator-first job must establish bindings from the corresponding entries in 图片提示词.md or 视频提示词.md ;prepare displays the authoritative reference_bindings、references and the confirmed job for which file bytes this adapter actually reads and what each is allowed to affect. Non-creator structured specs may omit source_entry/reference_bindingsand continue using only explicit references; but for new image/video jobs, as long as source points to a canonical 图片提示词.md or 视频提示词.md , the corresponding selector is mandatory and cannot be bypassed by degrading through omitted fields. Old jobs already prepared and persisted before the upgrade can still be read according to their original fingerprints. New production results are not automatically written back or used to refresh the storyboard; when they need to be changed into subsequent inputs, the storyboard owner revises the document, then establishes a new job and previews and confirms it again.

Command

Only after entering the production boundary, write the current prompt and run parameters as temporary JSON; for video and image jobs, parameters.prompt_language follows the prompt language already parsed from the current copyable body, so that the reference constraints appended by the adapter use the same language, rather than falling back again to fixed English. Do not pre-build a job for each prompt at the creation stage. For the format and adapter contract, see adapter-contract.md. The command is provided by production_tool.py , then run:

python3 <本技能目录>/scripts/production_tool.py prepare <project> --job <job.json>
python3 <本技能目录>/scripts/production_tool.py confirm <project> --job-id <id> --confirmation "CONFIRM <id> <code>"
python3 <本技能目录>/scripts/production_tool.py run <project> --job-id <id> --adapter-config <outside-project-config.json>
python3 <本技能目录>/scripts/production_tool.py status <project> --job-id <id>
python3 <本技能目录>/scripts/production_tool.py collect <project> --job-id <id> --adapter-config <outside-project-config.json>
python3 <本技能目录>/scripts/production_tool.py audit <project>

prepare only validates and previews, without producing.confirm only saves a one-time confirmation bound to the current job fingerprint. run actually starts the adapter.collect only retrieves the result of the task thathas already submitted and already been billed for, without resubmitting and without needing a new confirmation—see "an interruption does not mean a rerun" below.audit only reconciles local task history, recovery after failure, duplicate content attempts, and the current output bytes, does not call the vendor, and does not write technical success, file existence, or hash matches as media quality conclusions. When the same job has an unresolved running attempt, re-preparing, confirming, or running is prohibited; wait for completion first or investigate the leftover attempt.

Input selection

  • image: read the current 图片提示词.md copyable body of IMG-* , or the current 分镜.md of SHOT-* Freeze the keyframe body, add the necessary reference images and explicit output size/quantity; creator-first jobs use source_entry Lock this entry. Asset boards use IMG-*, and the starting frame of a given shot uses SHOT-*; the two do not replace each other.
  • video: Read the current 视频提示词.md of MOTION-* to copy the body, and verify the corresponding shot, keyframe, duration, and frame size in 分镜.md ; creator-first jobs use source_entry to lock this entry. When a continuous segment chooses to continue from the previous segment's generated result, the next segment's job binds both the previous segment's actual video and the actual tail frame taken from that video, and preserves continuity_video、actual_tail_frame 's distinct responsibilities; the vendor role is translated by the target model adapter. This set of H3 inputs is uniformly translated as reference_video + reference_image, and must not be conflated into reference_video + first_frame; do not substitute a planned tail frame or textual description for the real file.
  • tts: Read the original line and performance requirements from 剧本.md ; the voice reference is explicitly provided by the user or existing media. Do not change the wording in a production job, and do not create a sixth creative document for TTS. The performance requirements come from this line's parenthetical notes and context: when the execution end accepts natural-language tone, write a tone description before the line (“suppressed voice, gritting teeth, respond: yes.”), and attach the same reference timbre to each line of the same character; when it only accepts an enumerated emotion, map to the nearest option, then fine-tune with intensity and pitch. When only timbre is given and no tone, short-drama lines will be read in an announcer's voice.
  • music: Read the timeline music chapters already confirmed by the creator in 视频提示词.md ; theme songs use confirmed lyrics, and pure instrumental music carries no lyrics. When the vendor cannot precisely commit to a duration, still generate the source audio track, and $short-drama-edit completes the cue points, looping, fade-in/fade-out, and dialogue ducking according to the mixing intent in the document.

A single job does not mix modalities. Split large batches into small jobs where the creator can clearly see the quantity and cost boundaries; do not implicitly stuff an entire season into one confirmation for convenience.

Adapter Boundaries

The adapter configuration must be outside the project and contain only the argv command and timeout; credentials are read by the adapter itself from the process environment or system credential store. Project jobs, confirmation records, run records, and the Dashboard must not store secrets.

The script is invoked with a JSON stdin and an argv array, without using a shell and without concatenating commands. The adapter returns local temporary files; the tool only accepts results that exactly match the confirmed targets, and atomically copies the complete file to the project's 剧集/<EP>/制作成果/ directory. Projects and upstream Skills do not hard-code vendors, models, or APIs that are about to change.

The built-in image/video compiler appends a deterministic reference-semantics description (Chinese name, purpose, allowed control and disallowed control scope) to the vendor prompt in order according to the confirmed reference_bindings; it does not mistake slot names for text to be rendered into the image. External adapters must also preserve this set of semantics or explicitly reject it; they cannot merely upload files and silently lose the control boundaries.

This skill optionally provides four stdlib adapters, all selected via an adapter config outside the project, with credentials read only from the runtime environment:

  • Seedance: The model/Endpoint ID must be explicitly configured by the account; the compiler supports official image, video, and audio reference roles, and the built-in runtime still rejects local reference files when trusted upload is not configured.
  • GPT Image 2: Without a reference image, use generation; with a reference image, use edit; pin high-fidelity references and validate size, format, and transparent-background restrictions.
  • MiniMax Music: Use music-3.0 and the hex result, distinguishing the theme song from pure score, and does not forge the duration request field.
  • MiniMax voice:tts modality; both the model and voice_id must be given explicitly by the account and the documentation, with no built-in voice list. Synthesize only from preset voices, no voice cloning—cloning is a licensing issue, and reference recordings authorized by the creator go through ordinary creator input at 输入/。
  • MiniMax H3 video: the model ID, resolution set, and duration range must be explicitly configured by the account; the prompt goes into the text item of content , reference images are bound by an explicit role, and local references fail closed when there is no trusted upload. This model generates sound in the same pass as the picture; for how the wording affects it, see the target-model capability profile in the video prompt skill.

These adapters are verified request contracts, not a guarantee of account availability or generation quality; formal production must still pass through the above per-run confirmation gate, and the review Skill judges the quality of the artifacts.

The repository's bundled fixture_adapter.py is only for offline testing and does not represent real generation quality or the default production adapter.

An interruption does not mean a rerun

A video task is billed atthe moment of submission, not when the result is obtained. Everything after submission—polling for a few minutes, downloading— can be interrupted by the process being killed, a network drop, or the machine sleeping. The built-in adapter therefore writes the provider task ID into handle_paththe very first moment it gets it (earlier than the first poll), and this path is not deleted along with this attempt.

So after an interruption there are three certain actions, without having to spend another round of money:

  1. audit will report the unfinished attempt carrying the task ID as orphaned_provider_job, action is collect_before_retry;
  2. collect uses that ID to retrieve the result and mark this attempt as succeeded;
  3. only after collect also confirms that the other side has indeed failed do you go down the old path of re-confirmation and resubmission.

Do not resubmit directly when audit reports orphaned_provider_job resubmit directly—that is paying a second time for the same shot. collect not going through the confirmation gate is intentional: the gate guards against accidental spending, and collect does not spend; if it also required re-confirmation, then the easiest path after an interruption would become paying again, which is exactly what the gate is meant to prevent.

Results and review

On success, report the actual output path, media type, and run status; do not write “the adapter returned success” as a quality conclusion. After multiple tasks or retries, first run audit: terminal failures are routed per retryable , and a retry still requires a new explicit confirmation; if the output is missing or the file's hash or size no longer equals the run record, first review the current bytes or regenerate.repeated_content is only a cost and diagnostic signal, and cannot automatically determine whether a same-text retry is reasonable or not;running_attempt is a pending operational state, and audit must return attention. Failures are handled along three paths. Technical failures such as timeouts, rate limiting, and server errors may be retried with an upper limit. If the failure message names which input was rejected—prompt text, reference image, or audio—then first change that item before submitting again: if the text was rejected, rewrite that sentence, replacing “a fist smashes into the other person’s face, blood dripping down the chin” with “a fist swings and misses, the other person dodges sideways, and the cup on the table is knocked over”; if the reference image was rejected, replace it with one whose composition matches the character and whose image itself is compliant; if the audio was rejected, re-record that line. Write the changes into a new job and prepare it again, so the creator can see in the preview which item was changed before confirming; confirmation with an unchanged resubmission produces no fix, only a charge. Defects involving duplicate content go back to the corresponding prompt/spec owner. After production ends, do not automatically enter editing. When the materials are to be assembled into a final video, the user names $short-drama-edit; it only selects among existing frames, does not go back and change the job at this stage, and does not generate new materials. If quality review is needed, the report may separately hand the existing results to $short-drama-review; do not automatically start review during production calls. The Dashboard is only responsible for displaying these files and the run summary, and does not provide adapter settings or production buttons.

Installation and Maintenance

Run offline self-checks only during installation, upgrade, or troubleshooting; do not run them for ordinary creation and production preparation:

python3 scripts/selftest.py
python3 scripts/provider_adapters.py --selftest