Communitygithub.com

里程碑揭示

使用 Claude Code 製作一個 12 秒循環的里程碑短片。數千個小點像夜空般飄移,匯聚成你的真實數字(追蹤者、訂閱者、收入、客戶),然後在下方畫出一條線,標籤緩緩就位。高質感,而非派對風格。當有人提及某個里程碑時使用。

里程碑揭示 是什麼?

這項技能讓 AI 代理(特別是 Claude Code)能夠根據使用者提供的真實數據,自動生成一段 12 秒、無縫循環的高品質里程碑揭示動畫影片。它適用於需要慶祝或展示具體成就的場景,例如追蹤者、訂閱者、收入或客戶數量的增長。該技能支援任何能夠執行 HTML Canvas 的環境,並透過一個自包含的 HTML 檔案來控制粒子動畫、字型嵌入、色彩主題以及精確到影格的時序。其核心工作流程是:先引導使用者提供數字、來源、標籤與品牌資訊;接著生成一段程式碼,該程式碼會將約 3200 個粒子模擬成夜空,並讓它們匯聚成指定數字的形狀;最後在特定時間點依次顯示標題線與標籤。為了確保輸出品質,技能內建了多項防錯機制,包括強制使用固定隨機種子來保證動畫可重複、要求 Canvas 的 `willReadFrequently` 屬性以防止瀏覽器繪製不一致,以及自動進行第一幀與最後一幀的像素比對以確保循環無縫。此外,它還整合了 `hyperframes` 工具用於匯出為適合 LinkedIn 或 Reels 等平台的高畫質 MP4 影片。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/charlie947/motion-graphics-skills/tree/main/skills/milestone-reveal

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

里程碑揭示,以程式碼實現

每個點代表一位追蹤者、一位訂閱者或一位客戶。它們匯聚成數字,停留片刻,然後再次飄散,使循環沒有跳躍感。

開始之前: 讀取 brand.md 和 MOTION.md(若存在)。如果不存在,請先執行 brand-intake,或詢問十六進位色碼、字型和標誌檔案。在取得這些資訊之前,切勿宣稱結果符合品牌規範。

步驟 1:詢問四件事,然後等待

  1. 數字,完全按照它應該顯示的樣子, 包含逗號。例如:「250,000」。
  2. 數字來源。 顯示該數字的儀表板截圖或連結。沒有來源,就沒有短片。
  3. 標籤, 逐字呈現。例如:「LinkedIn 粉絲數」。
  4. 品牌與尺寸。 背景、粒子與強調色、字型檔案(附件),以及尺寸。預設為 1080 x 1350,12 秒。

數字是使用者真實、有來源的數字。絕不進位,絕不加上「+」,絕不用目標值取代實際結果。如果來源顯示為 12,431,短片就顯示 12,431,或者由使用者自行選擇一個較低的整數。

步驟 2:建立簡報(貼入 Claude Code)

建立一個自包含的 HTML 檔案(Canvas),用於製作 12 秒無縫循環影片,尺寸為 [寬度] x [高度]。氛圍:高品質產品發表會,而非派對。沒有彈跳、超調、五彩紙屑或閃光爆發。

固定文字(真實數字,不可更改、四捨五入或重新樣式):"[數字]" 和 "[標籤]"。畫面上不得有其他文字。

品牌:背景 [背景色],粒子與數字 [墨水色],強調線 [強調色]。字型:附加的 [字型] 檔案,以 base64 嵌入。如果字型檔案遺失,請停止並詢問我。

粒子:約 3,200 個微小點,具有不同的不透明度和微弱的閃爍效果,宛如夜空。透過在離屏 Canvas 上以粗體繪製 "[數字]" 並對其填充像素進行取樣作為目標,來建構數字的形狀。將大部分點分配給數字,使其在資訊流尺寸下閱讀清晰,包含逗號。其餘點則保留為較暗淡的飄移星星。

時序:
1. 0-2 秒:點飄移。無其他動作。
2. 2-6.5 秒:點以漫長、交錯的緩動方式匯聚成數字,如同重力吸引,而非瞬間到位。
3. 6.5-7.5 秒:一條纖細的 [強調色] 線條從左到右畫在數字下方。
4. 7.5-8.5 秒:標籤淡入並向上移動約 12px 到位。
5. 8.5-10.5 秒:靜止。僅數字微微閃爍。
6. 10.5-12 秒:標籤與線條淡出,點飄回其精確的起始位置。第 12 幀與第 0 幀完全相同。

建構規則:每個位置使用固定的隨機種子。新增 window.seek(seconds) 函式,僅根據時間繪製任何精確幀。減少動畫模式應顯示靜止幀。

建置完成後:在 0、2、4.5、6.5、7.5、9.5、11 和 12 秒處捕捉幀。檢查數字是否完全顯示為 "[數字]",沒有任何部分被截斷或重疊,並且第 0 幀與第 12 幀完全相同。修復問題時,請保留每個較早的版本。

