Communitygithub.com

digitaleflex/GitHub-Cyber-Scanner-Pro

專業電影級影片製作技能。為產品、服務、活動、SaaS、企業與品牌創作具故事性的 1920x1080 MP4 影片。

GitHub-Cyber-Scanner-Pro 是什麼?

GitHub-Cyber-Scanner-Pro 是一個基於 HyperFrames 的全端電影級影片製作技能,專為 Claude Code、Cursor 或 Codex 等 AI 代理設計。它能自動化從腳本撰寫、語音生成(使用 Kokoro TTS,支援 bm_george、af_heart 等多種聲音)、語音轉文字(Whisper)生成同步字幕,到 Canvas 2D 粒子特效、SVG 動畫、動態排版、劃線強調、多場景轉場(如 glitch、push、blur、color blocks)等豐富動畫的完整生產流程。此技能遵循嚴格的製作順序:簡報(brief)→ 腳本(script)→ 設計系統(design.md)→ 語音(voiceover)→ 逐字稿(transcript)→ 場景節奏規劃(scene rhythm planning)→ 組合(composition)→ 語法檢查(lint)→ 驗證(validate)→ 最終渲染(render)。使用者只需提供產品、服務或品牌的基本資訊,技能就能自動產出高品質的宣傳影片,特別適合製作產品示範、服務推廣、活動預告、品牌發表、企業簡報、社群廣告或公告影片。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/digitaleflex/GitHub-Cyber-Scanner-Pro/tree/HEAD/.agents/skills/video-creator

在你喜歡的 AI 中提問

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

說明文件

影片創作者

專業電影級影片製作,適用於產品、服務、活動與品牌。每次輸出皆為 1920×1080 MP4,包含語音、同步字幕、豐富動畫與多場景轉場。

快速開始 (3 個指令)

# 1. 初始化專案
npx --yes [email protected] init my-video

# 2. 生成語音
python3 -c "from kokoro_onnx import Kokoro; import soundfile as sf; k=Kokoro('models/kokoro-v1.0.onnx','models/voices-v1.0.bin'); s,r=k.create(open('script.txt').read(),voice='bm_george',speed=0.92,lang='en-gb'); sf.write('narration.wav',s,r)"

# 3. 轉錄字幕
npx --yes [email protected] transcribe narration.wav --model small.en

# 4. 渲染
npx --yes [email protected] render

生產流程

務必依下列順序進行 — 不可跳過任何步驟:

1.  簡報       → 觀眾、平台、時長、調性
2.  腳本       → 撰寫旁白 (~2.5 字/秒),開頭要吸引人
3.  design.md  → 品牌色、字型、動態能量
4.  語音       → npx hyperframes tts 或直接使用 python kokoro_onnx
5.  逐字稿     → npx hyperframes transcribe → transcript.json
6.  規劃       → 在撰寫任何 HTML 前宣告場景節奏
7.  建構       → 先完成版面 → 再進行 GSAP 動畫
8.  語法檢查   → npx hyperframes lint (需 0 錯誤)
9.  驗證       → npx hyperframes validate --no-contrast
10. 渲染       → npx hyperframes render

步驟 1 — 簡報

提問(或從上下文推斷):

  • 主題:產品 / 服務 / 活動 / 品牌?
  • 觀眾:企業、開發者、消費者、投資人?
  • 平台:社群媒體 (15 秒)、網站首頁 (30 秒)、產品示範 (60 秒)、簡報?
  • 調性:權威、活力、溫暖、戲劇、技術?
  • 素材:品牌色、Logo、螢幕截圖、現有文案?

閱讀 references/brief-templates.md 以取得針對不同觀眾的起點。

步驟 2 — 腳本撰寫

節奏公式: 自然語速每秒 2.5 字

  • 15 秒 → ~37 字
  • 30 秒 → ~75 字
  • 60 秒 → ~150 字

結構: 鉤子 → 問題/故事 → 證明 → 行動呼籲

鉤子模式(請勿使用一般開場白):

  • 大膽主張:"The financial infrastructure that powers modern engineering."
  • 對比:"Your agents are deployed. Nobody's watching them."
  • 提問:"What if your entire team — human and AI — moved as one?"
  • 數字震撼:"Forty percent of enterprise AI projects fail at governance."

依觀眾選擇語調:

  • 企業 → 宣告式、穩重、bm_george 聲音
  • 開發者 → 直接、技術性、am_adam 聲音
  • 消費者 → 溫暖、故事導向、af_heart 聲音
  • 新創/活力 → 節奏明快、af_sky 聲音

