Skip to content
Back to search

paper-collage-ad

This skill should be used when the user asks to "做一个剪纸广告", "制作拼贴广告片", "把产品做成纸片定格动画", "做一个有趣的产品广告", "生成半色调剪纸分镜", "把静态拼贴图做成广告视频", "把广告拉长一点", "参考这个声音配音", or wants a complete branded paper-cut advertisement from brief to validated MP4 rather than only prompts or still images.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/jane-xiaoer--paper-collage-ad-codex/badge.svg)](/listings/jane-xiaoer--paper-collage-ad-codex)

HTML

<a href="/listings/jane-xiaoer--paper-collage-ad-codex"><img src="/api/listings/jane-xiaoer--paper-collage-ad-codex/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 282 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. name: paper-collage-ad
  3. description: This skill should be used when the user asks to "做一个剪纸广告", "制作拼贴广告片", "把产品做成纸片定格动画", "做一个有趣的产品广告", "生成半色调剪纸分镜", "把静态拼贴图做成广告视频", "把广告拉长一点", "参考这个声音配音", or wants a complete branded paper-cut advertisement from brief to validated MP4 rather than only prompts or still images.
  4. metadata:
  5. version: "1.1.0"
  6. compatibility: OpenAI Codex desktop and CLI
  7. ---
  8. # Paper Collage Ad
  9. Turn a product brief and brand assets into a complete paper-collage advertisement. Build the story around one memorable visual metaphor, generate a locked set of finished keyframes, animate the sequence, add narration and sound, validate the rendered MP4, and preserve the reusable production artifacts.
  10. ## Core outcome
  11. Deliver all of the following:
  12. 1. A concise creative concept with one recurring visual world.
  13. 2. A time-coded storyboard with one idea and one joke per scene.
  14. 3. A locked visual system and approved first keyframe.
  15. 4. A consistent finished keyframe for every scene.
  16. 5. Narration, music and restrained sound effects.
  17. 6. A rendered MP4 with verified audio and video duration.
  18. 7. A contact sheet and all manifests needed for reproducibility.
  19. 8. Editable scene videos, selected narration and the final audio mix.
  20. Do not stop at prompts or a storyboard when the user asks for a finished advertisement.
  21. ## Codex edition
  22. Treat this repository as the skill directory. Install it at either `~/.codex/skills/paper-collage-ad/` for global use or `<project>/.codex/skills/paper-collage-ad/` for project-local use. Run every command from a shell available to Codex and keep generated project assets outside the skill directory.
  23. The workflow remains framework-neutral: plain Markdown, Node, Bash and FFmpeg make the deterministic steps usable from other agents or a bare shell. The metadata, installation paths, privacy defaults and examples in this edition are maintained primarily for OpenAI Codex.
  24. This skill is self-contained and framework-neutral: plain Markdown, Node and Bash scripts, and FFmpeg. Any agent (Claude Code, Codex, openclaw, or a bare shell) runs it identically. There is no framework-specific runtime.
  25. Resolve `<SKILL_DIR>` to the folder containing this `SKILL.md`. Every `scripts/...` and `references/...` path below is relative to it; every project artifact is relative to the project directory you create in Phase 1.
  26. **Phase 0: Preflight.** Before generating anything, verify the toolchain:
  27. ```bash
  28. bash <SKILL_DIR>/scripts/check-deps.sh
  29. ```
  30. Core tools (`ffmpeg`, `ffprobe`, `node`) must pass. The reference-voice extras are only needed for Phase 5 voice cloning. See `references/dependencies.md` for the full list.
  31. The four deterministic, runnable steps — each fails loudly if inputs are missing and verifies its own output at the stream level:
  32. | Route | Command | Consumes | Produces |
  33. | --- | --- | --- | --- |
  34. | Still-keyframe fallback | `node <SKILL_DIR>/scripts/render.mjs` | keyframes + `examples/render-manifest.json` | one MP4 from stills |
  35. | Local layered animation | `node <SKILL_DIR>/scripts/layer-animate.mjs` | field + cut layers + finished frame + `examples/layer-manifest.json` | one scene MP4 |
  36. | Reference-voice prep | `bash <SKILL_DIR>/scripts/prepare-indextts2-voice.sh` | one authorized user-supplied recording | private local speaker `.npz` |
  37. | Reference-voice narration | `node <SKILL_DIR>/scripts/narrate-indextts2.mjs` | private speaker `.npz` + `examples/voice-manifest.indextts2.json` | one local 48 kHz WAV per scene |
  38. | Final assembly | `node <SKILL_DIR>/scripts/assemble.mjs` | scene MP4s + voice + music + sfx + `examples/production-manifest.json` | mastered `final.mp4` |
  39. Creative generation keeps a model or human in the loop for keyframes, the optional Gemini Omni motion pass, final animation and voice selection. Deterministic assembly and validation remain scripted. Follow Phases 1–6 in order; do not skip the stage gates in `references/production-workflow.md`.
  40. ## Phase 1: Lock the brief
  41. Extract or infer the following from existing project material before asking questions:
  42. - Product promise.
  43. - Audience and viewing context.
  44. - Required product facts and CTA.
  45. - Brand assets, colors and typography.
  46. - Length, aspect ratio and language.
  47. - Available generation and rendering tools.
  48. Use existing project conventions when they already answer the brief. For a desktop product with landscape marketing assets, start with 16:9 and five scenes. Treat 30 seconds as a draft constraint only. Do not lock runtime until a representative narration take has been generated and measured. For social-first content, start with 15 seconds and 9:16 only when brevity is a hard requirement.
  49. Create the artifact structure in `references/production-workflow.md` and keep every project-bound generation inside it.
  50. **Use the real brand assets — never invent them.** Before any generation, locate the product's real logo, app icon, UI screenshots, brand colors and wordmark inside the project. Feed the real icon/UI as reference images to the image model, and composite the exact wordmark PNG for final delivery. Do not let the model invent a mascot or approximate the logo — a made-up character or a mis-spelled AI wordmark is an instant reject.
  51. Write the one-line creative angle before drafting scenes. Prefer a concrete metaphor that can carry the whole film. Examples include a traffic jam for tool overload, a factory for transformation, a stage performance for orchestration, or a suitcase for consolidation.
  52. ## Phase 2: Write and confirm the script — HARD GATE
  53. **Do not generate a single keyframe, voice take, or clip until the user has approved a written script.** This gate is what separates a real ad from paper-scrap garbage. Rushing to hand in a rendered MP4 before the words are agreed is the most expensive mistake — it causes version after version of rework.
  54. Produce, and get the user to explicitly sign off on, three things:
  55. 1. **Core dramatic action / concept** — one sentence: who wants what, blocked by what, plus the one recurring visual metaphor that carries the whole film.
  56. 2. **Storyboard** — beat by beat: `scene # · duration · 画面 (what the camera sees) · 旁白/对白`. Default 30 seconds or more unless the user asks for shorter.
  57. 3. **The actual dialogue / narration**, written out in full.
  58. Craft rules for the writing (this is an ad concept-short, not a feature list):
  59. - **Zero explanation — show features, never narrate them.** The voiceover must NOT list capabilities ("opens every format, sorts your photos and documents, one app for all…"). That reads as a spoken product manual and is the #1 reason ad copy feels cringe. The *visuals* carry the product story; the narration only sets mood and moves the story.
  60. - **Few lines, spoken, with subtext.** Talk like a real person, not an essay. Say the tip of the iceberg and imply the rest. No AI-essay tone, no piled-on metaphors, no preaching, no exaggerated sales rhythm.
  61. - **Hook in the first 5 seconds** — a slightly-off everyday image that makes the viewer ask "怎么回事?".
  62. - **Tone must match the story.** Warm/healing story → gentle storybook narration; satirical → mock-epic or goofy; cool product → sparse and confident. A grand tragic/Shakespearean voice over a cozy little story feels wrong — match, don't clash.
  63. - **One clean CTA** at the end: brand + one clear action (and a URL if relevant), held at least one second.
  64. Keep each scene responsible for one idea and one main action; preserve recurring characters/props so it reads as one story, not five unrelated posters.
  65. If the environment has a dedicated screenwriting/scriptwriting skill, invoke it to develop the script — but the sign-off gate below is mandatory either way.
  66. **GATE: present the script + storyboard + dialogue and get an explicit approval from the user before any production. Nothing is generated until then.**
  67. ## Phase 3: Lock the visual system
  68. Read `references/collage-dimensions.md` before generating the first frame. Specify:
  69. - Exact background field and paper grain.
  70. - Halftone dot shape and density.
  71. - Cut-edge treatment and white keyline.
  72. - Drop-shadow offset, softness and opacity.
  73. - Brand color allocation.
  74. - Label placement and typography character.
  75. - Negative constraints.
  76. Generate the first frame as the style anchor. Inspect text, brand mark, materials, shadows, character tone and negative space. Do not generate the complete set until this anchor is acceptable.
  77. For every later frame, provide these references in order:
  78. 1. The approved first frame as the strict style reference.
  79. 2. The previous scene as the continuity reference.
  80. 3. The official brand icon or product image.
  81. 4. The most relevant real product screenshot.
  82. Repeat the complete material description in every generation prompt. Generators have no memory between calls.
  83. Use the prompt scaffold in `references/prompt-patterns.md`. Burn short scene labels into the image only when the generator reliably preserves them. Keep exact text brief and inspect every result for malformed Chinese, incorrect URLs and invented format labels.
  84. ## Phase 3.5: Gemini Omni motion draft and surgical edit pass (optional)
  85. When the ChatCut plugin is installed and the user has video-generation entitlement, use **Gemini Omni** (`model: "omni"`, backend `gemini-omni-flash-preview`) between approved keyframes and final animation. Read `references/gemini-omni-flash.md` and copy `examples/omni-pass.json` as the shot plan.
  86. Use this pass for two jobs only:
  87. 1. **Motion drafting:** animate an approved keyframe with `firstFrame` to test timing, staging and comic beats before spending on a finishing generation.
  88. 2. **Surgical repair:** pass an existing clip through `continueFrom` to change one localized property while preserving unmentioned content.
  89. Treat Omni as an editing and drafting layer, not a finishing model. It outputs 720p/24fps, supports 3–10 second clips, and only accepts 16:9 or 9:16. Pick exactly one of `firstFrame`, `refImages` or `continueFrom`; omit `resolution`. It cannot use a last frame, extend a clip, bridge two clips, accept audio references or replace spoken audio.
  90. Write the motion prompt in English, use positive instructions such as `locked-off static camera`, and track no more than three important subjects. Do not ask Omni to render Chinese or other CJK text. Add exact labels, URLs, UI and wordmarks later with HyperFrames or another deterministic overlay.
  91. Approve or reject each Omni draft before final animation. If 720p is acceptable, an approved output may become the scene source. If delivery requires 1080p, longer duration, exact typography, or whole-shot motion/camera changes, use the Omni clip only as a motion reference and finish with Seedance 2, Kling or HyperFrames. Stop deep edit chains: from round four onward, regenerate from a clean source because quality loss and full regeneration cost compound.
  92. ## Phase 4: Animate
  93. **Route A — AI image-to-video (Seedance / jimeng via `arkcli`), best for organic motion + native foley.** Prefer real element assembly when a capable image-to-video tool is available:
  94. - Start on the empty paper field.
  95. - Slide paper elements in from edges one by one.
  96. - Settle each shadow as its element lands.
  97. - Reveal the label last.
  98. - Hold the complete frame long enough to read.
  99. Use one video model for the delivered set to preserve motion and texture consistency. If prompt-driven assembly fails, use a start-frame and end-frame interpolation model.
  100. **Route B — HyperFrames (code-driven, KEY-FREE) — preferred with no video-model key, and preferred for precise scenes even when you have one.** HyperFrames renders HTML + GSAP compositions to MP4 locally (node + headless Chrome + ffmpeg, no API key, no limits). It is *better than any video model* for precise, deterministic motion — the exact stuff models get wrong: a logo whose outer shutter rotates while the center stays perfectly still, a UI that reveals its file list row by row, paper elements sliding/settling in stop-motion cadence, text that bounces on beat. Read `references/hyperframes-route.md` and start from `examples/hyperframes-logo-composition.html`.
  101. The non-negotiable rule for paper-cut in HyperFrames: **animate real paper assets, never fake paper in CSS.** Feed AI-generated cut-paper PNGs (background field + cut-out element layers) and choreograph *those* with GSAP; a flat CSS/gradient look is the "flat vector pretending to be paper" trap. The precise-logo trick: two stacked copies of the paper-cut icon — the outer one clipped to a circle and rotated, a static inner copy clipped to the center circle locking the ear in place. Bonus: all text is real HTML, so wordmarks and URLs never mis-spell (unlike AI-rendered text).
  102. **Hybrid is ideal:** cheap motion experiments or localized short-clip repairs → Gemini Omni; organic/physical finishing scenes (files raining, chaos, natural motion + native foley) → Seedance or Kling; precise brand/UI/logo/text scenes → HyperFrames. Anyone without a video-model key can skip Omni and do the whole film in HyperFrames.
  103. When neither is available, render the approved keyframes with the deterministic FFmpeg fallback in `scripts/render.mjs`. Use short camera movement in the first part of each shot, transition at the scene boundary, and hold the back half for reading. Do not use perpetual breathing, random drift or rapid template transitions.
  104. For actual local cutout assembly instead of whole-frame camera motion, read `references/local-layer-animation.md` for the method, then drive it with `scripts/layer-animate.mjs`. Split each finished frame into feathered transparent-PNG paper layers, describe each layer's entrance edge and final position in a manifest matching `examples/layer-manifest.json`, and run:
  105. ```bash
  106. node <SKILL_DIR>/scripts/layer-animate.mjs \
  107. --manifest ./manifests/scene-01-layers.json \
  108. --output ./renders/scene-01.mp4
  109. ```
  110. The animator slides each layer in from its edge with stepped stop-motion cadence, crossfades the untouched finished frame over the assembled result for the final hold, and verifies dimensions, duration and frame count. Each layer PNG must already include its own soft shadow. This produces a scene MP4 that `assemble.mjs` can stitch.
  111. Render every scene as its own MP4 before the final assembly. This keeps scene retiming reversible. When extending a rushed cut, slow each scene independently with source-to-target `setpts` ratios; do not globally slow the mastered MP4.
  112. ## Phase 5: Audio
  113. Read `references/audio-production.md` before generating narration and `references/music-scoring.md` before choosing music. Generate one narration file per scene. Keep raw and selected takes separate. Validate intelligibility and pronunciation, then measure every selected file before fixing picture duration.
  114. Set each scene to the selected voice duration plus 0.7 to 1.5 seconds. If pacing feels rushed, extend the picture first, rewrite the line second and use pitch-preserving time compression only as a last adjustment. Do not exceed about 1.12x for a final take.
  115. For Chinese narration, verify the selected voice is actually a Chinese voice. Some local TTS pipelines silently select an English voice, produce extremely slow speech or omit lines. If this occurs on macOS, use a verified local Chinese voice such as `Tingting`, then convert the result to 48 kHz WAV.
  116. When the user supplies an authorized reference voice and requests local cloning on Apple Silicon, use the bundled IndexTTS-2 MLX wrapper:
  117. 1. Install the third-party runtime with `scripts/setup-indextts2-mlx.sh`.
  118. 2. Require the user to place a clean 6 to 12 second recording at `<project>/assets/voice-reference/reference.wav`.
  119. 3. Precompute `<project>/assets/voice-model/speaker-v2.npz` with `scripts/prepare-indextts2-voice.sh` and the explicit `--i-have-permission` acknowledgement.
  120. 4. Generate scene WAVs from `examples/voice-manifest.indextts2.json` using `scripts/narrate-indextts2.mjs`.
  121. 5. Keep the recording, speaker file and generated private narration outside the skill repository and disclose that the delivered narration is AI-generated.
  122. Build a scene-by-scene music cue map after picture timing is locked. Prefer a bespoke full-length cue or compatible stems over looping a short stock bed. Keep background music low enough that narration remains primary and enable voice-triggered ducking in the production manifest. Use paper whooshes, soft clicks, pops and a restrained closing chime. Place sound effects on meaningful physical actions rather than every entrance.
  123. Mix the final audio to the exact planned duration. Start music near 0.08 to 0.12 linear volume, target approximately -16 LUFS and keep the true peak no higher than -1.5 dB. Check mean and peak volume.
  124. ## Phase 6: Render and validate
  125. For still keyframes, create a render manifest matching `examples/render-manifest.json`. Run:
  126. ```bash
  127. node <SKILL_DIR>/scripts/render.mjs \
  128. --manifest ./render-manifest.json \
  129. --output ./renders/paper-collage-ad.mp4
  130. ```
  131. The renderer calculates explicit input frame counts, applies scene transitions, encodes H.264 and AAC, and verifies stream duration and frame count.
  132. For completed scene MP4s, voice tracks, music and sound effects, create a manifest matching `examples/production-manifest.json`. Run:
  133. ```bash
  134. node <SKILL_DIR>/scripts/assemble.mjs \
  135. --manifest ./manifests/production-manifest.json \
  136. --output ./renders/final.mp4
  137. ```
  138. The assembly renderer retimes scenes independently, places each voice and sound effect, loops and fades music, normalizes the mix, renders H.264/AAC and verifies exact stream duration and frame count.
  139. Do not combine `-loop 1`, `zoompan d=1` and chained `xfade` filters. That combination can create a 30-second container whose video stream ends after the first scene while the audio continues. Generate an explicit number of frames from each still instead. The bundled renderer enforces this rule.
  140. After rendering:
  141. 1. Confirm H.264 video and AAC audio are present.
  142. 2. Confirm width, height and FPS match the manifest.
  143. 3. Confirm both streams cover the full expected duration.
  144. 4. Extract one frame from the middle of every scene.
  145. 5. Assemble and inspect a contact sheet.
  146. 6. Check the opening, every transition and the final CTA hold.
  147. Treat a valid container as insufficient. A playable MP4 can still have a truncated video stream.
  148. ## Hard-won production rules (from real ad builds)
  149. - **Prefer real generators; the bundled ffmpeg paths are last-resort fallbacks.** For animation, prefer a real image-to-video model (e.g. Volcengine Seedance via the `arkcli +gen --generate-audio` toolchain) over `render.mjs` camera-push, which reads as a static image. For narration, prefer a real TTS or a reference-voice clone over macOS `say`. For music, download a fitting royalty-free track (e.g. Pixabay) rather than synthesizing a tone. See `references/dependencies.md`.
  150. - **You cannot hear audio — the user's ear is the judge.** Never blind-pick a voice, music bed, or mix. Generate 2–4 candidates (voices A/B/C, a couple of tracks) and let the user choose; then tune levels by their feedback. Voiceover, sound effects and music quality are all decided by the user, not by you.
  151. - **One visual language, all the way through — including on-screen content.** If the film is pure paper-cut, then the content shown *inside a screen* must also be paper-cut/halftone. A realistic photo or a glossy app icon dropped into a paper-cut world clashs and looks worse once animated.
  152. - **Sound effects: describe them in the video prompt.** Seedance's `--generate-audio` synthesizes foley from the sounds you name in the prompt (paper rustle, shutter click, notification dings, ambience). Write the motion AND the sound into every clip prompt.
  153. - **Use Gemini Omni for convergence, not final polish.** With ChatCut, `model: "omni"` is the fast 720p drafting route and `continueFrom` is the default for one localized change. Keep its prompt in English, never put exact CJK text in the generated frame, and move to a finishing route instead of stacking four or more edits.
  154. - **Know the model's limits and be honest.** A video model cannot reliably do precise part-level constraints (e.g. "rotate only the outer shutter blades while the ear stays perfectly still" — it morphs the whole logo). Don't force it. Do exact logo/UI/text motion in the **HyperFrames route** (`references/hyperframes-route.md`): stack two copies of the paper-cut icon, rotate the outer one clipped to a circle, keep a static inner copy clipped to the center to lock the ear. Deterministic, and the text stays real HTML (never mis-spelled).
  155. - **Proxy / env (behind Clash/TUN):** node's `fetch` needs `HTTPS_PROXY=http://127.0.0.1:7890` for foreign APIs. Do NOT use `set -a; source .env` before node calls — it pollutes the env and makes fetch time out through the TUN fake-IP; inject only the needed keys inline in a clean env.
  156. ## Quality bar
  157. - Understandable without narration.
  158. - One clear visual metaphor across the entire film.
  159. - First joke or tension inside five seconds.
  160. - Product arrives as the solution, not as a detached logo card.
  161. - Every feature is demonstrated through a physical paper action.
  162. - Brand color and icon remain accurate.
  163. - Labels and URL are legible and correct.
  164. - No malformed text, black frames or silent gaps.
  165. - Final CTA remains visible for at least one second.
  166. - Jokes have room to land; no line sounds squeezed into its scene.
  167. - Raw reference voice remains private and is not included in public deliverables.
  168. ## Resources
  169. - `WORKFLOW.zh-CN.md`: human-facing end-to-end Chinese guide from Codex installation through final MP4 delivery.
  170. - `references/dependencies.md`: consolidated core and optional tool list; what each script needs.
  171. - `references/collage-dimensions.md`: precise craft vocabulary and JSON fields.
  172. - `references/prompt-patterns.md`: reusable keyframe and motion prompt structures.
  173. - `references/fallbacks-and-qc.md`: TTS, FFmpeg and validation failures discovered in production.
  174. - `references/local-layer-animation.md`: local no-model method for turning flattened keyframes into layered cutout motion.
  175. - `references/audio-production.md`: comic narration, reference-voice separation, local IndexTTS-2, timing and mix targets.
  176. - `references/music-scoring.md`: scene cue maps, suitable instrumentation, sourcing, candidate analysis and sidechain ducking.
  177. - `references/production-workflow.md`: project layout, stage gates, duration strategy and handoff checklist.
  178. - `references/hyperframes-route.md`: key-free, deterministic animation via HyperFrames (HTML+GSAP) — the precise-logo trick, the "animate real paper" rule, install and render commands.
  179. - `references/gemini-omni-flash.md`: optional ChatCut Gemini Omni motion-draft and localized-edit stage, with routing rules and hard limits.
  180. - `examples/storyboard.json`: scene-by-scene story template (role, idea, action, joke, label, draft duration).
  181. - `examples/prompts.json`: style-anchor and continuity keyframe prompt manifest template.
  182. - `examples/render-manifest.json`: still-keyframe render manifest template.
  183. - `examples/layer-manifest.json`: layered local-animation manifest template.
  184. - `examples/hyperframes-logo-composition.html`: HyperFrames starter — paper-cut icon two-layer shutter rotation (ear locked), real-HTML two-colour URL, GSAP text bounce.
  185. - `examples/omni-pass.json`: copyable Gemini Omni first-frame draft and `continueFrom` localized-edit plans.
  186. - `examples/production-manifest.json`: scene-video, narration, music and sound-effect assembly template.
  187. - `examples/voice-manifest.indextts2.json`: local IndexTTS-2 scene narration template.
  188. - `examples/project.gitignore`: privacy-safe ignore rules for user voice, audio and rendered project assets.
  189. - `scripts/check-deps.sh`: preflight dependency check for the whole pipeline.
  190. - `scripts/render.mjs`: deterministic keyframe-to-MP4 renderer with verification.
  191. - `scripts/layer-animate.mjs`: deterministic layered stop-motion animator for one scene with verification.
  192. - `scripts/assemble.mjs`: deterministic scene-video retiming, audio mix, rendering and verification.
  193. - `scripts/extract-reference-voice.sh`: extract and separate a merged video soundtrack for authorized voice-reference selection.
  194. - `scripts/setup-indextts2-mlx.sh`: install the optional Apple-Silicon IndexTTS-2 MLX runtime and model outside the skill.
  195. - `scripts/prepare-indextts2-voice.sh`: normalize one authorized recording and create a private local speaker file.
  196. - `scripts/narrate-indextts2.mjs`: render one local 48 kHz narration WAV per scene from the private speaker file.
  197. - `scripts/privacy-check.sh`: reject tracked voice assets and obvious credentials before publishing.
