技能 faceswap
🎭

faceswap

中風險 ⚙️ 外部命令🌐 網路存取🔑 環境變數📁 檔案系統存取

使用 AI 替換影片中的臉孔

手動替換影片中的臉孔既緩慢又需要專業軟體。此技能透過 verging.ai API 自動化整個工作流程,接受本地檔案或 YouTube/Bilibili 網址作為輸入,並直接交付結果。

支援: Claude Codex Code(CC)
⚠️ 61
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

測試它

正在使用「faceswap」。 Run /faceswap with video ./video.mp4 and face ./face.jpg

預期結果:

  • Checking video duration: 22 seconds
  • Credits needed: 22 (normal mode)
  • Uploading video to cloud storage...
  • Job created: job_id=295
  • Progress: 25%... 50%... 75%... 100%
  • Result: https://img.panpan8.com/face-swap/2026-05-31/result.mp4

正在使用「faceswap」。 Swap the face in a YouTube clip from 10-25 seconds in HD mode

預期結果:

  • Downloading video from YouTube...
  • Trimming to 10-25 seconds...
  • Uploading trimmed video (15 seconds, HD = 45 credits)...
  • Job created: job_id=296
  • Status: COMPLETED after 45 seconds
  • Result downloaded to: ./result_hd.mp4

安全審計

中風險
v3 • 6/8/2026

The skill is a documentation/instruction file (no executable code) that guides an AI assistant to run shell commands (yt-dlp, ffmpeg, curl) and make API calls to verging.ai. All 82 static findings are false positives in context: backtick patterns are markdown code examples, URLs are legitimate API endpoints, API key references are standard authentication documentation, and temp directory access is standard media processing. The combination of network + credentials + external commands is expected for this use case. No malicious intent detected. Risk level is medium due to the breadth of system access required.

2
已掃描檔案
225
分析行數
9
發現項
3
審計總數
中風險問題 (1)
Broad system access required
The skill requires yt-dlp, ffmpeg, ffprobe, and curl binaries plus the VERGING_API_KEY environment variable. While all usages are documented and legitimate for face-swap workflows, the combination of network access, external command execution, credential handling, and filesystem write access represents a significant attack surface if the skill were modified maliciously. This is a known characteristic of media-processing skills, not a current vulnerability.
低風險問題 (4)
Temp directory usage in /tmp
The skill uses /tmp/verging-faceswap/ for intermediate video and image files. This is standard practice for media processing but files may persist if not cleaned up. The documentation recommends cleanup. Low risk.
Static analyzer false positives: backtick patterns
The static scanner flagged 44 instances of 'Ruby/shell backtick execution' in markdown files. These are all code-block examples in documentation showing curl, ffmpeg, and yt-dlp commands. They are not executable code in the skill itself. False positive.
Static analyzer false positives: hardcoded URLs
17 URL references flagged as suspicious are all legitimate API endpoints (verging.ai/api/v1/*) and documentation links. False positive.
Static analyzer false positives: weak cryptography
The 'weak cryptographic algorithm' findings at SKILL.md:3 and SKILL.md:33 are likely false positives triggered by the term 'key' in API key context or video codec references (libx264). No actual cryptographic operations are performed by the skill.
審計者: claude 查看審計歷史 →

品質評分

38
架構
100
可維護性
87
內容
22
社群
52
安全
91
規範符合性

你能建構什麼

內容創作者快速編輯

在短片中替換臉孔以製作社群媒體內容,無需開啟影片編輯器。

YouTube 影片臉孔替換

提供 YouTube 網址和臉孔圖片,即可自動下載替換後的結果。

批次臉孔替換自動化

使用 CLI 指令搭配不同輸入重複執行,以依序處理多部影片。

試試這些提示

基本本地檔案替換
Run /faceswap with video ./video.mp4 and face image ./face.jpg to swap the face.
YouTube 網址搭配裁剪
Run /faceswap with video https://youtube.com/watch?v=xxx, face https://example.com/face.jpg, trimming from 10 to 25 seconds in HD mode and auto-downloading the result.
遠端臉孔圖片搭配自訂輸出
Run /faceswap with video ./input.mp4, a remote face image URL, and save the output to /tmp/result.mp4.
含額度檢查的完整流程
First check my verging.ai credit balance, then run /faceswap with the provided video and face URL, trim to 15 seconds, use HD mode, and download the result.

最佳實務

  • 在執行技能前先設定 VERGING_API_KEY 環境變數,以避免在指令中傳遞金鑰
  • 將影片裁剪至所需的最短片段,以減少額度消耗
  • 預覽時使用普通模式,僅在最終輸出時使用 HD 模式以節省額度
  • 處理完畢後清理 /tmp/verging-faceswap/,以避免在磁碟上留下媒體檔案

避免

  • 請勿直接在指令列中傳遞 API 金鑰,以免出現在 shell 歷史記錄或行程列表中
  • 請勿對 upload-video 端點使用 JSON 主體(-d);它需要 multipart 表單資料(-F)
  • 請勿嘗試透過 /upload-video 單獨上傳臉孔圖片;create-job 端點可直接接受 swap_image=@path

常見問題

支援的最大影片長度是多少?
30 秒。超過 30 秒的影片會自動裁剪。
如何取得 verging.ai API 金鑰?
前往 verging.ai 登入,點擊右上角的頭像,然後進入 API Keys 即可建立。
需要哪些外部工具?
yt-dlp 用於下載影片,ffmpeg 和 ffprobe 用於裁剪,curl 用於 API 請求。
臉孔替換的成本是多少?
普通模式每秒消耗 1 點額度。HD 模式每秒消耗 3 點額度。
可以使用 YouTube 和 Bilibili 網址嗎?
可以,此技能透過 yt-dlp 支援 YouTube 和 Bilibili 影片網址。
暫存檔案儲存在哪裡?
中介檔案儲存於 /tmp/verging-faceswap/,使用後應予以清理。

開發者詳情

檔案結構

📄 README.md

📄 SKILL.md