腳本中請將數字寫成單詞(TTS 會逐字朗讀):10x → ten times,$2.3T → nearly two point three trillion dollars。

閱讀 references/script-patterns.md 以取得各類影片的完整腳本範例。

步驟 3 — 設計系統 (design.md)

在撰寫任何 HTML 之前,務必建立 design.md。它定義了品牌契約。

必要欄位:

colors:
  bg: "#0A0A0A"           # 主背景色 (深色或淺色)
  accent: "#E63946"       # 主要行動色
  accent2: "#10b981"      # 次要強調色
  text: "#FFFFFF"
  muted: "#999999"
  border: "#141111"
typography:
  headline: { fontFamily: "Space Grotesk", fontWeight: 800 }
  label:    { fontFamily: "Space Mono", fontWeight: 700 }
motion:
  energy: high | medium | low
  transition: glitch | blur | push | cover

視覺風格選擇器(閱讀 references/visual-styles.md 以取得完整 YAML 標記):

風格最適合特徵
解構式科技、SaaS、安全掃描線、粗獷邊框、Space Grotesk/Mono
極繁主義上市發表、公告大型字體填滿畫面、色彩碰撞
天鵝絨標準企業、奢華寬字距、大空間
數據漂移AI、ML、金融科技粒子場、細長未來感無襯線字
暗影剪影戲劇性揭露、安全近單色 + 血色強調
民謠頻率消費者、社群大膽色彩、彈跳、圖案

步驟 4 — 語音生成

透過 npx(首選,若可用)

npx --yes [email protected] tts script.txt --voice bm_george --output narration.wav --speed 0.92

透過 Python 直接執行(npx 失敗時的備案)

# 首次執行:下載模型 (~340MB 總計,會快取)
curl -L -o models/kokoro-v1.0.onnx \
  https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/kokoro-v1.0.onnx
curl -L -o models/voices-v1.0.bin \
  https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/voices-v1.0.bin

# 生成
python3 << 'EOF'
from kokoro_onnx import Kokoro
import soundfile as sf
k = Kokoro("models/kokoro-v1.0.onnx", "models/voices-v1.0.bin")
text = open("script.txt").read().strip()
samples, rate = k.create(text, voice="bm_george", speed=0.92, lang="en-gb")
sf.write("narration.wav", samples, rate)
print(f"Generated: {len(samples)/rate:.1f}s")
EOF

聲音指南:

聲音特色適用時機
bm_george權威英國男聲企業、B2B、主題演講
bf_emma清晰英國女聲教學、文件、高級內容
am_michael自信美國男聲行銷、宣傳、SaaS
am_adam中立美國男聲開發者工具、解說
af_heart溫暖美國女聲消費者、健康、個人
af_sky活力美國女聲社群廣告、新推出、生活風格

安裝相依套件(一次性):

pip install kokoro-onnx soundfile

步驟 5 — 轉錄(逐字字幕)

npx --yes [email protected] transcribe narration.wav --model small.en
# → 產生 transcript.json,包含逐字時間戳

輸出格式:

[
  { "text": "Enterprise", "start": 0.03, "end": 0.82 },
  { "text": "teams", "start": 0.82, "end": 1.18 }
]

使用時間戳來:

  1. 將場景轉場錨定在口語句子的邊界
  2. 驅動逐字字幕動畫(逐字彈入)
  3. 將視覺強調效果(爆發線、高亮)與關鍵名詞同步

步驟 6 — 場景節奏規劃

在撰寫任何 HTML 之前,先宣告節奏。 命名模式:

SLAM → 呼吸 → CASCADE → PUNCH → CTA           (產品上市)
PAIN → GLIMPSE → PROOF → CONVICTION              (問題/解決方案)
HOOK → STORY → PROOF → SCALE → CTA              (企業簡報)
TEASE → REVEAL → DETAIL → DETAIL → CTA          (功能展示)

場景時間模板 (30 秒企業):

場景 1: 問題/鉤子      0–7 秒    (旁白第 1-2 句)
場景 2: 平台介紹     7–10 秒    (旁白第 3 句)
場景 3: 功能示範    10–17 秒    (旁白第 4-5 句)
場景 4: 證明/統計    17–21 秒    (旁白第 6 句)
場景 5: 規模化      21–28 秒    (旁白第 7-8 句)
場景 6: 行動呼籲    28–32 秒    (旁白第 9 句)

