Use this skill when a user provides a web page URL, PDF file, video, or audio file and wants a Traditional Chinese summary. Prefer this skill for requests like "summarize this URL", "summarize this PDF", "summarize this video", "summarize this audio", "幫我摘要這篇", "這份報告重點是什麼", "幫我總結這段影片", "幫我摘要這段錄音", or when analyzing articles, documents, presentations, YouTube videos, audio recordings, or any content that needs a zh-TW summary. Automatically detects input type (web page, PDF, video, audio) — no manual type selection needed.
統一的摘要工具,自動偵測輸入類型(網頁 / PDF / 影片 / 音訊),使用 Gemini Interactions API 產出結構化的繁體中文(zh-TW)Markdown 摘要。
scripts/summarize.js 為預先建置的零依賴 bundle,不需 npm install| 類型 | 輸入格式 | 使用模型 |
|---|---|---|
| 網頁 | https://example.com/article | gemini-3-pro-preview |
本地 ./report.pdf 或遠端 URL | gemini-3-pro-preview | |
| 影片 | YouTube URL、影片 URL、本地影片檔、data URI | gemini-3.1-pro-preview |
| 音訊 | 本地音訊檔或遠端 URL | gemini-3-pro-preview |
data: 開頭 → 影片.pdf.pdf → PDF;影片副檔名 → 影片;音訊副檔名 → 音訊.mp4, .mkv, .webm, .mov, .avi, .3gp, .m4v, .mpeg, .mpg, .ogv.mp3, .wav, .aac, .ogg, .flac, .m4a, .aiff, .wma, .opus直接執行預建好的腳本,不需要先安裝依賴:
⚠️ 路徑安全:skill 腳本位於 repo 根目錄的
.agents/skills/下。若 cwd 不在 repo root,請先執行git rev-parse --show-toplevel取得絕對路徑,再cd到該路徑後執行。禁止在指令中使用$(...)語法(會被 Copilot CLI 安全過濾器擋下)。
node .agents/skills/summary/scripts/summarize.js <input>
# 網頁摘要
node .agents/skills/summary/scripts/summarize.js "https://example.com/posts/agentic-workflows"
# PDF 摘要(本地檔案)
node .agents/skills/summary/scripts/summarize.js "./reports/quarterly.pdf"
# PDF 摘要(遠端 URL)
node .agents/skills/summary/scripts/summarize.js "https://example.com/report.pdf"
# 影片摘要(YouTube)
node .agents/skills/summary/scripts/summarize.js "https://youtu.be/abc123"
# 影片摘要(本地檔案)
node .agents/skills/summary/scripts/summarize.js "./clips/demo.mp4"
# 音訊摘要(本地檔案)
node .agents/skills/summary/scripts/summarize.js "./recordings/meeting.mp3"
# 音訊摘要(遠端 URL)
node .agents/skills/summary/scripts/summarize.js "https://example.com/podcast.mp3"
自動偵測通常足夠,但可用 --type 覆蓋:
node .agents/skills/summary/scripts/summarize.js --type pdf "https://example.com/download?file=report"
node .agents/skills/summary/scripts/summarize.js --type audio "https://example.com/download?file=recording"
設定 SUMMARY_DRY_RUN=1 可在不呼叫 Gemini API 的情況下,預覽輸入偵測結果(JSON 格式):
SUMMARY_DRY_RUN=1 node .agents/skills/summary/scripts/summarize.js "https://youtu.be/abc123"
輸出為繁體中文 Markdown,包含以下區段:
**📝 內容摘要**
**📌 來源**
- 類型:網頁 / PDF文件 / 影片 / 音訊
- 標題:{title}
- 網址:{url}
**💡 核心概述**
{請以流暢的段落整理脈絡,包含:主題背景、關鍵論點與結論}
**🔍 重點條列**
- {重點 1:包含具體的細節、範例或解釋}
- {重點 2:包含具體的細節、範例或解釋}
- ...
**📊 關鍵數據與事實**
(如有關鍵數字、金額、日期或事實才以條列呈現,若無則省略)
- 項目:數值/日期/事實
**🎯 行動建議**
{具體建議或「目前無明確行動建議」}
⚠️ skill 腳本位於 repo 根目錄。若 cwd 不在 repo root,先獨立執行 git rev-parse --show-toplevel 取得路徑,再 cd 到該路徑後執行。禁止使用 $(...) 語法。
GEMINI_API_KEY。node .agents/skills/summary/scripts/summarize.js "<input>"
SUMMARY_DRY_RUN=1 測試輸入偵測是否正確。--type url|pdf|video|audio 手動指定。.mp3, .wav, .aac, .ogg, .flac, .m4a, .aiff, .wma, .opus| 錯誤訊息 | 說明 |
|---|---|
缺少 GEMINI_API_KEY | 未設定 API 金鑰環境變數 |
無法辨識輸入類型 | 輸入不是支援的 URL、PDF 或影片格式 |
fetch failed | 網頁抓取失敗(網路或狀態碼問題) |
無法讀取檔案 | 本地檔案無法存取 |
下載失敗(HTTP xxx) | 遠端 URL 回傳非 200 狀態碼 |
抓取逾時(30 秒) | 遠端資源下載超過 30 秒 |
scripts/summarize.js 是已提交的預建可執行產物;src/summarize.js 是可維護的原始碼。重建方式:
cd .agents/skills/summary
bun install
bun run build