README.md · README · 148 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Paper Collage Ad for Codex
  2. 一个适合在 OpenAI Codex 中运行的完整剪纸 / 编辑拼贴广告制作 skill。从创意、脚本、分镜和关键帧开始,继续完成动画、旁白、音乐、音效、合成与 MP4 质检。
  3. > Codex edition: `1.1.0`
  4. >
  5. > Skill name: `paper-collage-ad`
  6. >
  7. > Primary runtime: OpenAI Codex desktop / CLI
  8. ## 安装到 Codex
  9. 全局安装,供当前用户的所有 Codex 项目使用:
  10. ```bash
  11. git clone https://github.com/Jane-xiaoer/paper-collage-ad-codex.git \
  12. ~/.codex/skills/paper-collage-ad
  13. ```
  14. 项目内安装,只供当前项目使用:
  15. ```bash
  16. mkdir -p .codex/skills
  17. git clone https://github.com/Jane-xiaoer/paper-collage-ad-codex.git \
  18. .codex/skills/paper-collage-ad
  19. ```
  20. 重新启动 Codex 或开启新任务后,可以直接说:
  21. ```text
  22. 用 paper-collage-ad 给这个产品制作一条有趣的 45 秒剪纸广告。
  23. ```
  24. Codex 会读取根目录的 `SKILL.md`,并按需调用 `references/`、`examples/` 和 `scripts/`。
  25. 从安装到最终 MP4 的完整中文操作步骤见:[WORKFLOW.zh-CN.md](WORKFLOW.zh-CN.md)。
  26. ## 能完成什么
  27. - 从产品资料提炼一个贯穿全片的视觉隐喻。
  28. - 输出等待确认的脚本、对白和时间码分镜。
  29. - 使用真实品牌资产生成风格锁定的剪纸关键帧。
  30. - 在关键帧与最终动画之间,用 ChatCut 的 Gemini Omni 快速预演动作或局部修改已有短片。
  31. - 使用 Seedance、HyperFrames、分层 PNG 或 FFmpeg 完成动画。
  32. - 使用普通 TTS,或在本地通过 IndexTTS-2 MLX 克隆已获授权的声音。
  33. - 添加音乐、纸张拟音和动作音效,最后输出经过流级验证的 H.264/AAC MP4。
  34. ## 基础依赖
  35. macOS:
  36. ```bash
  37. brew install ffmpeg node
  38. bash scripts/check-deps.sh
  39. ```
  40. 只使用静态关键帧、分层动画和最终合成时,不需要任何 API Key。Gemini Omni 通过可选的 ChatCut 插件调用,需要登录并拥有视频生成额度;Seedance、即梦、MiniMax 和 ElevenLabs 也分别需要使用者自己的服务权限。
  41. ## Gemini Omni 中间环节
  42. 这一版加入 Gemini Omni(ChatCut 工具参数 `model: "omni"`,后台模型 `gemini-omni-flash-preview`)。它不是最终精修模型,主要用于:
  43. - 用已确认关键帧做 3–10 秒动作预演,先判断节奏和笑点是否成立。
  44. - 用 `continueFrom` 对现有短片做一次局部修改,未提及的内容尽量保持不变。
  45. Omni 固定输出 720p/24fps,只支持 16:9 或 9:16,也不适合生成精确中文文字。最终需要 1080p、长镜头、精确 Logo/UI/中文时,使用 Seedance、Kling 或 HyperFrames 完成。完整用法和路由判断见 [references/gemini-omni-flash.md](references/gemini-omni-flash.md)。
  46. ## 声音克隆:IndexTTS-2 MLX
  47. 本仓库指定的本地声音克隆方案是 [solar2ain/mlx-indextts](https://github.com/solar2ain/mlx-indextts) 的 IndexTTS-2 MLX 实现,适合 Apple Silicon Mac。它支持零样本声音克隆和情绪控制。
  48. 仓库不会附带任何人的声音、声纹或模型权重。安装脚本只把第三方运行时和模型下载到本机:
  49. ```text
  50. ~/.local/share/paper-collage-ad/mlx-indextts/
  51. models/mlx-indextts2-standard-fp16/
  52. ```
  53. 安装运行时:
  54. ```bash
  55. bash scripts/setup-indextts2-mlx.sh
  56. ```
  57. 在广告项目中建立私人声音目录:
  58. ```text
  59. <project>/
  60. assets/
  61. voice-reference/
  62. reference.wav # 使用者自行放入,建议 6–12 秒清晰单人语音
  63. voice-model/
  64. speaker-v2.npz # 本地生成,不提交 Git
  65. voice-final/
  66. 01.wav # 本地生成的分镜旁白
  67. ```
  68. 先用已获授权的参考声音生成本地声纹:
  69. ```bash
  70. bash scripts/prepare-indextts2-voice.sh \
  71. "<project>/assets/voice-reference/reference.wav" \
  72. "<project>/assets/voice-model/speaker-v2.npz" \
  73. --i-have-permission
  74. ```
  75. 复制并修改旁白清单:
  76. ```bash
  77. cp examples/voice-manifest.indextts2.json \
  78. "<project>/manifests/voice.indextts2.json"
  79. ```
  80. 生成每个场景的 48 kHz WAV:
  81. ```bash
  82. node scripts/narrate-indextts2.mjs \
  83. --manifest "<project>/manifests/voice.indextts2.json"
  84. ```
  85. 所有参考声音和声纹都留在使用者自己的项目路径。不要把 `voice-reference/`、`voice-model/` 或生成的私人旁白提交到公开仓库。只能克隆本人声音或已经获得明确授权的声音,并在交付物中说明旁白由 AI 生成。
  86. 新项目可以直接采用仓库提供的隐私忽略模板:
  87. ```bash
  88. cp examples/project.gitignore "<project>/.gitignore"
  89. ```
  90. ## 目录
  91. ```text
  92. SKILL.md Codex 主工作流
  93. agents/openai.yaml Codex 展示信息与默认提示词
  94. references/ 分镜、视觉、动画、声音、音乐和质检说明
  95. examples/ 可复制的 JSON / HTML 清单与模板
  96. scripts/ 可执行的动画、TTS、混音、渲染与验证工具
  97. ```
  98. ## 隐私与密钥
  99. - 不包含作者的参考声音、声纹、品牌素材或项目成片。
  100. - 不包含 API Key;可选服务只从环境变量读取密钥。
  101. - `.gitignore` 默认排除常见声音资产、模型、渲染结果和 `.env` 文件。
  102. - 运行公开发布前,建议执行:`bash scripts/privacy-check.sh`。
  103. ## License
  104. 本 skill 的原创内容采用 MIT License。第三方模型、运行时、字体、音乐、素材和 API 分别遵循其自身许可证与服务条款。IndexTTS-2 模型权重不会被复制进本仓库。

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.