閱讀 references/scene-timing.md 以取得各時長的時間模板。

步驟 7 — 建構組合

HTML 結構(強制)

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
<style>
body { margin:0; width:1920px; height:1080px; overflow:hidden; background:#0A0A0A; }
.scene { position:absolute; top:0; left:0; width:1920px; height:1080px; overflow:hidden; }
#s1 { z-index:1; background:#0A0A0A; }        /* 場景 1 — 預設可見 */
#s2 { z-index:2; background:#0A0A0A; opacity:0; }  /* 其他全部隱藏 */
</style>
</head>
<body>
<div id="root" data-composition-id="main" data-width="1920" data-height="1080"
     data-start="0" data-duration="32">

  <!-- 音訊(與影片分開,永遠如此) -->
  <audio id="vo" data-start="0" data-duration="31.1" data-track-index="10"
         data-volume="1" src="narration.wav"></audio>

  <!-- 轉場疊加層(永遠在所有場景之上) -->
  <div id="ov-r" style="position:absolute;top:0;left:0;width:1920px;height:1080px;z-index:80;background:#E63946;opacity:0;pointer-events:none"></div>

  <!-- 場景 -->
  <div id="s1" class="scene"><!-- 內容 --></div>
  <div id="s2" class="scene"><!-- 內容 --></div>
</div>

<script>
window.__timelines = window.__timelines || {};
var tl = gsap.timeline({ paused: true });
// ... 動畫 ...
window.__timelines["main"] = tl;
</script>
</body>
</html>

先完成版面再動畫(不可協商)

  1. 先用純 CSS 建立每個場景的最終狀態
  2. 內容容器:display:flex; flex-direction:column; padding:120px 160px; width:100%; height:100%;
  3. 內容上絕不使用 position:absolute; top:Npx — 僅用於裝飾元素
  4. 版面確認後再加入 gsap.fromTo()
  5. 執行 npx hyperframes inspect 以確認無溢出

GSAP 規則

// 在場景內永遠使用 fromTo(而非 from),以確保可確定性搜尋
tl.fromTo("#el", { opacity:0, y:40 }, { opacity:1, y:0, duration:0.5, ease:"back.out(2)" }, 1.2);

// 絕不單獨使用 gsap.to() 進行環境運動 — 必須在 tl 上
tl.to("#glow", { scale:1.08, yoyo:true, repeat:4, duration:2, ease:"sine.inOut" }, 0);

// 絕不使用 repeat:-1(會破壞擷取引擎)— 計算有限重複次數
// 對於 4 秒的節拍:Math.ceil(4 / 2) = 2 個週期
tl.to("#pulse", { scale:1.1, yoyo:true, repeat:3, duration:2, ease:"sine.inOut" }, 0);

// 硬終止場景退出
tl.set("#s1", { opacity:0, visibility:"hidden" }, exitTime);

// 永遠註冊
window.__timelines["main"] = tl;

場景密度要求

每個場景必須包含:

  • 背景層:徑向光暈 + 網格/圖案 + 幻影文字 + 掃描線(2–5 個元素)
  • 內容層:標題 + 副標題 + 支援元素(3–5 個元素)
  • 前景裝飾:角落標記 + 分隔線 + 標籤/徽章(3+ 個元素)
  • 總計:至少 8–10 個視覺元素

閱讀 references/scene-density.md 以取得每個場景的元素檢查清單。

轉場庫

閱讀 references/transitions.md 以取得完整程式碼。快速選擇:

能量轉場程式碼模式
混亂 → 清晰模糊交叉淡化tl.to(old, {filter:"blur(14px)",scale:1.04,opacity:0,duration:0.5})
升級垂直推入tl.to(old,{y:-1080,duration:0.45,ease:"power3.inOut"}, T)
下一個項目向左滑推tl.to(old,{x:-1920,duration:0.45,ease:"power3.inOut"}, T)
硬切黑幕顏色漸變tl.to("#ov-k",{opacity:1,duration:0.25}) 然後 tl.set(new,{opacity:1})
重要時刻交錯色塊紅色接著綠色色塊滑過畫面,下方交換場景
工業風故障效果RGB 疊加抖動,6 幀 ±40px,0.35 秒

轉場前無退出動畫,除非是最後一個場景淡出至黑幕。

動畫技術庫

1. Canvas 2D 粒子場(背景環境)

<canvas id="bg-canvas" width="1920" height="1080" style="position:absolute;top:0;left:0;z-index:1"></canvas>
<script>
var c=document.getElementById("bg-canvas"),ctx=c.getContext("2d");
function h(x,y){var n=x*374761393+y*668265263;n=(n^(n>>13))*1274126177;return((n^(n>>16))&0x7fffffff)/0x7fffffff}
var N=120, pts=[];
for(var i=0;i<N;i++) pts.push({bx:h(i,0)*1920,by:h(i,1)*1080,vx:(h(i,3)-0.5)*0.3,vy:(h(i,4)-0.5)*0.2,r:1+h(i,2)*2.5});
var px={t:0};
tl.to(px,{t:DURATION,duration:DURATION,ease:"none",onUpdate:function(){
  var ti=px.t;
  ctx.clearRect(0,0,1920,1080);
  // grid
  ctx.strokeStyle="rgba(230,57,70,0.04)"; ctx.lineWidth=1;
  for(var gx=0;gx<1920;gx+=160){ctx.beginPath();ctx.moveTo(gx,0);ctx.lineTo(gx,1080);ctx.stroke()}
  for(var gy=0;gy<1080;gy+=120){ctx.beginPath();ctx.moveTo(0,gy);ctx.lineTo(1920,gy);ctx.stroke()}
  // particles
  for(var i=0;i<N;i++){
    var p=pts[i],x=(p.bx+p.vx*ti*60)%1920,y=(p.by+p.vy*ti*60)%1080;
    if(x<0)x+=1920;if(y<0)y+=1080;
    ctx.fillStyle="rgba(230,57,70,"+(0.15+0.1*h(i,Math.floor(ti*6)))+")";
    ctx.fillRect(x-p.r/2,y-p.r/2,p.r,p.r);
  }
}},0);
</script>

2. SVG 手繪底線

<span style="position:relative;display:inline-block">
  關鍵詞句
  <svg style="position:absolute;left:0;bottom:-8px;width:100%;height:20px" viewBox="0 0 500 20" preserveAspectRatio="none">
    <path id="scr" fill="none" stroke="#E63946" stroke-width="3" stroke-linecap="round"
      stroke-dasharray="800" stroke-dashoffset="800"
      d="M0,10 Q62,0 125,10 Q187,20 250,10 Q312,0 375,10 Q437,20 500,10"/>
  </svg>
</span>
<script>
// 在 DOM 中存在 path 元素後:
var p=document.getElementById("scr"), l=p.getTotalLength();
gsap.set(p,{strokeDasharray:l,strokeDashoffset:l});
tl.to("#scr",{strokeDashoffset:0,duration:0.7,ease:"power1.inOut"}, START);
</script>

3. 逐字動態標題(與語音同步)

<div id="headline">
  <span class="w" id="w0">Ship</span>
  <span class="w" id="w1">faster.</span>
  <span class="w" id="w2">CyberAgent.</span>
</div>
<script>
// 時間來自 transcript.json 的單字起始時間
var times = [0.0, 0.3, 0.7];
var eases = ["back.out(2.5)", "expo.out", "back.out(3)"];
var dirs  = [{y:60,rotation:4}, {y:80,scale:0.7}, {scale:0.5,rotation:-5}];
times.forEach(function(t,i){
  tl.fromTo("#w"+i,
    Object.assign({opacity:0},dirs[i]),
    Object.assign({opacity:1,y:0,scale:1,rotation:0,duration:0.45,ease:eases[i]},{}),
    t);
});
</script>

4. 爆發線(統計資料揭露)

<div style="position:relative;display:inline-block">
  <div id="stat-num">10×</div>
  <div style="position:absolute;top:50%;left:50%;width:0;height:0" id="burst">
    <span style="position:absolute;display:block;width:3px;height:52px;background:#E63946;left:-1.5px;top:-52px;transform:rotate(0deg);transform-origin:bottom center;opacity:0"></span>
    <span style="position:absolute;display:block;width:3px;height:38px;background:#E63946;left:-1.5px;top:-38px;transform:rotate(36deg);transform-origin:bottom center;opacity:0"></span>
    <!-- 以 30-45 度遞增,重複 8-12 條線 -->
    <script>
    // 在 DOM 中建立爆發線元素後:
    var lines = document.querySelectorAll("#burst > span");
    for(var i=0;i<lines.length;i++){
      tl.fromTo(lines[i], {opacity:0, scaleY:0}, {opacity:1, scaleY:1, duration:0.3, ease:"back.out(1.7)"}, 10.2 + i*0.03);
    }
    </script>
  </div>
</div>

5. 動態排版(旋轉與比例)

<h1 id="kinetic-header" style="font-family:'Space Grotesk';font-size:120px;font-weight:800;letter-spacing:-2px;line-height:1;color:#FFFFFF;">
  <span class="kr" style="display:inline-block">下一個</span>
  <span class="kr" style="display:inline-block;color:#E63946">時代</span>
</h1>
<script>
var kr = document.querySelectorAll(".kr");
for(var i=0;i<kr.length;i++){
  tl.fromTo(kr[i], {rotationX:-90, y:60, opacity:0}, {rotationX:0, y:0, opacity:1, duration:0.5, ease:"expo.out"}, 2.0 + i*0.15);
}
</script>

6. 區塊轉場(色塊)

<div id="color-blocks" style="position:absolute;top:0;left:0;width:1920px;height:1080px;z-index:90;pointer-events:none;display:flex;opacity:0">
  <div style="flex:1;background:#E63946;transform:scaleX(0);transform-origin:left"></div>
  <div style="flex:1;background:#10b981;transform:scaleX(0);transform-origin:left"></div>
</div>
<script>
// 在場景切換時觸發:
tl.to("#color-blocks", {opacity:1, duration:0.1}, 14.0);
tl.to("#color-blocks > div:first-child", {scaleX:1, duration:0.35, ease:"power3.inOut"}, 14.1);
tl.to("#color-blocks > div:last-child", {scaleX:1, duration:0.35, ease:"power3.inOut"}, 14.15);
tl.set("#s2", {opacity:1}, 14.25);  // 在色塊下方交換場景
tl.to("#color-blocks > div", {scaleX:0, duration:0.35, ease:"power3.inOut"}, 14.45);
tl.to("#color-blocks", {opacity:0, duration:0.1}, 14.8);
</script>

7. 故障轉場疊加層

<div id="glitch-overlay" style="position:absolute;top:0;left:0;width:1920px;height:1080px;z-index:85;pointer-events:none;opacity:0;mix-blend-mode:screen">
  <div id="glitch-r" style="position:absolute;top:0;left:0;width:1920px;height:1080px;background:#E63946"></div>
  <div id="glitch-b" style="position:absolute;top:0;left:0;width:1920px;height:1080px;background:#2A7DE1"></div>
</div>
<script>
// 在場景切換時:
tl.to("#glitch-overlay", {opacity:1, duration:0.05}, 14.0);
tl.to("#glitch-r", {x:-40, opacity:0.5, duration:0.05}, 14.0);
tl.to("#glitch-b", {x:40, opacity:0.5, duration:0.05}, 14.0);
tl.to("#glitch-overlay", {opacity:0, duration:0.05}, 14.15);
tl.to("#glitch-overlay", {opacity:1, duration:0.05}, 14.18);
tl.to("#glitch-r", {x:40, opacity:0.3, duration:0.05}, 14.18);
tl.to("#glitch-b", {x:-40, opacity:0.3, duration:0.05}, 14.18);
tl.set("#s2", {opacity:1}, 14.22);
tl.to("#glitch-overlay", {opacity:0, duration:0.02}, 14.25);
tl.set("#glitch-r,#glitch-b", {x:0, opacity:0}, 14.28);
</script>

參考資料

檔案用途
references/brief-templates.md各類觀眾與平台的簡報範本
references/script-patterns.md各影片類型的完整腳本範例
references/visual-styles.md六種視覺風格的 YAML 標記
references/scene-density.md每個場景的元素檢查清單
references/scene-timing.md各時長的場景時間模板
references/transitions.md完整轉場程式碼片段

品質檢查

輸出前執行:

# 語法檢查(0 錯誤要求)
npx hyperframes lint

# 驗證(跳過對比度檢查 — 創意設計中可接受)
npx hyperframes validate --no-contrast

# 查看時間軸視覺化
npx hyperframes inspect

# 最終渲染
npx hyperframes render

常見錯誤與修復:

錯誤原因修復
Element not found選擇器在 DOM 中找不到元素確認 HTML 中的 id/class 與 GSAP 選擇器相符
Cannot renderGSAP 時間軸未註冊確認 window.__timelines["main"] = tl
No audioaudio 標籤屬性不完整確認 data-start、data-duration、data-track-index 存在
Overflow內容超出 1920×1080使用 npx hyperframes inspect 找出,修正 CSS
Invalid transition轉場時間重疊或順序錯誤在時間軸上留下 0.05–0.1 秒間隙

相關技能