我學到的慘痛教訓

  • 數字在資訊流尺寸下看起來是灰色的。 覆蓋每個數字的點太少。解決方案:將 3,200 個點中的約 2,700 個分配給數字,每個點 2.5px,近乎全不透明。
  • Chrome 可能以兩種方式繪製同一幀。 重複讀取像素後,它會切換繪製模式,導致同一幀出現細微差異。請使用 willReadFrequently: true 建立 Canvas 上下文,這樣每次 seek 都會得到相同的像素。
  • 為所有內容設定種子。 在渲染時使用 Math.random() 會導致每次匯出都不同,並破壞循環。
  • 測量接縫,不要憑感覺判斷。 我通過的建置,其第 0 幀與第 12 幀之間有 0 像素的差異。

步驟 3:匯出

HyperFrames(免費、開源):npx skills add heygen-com/hyperframes,然後執行 npx hyperframes render。對於 LinkedIn 資訊流使用 1080 x 1350。對於 Reels,請將 MP4 交給 reel-export。將數字的來源放在標題中。

Individual skills in this repo

This repo contains 14 individual skills — each has its own dedicated page.

animated-chart

Make a looping animated chart for LinkedIn or a newsletter in code with Claude Code. Bars that become a line, a number that counts up, a before and after. Every value stays exactly as given. Use when someone says

apple-launch-film

Rebuild an Apple-style Mac launch film entirely in code with Claude Code. A thin menu bar, the black notch growing into widgets one scene at a time, full-screen gradient wallpapers and one short caption per scene. No screen recording, no After Effects. Use when someone says

brand-intake

The setup step every other skill in this pack reads. A short interview plus 3 to 5 reference frames becomes two files in your project, brand.md (who you are, what you sell, your assets) and MOTION.md (your colours, type, timing and motion rules), plus a rule in CLAUDE.md so Claude reads them before it animates anything. Use at the start of any motion project, or when someone says

launch-video

Make a 30-45 second product launch video in code with Claude Code, the kind SaaS companies post on launch day. One sentence split across scenes, real product screens with slow camera moves, a typed prompt, a proof beat and a clear call to action. Use when someone says

loop-cover

Turn a newsletter or blog cover into a seamless looping GIF at 896 x 640, 180 frames at 20fps. Only the one element you name moves, the loop is rotated so frame 1 shows the finished picture, and the seam is measured, not eyeballed. Use when someone says

model-showdown

Give the same motion brief to three AI models, keep each first try, render all three the same way and stack them into one comparison video with model names and logos. Makes a 16:9 side-by-side for a newsletter and a 1080 x 1920 stacked reel for Instagram and TikTok. Use when someone says

motion-brief-writer

Turns a rough idea for an animated graphic into a precise build brief for Claude Code, in your own brand. Asks for anything essential first (exact numbers, size, length, brand), keeps real results apart from sample data, and never invents a figure. Use when someone says

motion-effects

Build any of 16 premium motion effects from scratch in your own brand, as one 8-second looping HTML file with window.seek(seconds) so it exports frame-exact to MP4 or GIF. Interfaces (button to player, search to results, card to workspace, tabs to panels), data (chart morph, dashboard zoom, spring stack, magnetic dock), type (masked type, elastic type, text to layout, image reveal) and systems (perspective shift, glass focus, flowing paths, particle logo). Use when someone says

motion-prompt-writer

Write a complete 8-part Claude Motion prompt (The bar, Format, The one rule, Look, Motion, Never, Before you finish, The scene) for one short looping motion graphic, in your own brand. Takes your brand (a website screenshot, a logo, hex codes, or nothing for the Apple-style default) and one moment you want to show, in plain words. Use when someone says

newsletter-promo

Turn a newsletter edition into a 12-20 second promo clip for LinkedIn, Instagram or X that drives people to read and subscribe. Hook question, three proof frames from the edition, then the newsletter name and where to read it. Use when someone says

reel-export

Turn any horizontal or square motion video into a 1080 x 1920 Instagram Reel or TikTok that uploads cleanly. Headline and logos inside the safe zone, H.264, yuv420p, limited colour range, bt709, a silent audio track when there is no sound, and an ffprobe check before upload. Use when someone says

reference-to-motion

Turn references you admire into a scene-by-scene Claude Motion prompt for your own topic and brand. Takes a video for the moves (screenshots, frames or a contact sheet of a reel or ad) and, optionally, a look reference for the style (a website, a brand, a moodboard). Use when someone says

title-sequence-3d

Make a cinematic 3D title sequence (8-15 seconds) in code with Claude Code and Three.js. A camera moves through a lit scene, such as a rainy street at night with brand names as neon signs, then a big question or title lands. Use when someone wants a scroll-stopping opener, a film-style intro,

vox-explainer

Make a short Vox-style documentary explainer (30-60 seconds) entirely in code with Claude Code. Torn paper, halftone texture, bold condensed type, motion on twos. Use when someone says

相關技能