Communitygithub.com

KLucen/-PromotionalVideoMakerSkill

制作、续作或修复高质量角色替换 PV,保留原画风、分镜、关键姿势与节奏,处理逐稿生成、遮挡、字幕和连续性,并分别验证编码与美术质量。适用于低帧率手绘 PV 和角色重绘动画;不用于普通换脸或单张立绘。

-PromotionalVideoMakerSkill 是什么?

-PromotionalVideoMakerSkill is a Claude Code agent skill that 制作、续作或修复高质量角色替换 PV,保留原画风、分镜、关键姿势与节奏,处理逐稿生成、遮挡、字幕和连续性,并分别验证编码与美术质量。适用于低帧率手绘 PV 和角色重绘动画;不用于普通换脸或单张立绘。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/KLucen/-PromotionalVideoMakerSkill/tree/HEAD/pv-character-replacement

在你喜欢的 AI 中提问

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

文档

PV Character Replacement Frame Animation – Skill for AI Agents

Migrate the original PV's drawing language, performance, and exposure schedule to a new character. The goal is “the same performance, acted by a different character”, not pasting a clean illustration onto the original background.

Frame-by-frame analysis and exposure-by-exposure compositing does not mean every video frame is independently generated. High quality comes from correct independent cels, stable character structure, believable occlusion, fully readable text, and appropriate motion rhythm; increasing the number of images or output frame rate does not guarantee these.

Quality Gates and Reference Entry Points

Before starting, continuing, or preparing the final version, read references/production-playbook.md. It defines prototyping, stage gates, recording, acceleration, and final version conditions. Quality is the default priority; if the user explicitly chooses a full draft first, deferred issues are still marked as not passed and cannot change the final version standard.

First Determine Production Conventions

Extract from user requirements and project files: source clip / production range, which characters to replace, character version and form, art style examples, audio, output specs, most recently approved version, allowed motion handling, and inspection intensity. Only ask about missing items that would block production; proceed with known preferences otherwise.

  • Default strict_source: preserve original independent cels and exposure boundaries. Do not automatically switch to fixed A/B alternation or regenerate every video frame.
  • When the user needs smooth turning of long hair or similar parts, allow adapted_motion: add model-drawn transition cels, keep total shot length and main beats, explicitly record exposure changes. Without this authorization, first solve with same-exposure recomposition at appropriate scale; if transitions are needed, explain the specific trade-offs.
  • Default per-cel structure check, group continuity check, and actual speed comparison. If the user explicitly requests “generate one round in parallel, no rework”, do it, mark as unapproved, and do not count drafts as passed.
  • Character drawing is assumed to be done using available image generation tools. If the environment has the imagegen skill, follow its tools/save workflow; if missing, state the limitation, keep the analysis and task list, and do not use programmatic drawing to fake image generation results. Call count, concurrency, and rework budget follow user requirements or task scale.

1. Fix Source and Character Baseline

Decode from the same source clip. Record canvas, frame rate/PTS, duration, and audio; do not mix screenshots from different sources for detection. Variable frame rate cannot use average fps to impersonate the original exposure table.

Establish a short character baseline: front/side/back view, face and eyes, hands and cuffs, main accessories, silhouette and color palette. When retrieving reference data, verify character, version and form, distinguish official setting from community models and derivative works, and preserve source. Use the face reference provided by the user to prioritize identity details; do not automatically increase the rendering complexity of the entire film.

First prototype the high-risk types that actually exist in the project, such as multi-character occlusion, close-up gestures, character/background near-color, text passing through clothing, titles and cut phase. Inspect the original cels, generated PNgs, old/new character matte, composite, and final encode; do not approve only the illustration. Rules passed during prototyping only cover the verified shots/files/phase; you cannot declare other shots with the same color as passed based on these.

Use a small set of representative shots to determine the original PV’s simplification level: silhouette, head-to-body ratio, color blocks, line width, shadow layers, accessory density. Reuse existing approved examples for style. Identity features must be stable; not all details of the original illustration need to be brought into the simplified line-drawing PV.

2. Split Semantics and Original Timing Axis

Distinguish between character cel changes, shot changes, and background/lyrics/particle changes. For each shot, mark the attribution and layering of characters, clothing, props, background color within the frame, occluding objects, and effects; a local red patch may be hair – do not guess it as a desktop.

Frame-by-frame detection only produces candidates; then check the original image and spatial difference to confirm. Eyes opening/closing, small hand gestures, fabric folds, silhouettes, and heavy outlines may all be independent cels. Merge only when the difference is close to compression noise and there is no consistent shape change in key local areas. Do not decide based on whole-frame average difference, sparse sampling, or “this segment probably only has two cels”. A strict threshold may split compression copies of the same cel into many candidates – do not call image generation by candidate count directly; first determine the true cel count.

Save a clear exposure table of original frame/PTS → cel ID, including single-frame transitions and loops back to the start. Analysis, differencing tools, and timing format are described in references/analysis-and-timing.md.

Character cels, camera, subtitle word changes, background, and effects each keep their own timeline. Subtitles may change words within a character hold cel; reusing a character never freezes these independent layers. Even back-of-head without face, hat brim, and exit remnants must be counted one by one; do not infer “no person” using shot group tags.

3. Assign Responsibilities to Each Reference

Each prompt must specify these distinct roles; do not write a generic “strictly reference all images”:

