Skip to content
Back to search

code-brand-film

SkillWorks with Claude CodeGitHub

Produce a short brand film or product promo (10-60s, typically 15s) entirely as code: one static HTML page with a paused GSAP timeline that a renderer seeks frame by frame, plus a music score synthesized in Python. Use when the user wants a 品牌宣传片, 广告片, 宣传动画, 产品短片, 发布会开场视频, brand film, promo video, product teaser, logo animation, or a generated ad spot — especially when they ask for 高级感 / 艺术感 / 电影感 / 别像模板, or when an existing video "looks like AI made it" or "too simple" and needs to be redone properly. Also use when a film already exists and needs a score, a soundtrack, background music, or 配乐, or when a code-generated video needs ghosting, contrast, font, or transition defects fixed.

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/nutllwhy--code-brand-film/badge.svg)](/listings/nutllwhy--code-brand-film)

HTML

<a href="/listings/nutllwhy--code-brand-film"><img src="/api/listings/nutllwhy--code-brand-film/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 · 228 lines
  1. ---
  2. name: code-brand-film
  3. description: >
  4. Produce a short brand film or product promo (10-60s, typically 15s) entirely
  5. as code: one static HTML page with a paused GSAP timeline that a renderer seeks
  6. frame by frame, plus a music score synthesized in Python. Use when the user
  7. wants a 品牌宣传片, 广告片, 宣传动画, 产品短片, 发布会开场视频, brand
  8. film, promo video, product teaser, logo animation, or a generated ad spot —
  9. especially when they ask for 高级感 / 艺术感 / 电影感 / 别像模板, or when an
  10. existing video "looks like AI made it" or "too simple" and needs to be redone
  11. properly. Also use when a film already exists and needs a score, a soundtrack,
  12. background music, or 配乐, or when a code-generated video needs ghosting,
  13. contrast, font, or transition defects fixed.
  14. metadata:
  15. category: media
  16. ---
  17. # Code-generated brand films
  18. > **Three things decide whether a film ships. Do not skip any of them.**
  19. > 1. Read *all ten* files in the reading table below, plus the example's
  20. > `src/index.tpl.html`. Reading only `creative.md` / `pipeline.md` /
  21. > `scoring.md` reproduces the rejected films described here.
  22. > 2. Search for the brand's real logo and imagery and record them in
  23. > `assets.md`, then write `shot-list.md` and `copy.md` — all before the timeline.
  24. > 3. Run all three gates and paste their output in your delivery:
  25. > `scripts/film_audit.py film/index.html` before rendering,
  26. > `node scripts/layout_audit.mjs film/index.html` before rendering,
  27. > `scripts/frame_audit.py film/renders/silent.mp4` after.
  28. > All three print `0 failed`, or the film is not delivered. Lint passing means
  29. > the page is valid, not that the film is good.
  30. A film is one static HTML page inside `film/`, driven by a paused GSAP timeline
  31. that the renderer ([HyperFrames](https://github.com/heygen-com/hyperframes))
  32. seeks frame by frame. Every asset is a local file. The score is a separate Python
  33. program that writes a WAV, muxed onto the silent picture at the end.
  34. ## The failure this skill exists to prevent
  35. The usual failure is not a broken film, it's an **under-built** one: it lints
  36. clean, has no bad frames, and still looks like a template. A real example built
  37. from an earlier version of this skill had 18 tweens, one entrance mechanic
  38. (fade + slide), only crossfades between acts, a logo redrawn as a circle,
  39. system fonts, a tagline nobody had written, and no product on screen. The two
  40. accepted films it was compared against had ~105 tweens, 9–12 mechanics, 2–4
  41. non-crossfade transitions, and showed the product working in most acts.
  42. So this skill sets **floors you can measure** and gives you **code to copy**.
  43. There are three gates: `scripts/film_audit.py` on the HTML (floors),
  44. `scripts/layout_audit.mjs` on the HTML in a real browser (placement), and
  45. `scripts/frame_audit.py` on the rendered MP4 (pixels). All must print `0 failed`.
  46. A later film passed the first and last and was still rejected for placement:
  47. headline under the input bar, logo on the first character, a notification card
  48. parked on the corner mark. The layout gate exists for that.
  49. **The floors are minimums, not targets.** A later film cleared the code gate at
  50. exactly 70 tweens and 8 mechanics, padded with breathing headlines, and was still
  51. an abstract ink-drop animation covering 3% of the frame with no product in it.
  52. The tween count now excludes filler, and the pixel gate exists because pixels
  53. cannot be padded. If you find yourself adding tweens to pass a number, stop: the
  54. film is missing content, not motion. Aim at the reference example, not the floor.
  55. A third film came from an agent that read only `creative.md`, `pipeline.md`
  56. and `scoring.md`, never ran either gate, and "fixed the single worst frame"
  57. on a picture that was mostly empty. Metaphor: a stone thrown into a lake,
  58. ripples growing six glowing icons on a dark purple void. It linted with
  59. 0 errors and had a loudness-matched score. It also had 36 tweens, 3 mechanics,
  60. no logo, no shot list, 1.3% of the frame covered and a 4.4s still stretch:
  61. 13 failed checks. Everything it needed to avoid that was in the files it
  62. didn't open.
  63. A fourth film followed every step, passed all three gates (109 tweens, 10
  64. mechanics) and still lost clearly to a film of the same product that would have
  65. *failed* the old floors. The brand had shipped its own product animations; the
  66. losing film used three of them, held two still photos for six seconds under
  67. focus brackets and capture rings, put grain over the brand's white sweep, and
  68. changed acts with a different trick every time. The winner cut seven official
  69. clips on a stage sampled to their exact ground, drew nothing on the product,
  70. and used one transition taken from the product's hinge on every act change.
  71. When the brand ships motion, read `references/footage-led.md` — the audit
  72. switches to its floors automatically.
  73. ## Read these — in this order
  74. | Step | File | Why |
  75. | --- | --- | --- |
  76. | before anything | [references/creative.md](references/creative.md) | metaphor, five-act timing, motion rules, palettes, the AI-look traps |
  77. | before placing anything | [references/layout.md](references/layout.md) | zone map per act, hard placement rules (text never covered, logo never on text, title safe, no half-parked cards) |
  78. | before anything | [references/assets.md](references/assets.md) | where to search for the real logo and imagery, the five-point logo check, the `assets.md` manifest |
  79. | before anything | [references/quality-bar.md](references/quality-bar.md) | the numbers, the mechanic list, the transition list, product truth, real assets |
  80. | if the brand has product video | [references/footage-led.md](references/footage-led.md) | footage-led films: harvest the motion, stage = studio ground, no texture, one signature transition from the product's shape, draw nothing on the product, localised copy |
  81. | before coding | [references/shot-list.md](references/shot-list.md) | the table you fill in first; worked example included |
  82. | while coding | [references/recipes.md](references/recipes.md) | copyable GSAP for 27 mechanics and transitions (24–27: fold on a seam, seam open, anchor match cut, pose burst) |
  83. | while coding | [examples/office-agent/](examples/office-agent/) | a complete 400-line film that clears every floor — read its timeline |
  84. | scaffold / render | [references/pipeline.md](references/pipeline.md) | layout, template+build, lint warnings, macOS pitfalls, defect checklist |
  85. | music | [references/scoring.md](references/scoring.md) | beat grid from picture, energy plan, mix graph, verify without ears |
  86. Do read the example's `src/index.tpl.html` end to end before writing your own.
  87. Seeing how much one 15s film contains is worth more than any rule here.
  88. ## Workflow
  89. 1. **Collect sources.** Brief or product page: the mandatory selling line, 3–5
  90. concrete product behaviours, required copy and CTA, red lines.
  91. **Then go searching** (`references/assets.md`): user-supplied files → press /
  92. brand kit → official site (header SVG, og:image, screenshots) → app store
  93. listing → official social posts. Bring back the current logo and ≥ 2 official
  94. images, at least one showing the real product. Run the five-point logo check
  95. (right product, current version, right variant, untouched, resolution) and
  96. write it all into `assets.md` with source URLs. Never redraw a logo, never
  97. take one from a logo-aggregator site. Start with
  98. `scripts/harvest_page_images.py <product-page> --video` — it pulls every
  99. image, SVG and product clip the page uses and makes numbered contact sheets
  100. to pick from. Harvest the country page in the audience's language too; copy
  101. comes from there. **Clips found?** The film is footage-led
  102. (`references/footage-led.md`): footage carries acts 2–4, stills only as a
  103. burst, stage colour = the clips' sampled ground.
  104. **Physical product?** It appears as its official photo every time it is on
  105. screen; acts 2–4 show its *output* through its own UI, and each feature line
  106. gets a proof shot (`creative.md` example C, `recipes.md` 20–23).
  107. 2. **Find the metaphor** — one sentence with a physical verb, ideally taken
  108. from the brand's own asset or the selling line's own words (`creative.md`).
  109. 3. **Write `shot-list.md` and `copy.md`** in the film project (next to `film/`;
  110. the audit fails without them). `copy.md` lists every on-screen line with its
  111. source; see `examples/office-agent/copy.md`. Shot list from the template. Every act:
  112. ≥ 5 timed events, a named camera move, a named exit transition, three depth
  113. layers, a product behaviour (except hook/lockup), and a source for each line
  114. of copy. Run the self-check at its bottom. If the user is around, show it.
  115. 4. **Scaffold.** `film/hyperframes.json` (copy `assets/hyperframes.json`),
  116. `film/package.json` pinning `hyperframes@0.8.78`, `src/index.tpl.html`,
  117. `src/build.py` (copy `scripts/build_template.py`). Start from the example's
  118. texture layer (grain, falloff) — except in a footage-led film, where texture
  119. over the brand's studio ground is a fail. Do **not** add a page counter (`02 / 05`),
  120. a progress bar or corner labels — they make the film look like slides.
  121. 5. **Fonts.** `python3 src/build.py`, then
  122. `scripts/fetch_cjk_fonts.sh src/chars.txt film/assets/fonts` for Chinese.
  123. Latin fonts: download woff2 files into `film/assets/fonts/`. Every
  124. `@font-face` uses `url()` to a local file; `local()` is not allowed.
  125. 6. **Author** the timeline act by act from the shot list, pulling mechanics from
  126. `recipes.md`. Run `npx --yes hyperframes@0.8.78 lint` after each act.
  127. 7. **Gate.** `python3 scripts/film_audit.py film/index.html` → must print
  128. `0 failed`. Fix every FAIL by adding real content, not by gaming the regex.
  129. Then `node scripts/layout_audit.mjs film/index.html --shots .gates/layout`
  130. → must print `0 failed`. Open the screenshots, move things per
  131. `references/layout.md`, re-run.
  132. 8. **Render silent**, then `python3 scripts/frame_audit.py film/renders/silent.mp4`
  133. → must print `0 failed`. Make a contact sheet and put it next to
  134. `examples/office-agent/reference-sheet.jpg`; answer the three comparison
  135. questions in `quality-bar.md`. If yours is clearly thinner, go back to step 6
  136. — add product on screen, not decoration. Then fix the single worst frame.
  137. 9. **Score it — only now, after all three gates pass.** `score_lib` prints a
  138. NOT READY banner if `.gates/` is missing any of the three pass stamps.
  139. (`scripts/score_template.py` → `audio/score.py`), mix SFX,
  140. `loudnorm` to −14 LUFS, mux with `-c:v copy`.
  141. 10. **Deliver** one `MEDIA:`/file line per output. State what you verified
  142. (both audits' numbers, lint, loudness, the reference comparison) and what only the user can judge
  143. (taste, how the music sounds). Flag any invented copy and any low-res logo.
  144. ## Commands
  145. ```bash
  146. python3 src/build.py
  147. python3 <skill>/scripts/film_audit.py film/index.html # code gate: must be "0 failed"
  148. node <skill>/scripts/layout_audit.mjs film/index.html --shots .gates/layout # placement gate: "0 failed"
  149. cd film
  150. npx --yes hyperframes@0.8.78 lint # target 0 errors; read every warning
  151. PRODUCER_BROWSER_GPU_MODE=hardware \
  152. npx --yes hyperframes@0.8.78 render . -q high --fps 30 -o ./renders/silent.mp4
  153. python3 <skill>/scripts/frame_audit.py renders/silent.mp4 # pixel gate: must be "0 failed"
  154. <skill>/scripts/review_frames.sh renders/silent.mp4 snapshots 2 "11.0,13.5"
  155. ```
  156. ## Hard rules (each one came from a rejected or broken film)
  157. - **Floors are floors, not targets.** ≥ 90 non-filler tweens, ≥ 8 mechanics, ≥ 2 non-crossfade
  158. transitions, ≥ 8 eases, ≥ 8 camera moves, ≥ 5 events in every act (15s film).
  159. - **Show the product working** in at least two acts — its interface, its
  160. output, a device running it, real-looking data. An abstract metaphor (ink,
  161. particles, light, a seed growing) with no product in it could be an ad for
  162. anything and is rejected even if every number passes.
  163. - **Fill the frame.** A line of text and one small shape on a flat ground is an
  164. empty frame. Every act needs background, midground and foreground layers.
  165. - **Copy comes from the source.** Every on-screen line traces to the brief or the
  166. product page; anything invented is flagged to the user.
  167. - **Real logo, real imagery, real fonts.** The brand's current logo file for this
  168. exact product, checked against the live site and app store; ≥ 2 official images
  169. used as material (screens, masks, key visuals); every file sourced in
  170. `assets.md`; embedded woff2 subsets. A logo "inspired by" the brand, or the
  171. parent app's favicon standing in for a sub-product, is a wrong logo.
  172. - **When the brand ships motion, cut it; don't decorate it.** Footage on a
  173. stage of its own sampled ground colour, no grain over it, no focus brackets /
  174. rings / cursors drawn on the product, one signature transition from the
  175. product's own shape on ≥ 3 act changes, every product shot anchored to the
  176. same screen line, copy from the brand's page in the audience's language.
  177. - **The logo lives in the lockup, nowhere else.** No corner mark through the
  178. film (the layout gate fails it). The last frame is one group on the product's
  179. axis; never add your own title next to an official frame that already has
  180. type in it, never let the product cross the type, never `contain` a
  181. non-16:9 still so it floats in bars (`references/layout.md`, "The last frame").
  182. - **No template look.** No beige/orange-pink lifestyle palettes, no centring
  183. everything, no equal-length acts doing the same thing. The accent colour is a
  184. highlight, not a ground.
  185. - **One pull-back per film.** It reads as "this is ending".
  186. - **Motion lives on `.cam` layers**; initial hidden state lives in CSS; never
  187. fade an element that also has its own opacity tween. (Ghosting.)
  188. - **No `Math.random()` in the timeline** — frames are seeked out of order.
  189. - **Ship it with music**, landing the final hit on a downbeat. A brand film with
  190. no score is an incomplete delivery.
  191. - **Verify honestly.** You cannot hear audio or watch motion in real time; report
  192. the checks you ran, not a feeling.
  193. - **Client work gets reviewed before publishing.** Say so in the delivery.
  194. ## Bundled resources
  195. ```
  196. scripts/film_audit.py code gate, before render (floors, shot list, copy and asset sources)
  197. scripts/layout_audit.mjs placement gate, headless Chrome (hidden / colliding / clipped text, safe area, half-parked cards, corner logos)
  198. scripts/frame_audit.py pixel gate, after render (coverage, detail, motion)
  199. scripts/harvest_page_images.py every image (and with --video every product clip) on an official page → index.tsv + contact sheets
  200. scripts/fetch_cjk_fonts.sh Noto Serif/Sans SC subsets for exactly the characters used
  201. scripts/build_template.py template → film/index.html + CJK character list
  202. scripts/review_frames.sh render → contact sheet + stills + duration check
  203. scripts/score_lib.py instrument library + reverb + master (import, don't edit)
  204. scripts/score_template.py five-act arrangement to copy and fill in
  205. assets/hyperframes.json project config
  206. examples/office-agent/ complete reference film (placeholder brand), with its
  207. shot-list.md, copy.md and reference-sheet.jpg
  208. ```
README.md · README · 16 lines
  1. # code-brand-film
  2. 用代码做 15 秒品牌宣传片的 Agent Skill:画面是一页 HTML,用暂停状态的 GSAP 时间轴驱动,由 [HyperFrames](https://github.com/heygen-com/hyperframes) 逐帧渲染;配乐是用 Python 合成的原创曲,节拍跟着画面的切点走。
  3. - `SKILL.md`:工作流程和交付标准
  4. - `references/`:创作方法、质量门槛、动效配方、分镜表、工程管线、配乐
  5. - `scripts/`:三道质量闸门(`film_audit.py` 查代码,`layout_audit.mjs` 在浏览器里逐帧查摆位,`frame_audit.py` 查渲染出的画面)、乐器库、配乐模板、构建模板、审帧脚本
  6. - `examples/office-agent/`:一条完整可渲染的参考片,附分镜表、文案出处表和联系表
  7. 用法要点:先填 `shot-list.md` 和 `copy.md` 再写代码;两道闸门都 `0 failed` 才算能交付。门槛是下限,不是目标。
  8. 依赖:Node 22+、ffmpeg、Python 3 + numpy、Chrome + puppeteer-core(摆位闸门用,`npm i puppeteer-core`)。
  9. ## 许可证
  10. 代码与文档以 [MIT 协议](LICENSE) 开源。示例里的 Noto 字体(SIL OFL 1.1)、GSAP 等第三方内容保留各自的许可证,见 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。用本 skill 做片时收集的品牌 logo、产品图和官方视频归品牌方所有,商用前请确认授权。

Ratings and comments

Sign in to rate this skill.

Sign in

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