ReferenceDetermines
Original PV current target celShot, crop, pose, expression, gaze, visible area and occlusion
New character designIdentity, inherent hair style/color, clothing structure, distinctive features
Already approved new character cel for the same shotSimplified art style, proportions, color, persistent hair locks and accessories
Actual 2D difference image of original front/rear celsWhere changes occur, direction/magnitude, outline and fold changes
Adjacent front/rear new celsContinuous motion of long hair/clothing, occlusion and hair lock connections

The difference reference must include at least the original A/B side-by-side, magnified actual RGB difference, and two-color silhouette overlay; if necessary, supplement with local magnifications of eyes, hands, cuffs, and hair tips. Numbers can only filter, not replace the 2D image. Independent subtitles and particles should be viewed separately or masked in character detection.

Actually inspect each reference and the current crop. After character movement, full-body to close-up, or back to side, re-locate local bounding boxes. If a generated image contains extra hair locks, wrong collar, a third hand, or wrong pose, delete its conflicting full-frame reference and replace with the verified local identity anchor; writing “do not inherit” in the prompt is not enough to stop propagation.

Write changes item by item into the prompt: eyelid/eyebrow/mouth shape, hair mid-section and tips, both side shoulder seams, cuffs, hem, line pressure. Approved cels are evidence of continuity, not templates to freeze the character. Use the corresponding templates from references/prompt-patterns.md.

For proportion issues, first distinguish body posture, fabric folds, and camera zoom; a squat does not shorten the entire skirt body. When a length needs testing, fix the pose and generate a few distinguishable versions. After selection, check the transition standing → squat → rebound for the same garment. Specific constraints are in Fabric and Solid Color Check.

4. Batch Generate by Dependencies

First complete identity and style anchor frames, then generate in parallel for independent shots or key poses. Adjacent intermediate cels require both endpoints to be ready first; do not generate all cels independently from the same extreme master template.

Reuse actual repeated cels and their exposure; do not reuse frames whose expression/silhouette has changed. Cache approved assets; local repairs only regenerate affected cels and composite intervals; when the user asks for a full frame, redraw each cel completely, do not generate small components and patch them together. Each call saves the prompt, reference sequence/role, output path, and adopt/failure reason.

Output actual measured dimensions and save SHA-256 of the tool original and project copy. Do not pass the tool’s thumbnail display dimensions as actual PNG dimensions. After an interrupt, check saved jobs, versions, selections, and unmet gates; do not rerun completed cels. Distinguish parameter failure, image generation failure, and account limit by actual event; do not silently change model or channel. Parallel production is only allowed when authorized by user or applicable instructions, and each shared cel has only one owner.

When transitions are needed, constrain the intermediate position using adjacent endpoints, original difference images, and spatial overlays of new cels. Check whether the model actually draws between the two endpoints; “wrote halfway” does not equal obtaining an intermediate cel. If the model keeps copying one endpoint, reduce conflicting references, switch to explicit local editing, then return to group check.

5. Continuity and Layered Compositing

Continuity is neither changing hairstyle every frame nor permanently fixed to one side. Persistent hair locks, length, volume, accessories, and occlusion relationships should be traceable; hair roots are relatively stable, mid-section displacement is smaller, hair tips may lag. Long hair cannot mechanically copy the original short hair’s left-right extremes. Sleeves and hems should respond to the same wind, with possible amplitude/phase differences. Check loop end frame → start frame.

Keep the original background, frame lines, lyrics, props, and independent effects, and composite them according to the original timeline. Only replace the character area that needs to be changed; do not draw faces, hands, or bodies outside the original composition. Prioritize limited regions and connected empty background masks; do not delete pixels by similar color across the whole frame. Details in references/layers-and-continuity.md.

Create separate check bases for old character removal, new character retention, and independent foreground recovery; zero-error in support area may simply be missed faces/cuffs not counted. Check Chinese/Japanese text, titles, and credits phrase by phrase for full text and appearance time; when same-color strokes are not visible, first find a real same-sentence donor, register separately after obtaining needed reconstruction authorization, do not guess characters or rely on AI rewriting text. After encoding, also check readability contrast; do not substitute correct text-core RGB for legibility.

Default does not use optical flow, mesh deformation, mirroring, morphing, or crossfade to impersonate new character cels; if the user explicitly allows approximation, record the scope of use. Normal cropping, uniform canvas, and whole-layer translation/scaling that actually exist in the source shot must be distinguished from non-rigid character deformation. Do not claim they can replace fabric folds, fingers, or hair redraws.

6. Check and Deliver

Check three levels per references/review-and-delivery.md: single cel structure, adjacent and loop continuity, and original/new version speed comparison. Hands, eyes, missing background, and effects must be compared with original frames; technical decode success is not art acceptance.

Provide focused segments (left original / right new) and full target interval; for loop issues, provide a full loop preview. Verify frame count or PTS, duration, audio track, cuts, and ending. Use the most recently approved version as the baseline for repairs, keep the rest, and avoid rolling back old cels on long composite takes.

Report the actual number of cels used, exposure strategy, inspection scope, and remaining differences. Do not promise that prompts can lock pixels precisely, that spatial differences will be executed by the model, or that after adding transitions the exposure is “exactly identical frame by frame”. Generated assets must be saved to the current project; repository publishing is an independent operation – calling this skill does not imply uploading the source clip, character references, or personal files.

The package includes probe_source.py for precise source timing capture, and verify_encoded.py for verifying original AAC copy and video encoding within the support range – it cannot make art judgments. In the absence of original-speed viewing or when critical defects such as subtitles or old character remnants remain, only deliver clearly marked drafts and defect lists, not high-quality final versions. Detailed commands and limitations are in the script map.

相关技能