技能 faceswap
🎭

faceswap

中风险 ⚙️ 外部命令🌐 网络访问🔑 环境变量📁 文件系统访问

使用 AI 交换视频中的人脸

手动在视频中交换人脸速度慢且需要专业软件。本技能使用 verging.ai API 自动化整个工作流程,接受本地文件或 YouTube/Bilibili 链接作为输入,并直接输出结果。

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

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“faceswap”。 运行 /faceswap,使用视频 ./video.mp4 和人脸 ./face.jpg

预期结果:

  • 正在检查视频时长:22 秒
  • 所需额度:22(普通模式)
  • 正在将视频上传到云存储...
  • 任务已创建:job_id=295
  • 进度:25%... 50%... 75%... 100%
  • 结果:https://img.panpan8.com/face-swap/2026-05-31/result.mp4

正在使用“faceswap”。 将 YouTube 片段 10-25 秒区间以 HD 模式换脸

预期结果:

  • 正在从 YouTube 下载视频...
  • 正在裁剪到 10-25 秒...
  • 正在上传裁剪后的视频(15 秒,HD = 45 额度)...
  • 任务已创建:job_id=296
  • 状态:45 秒后完成
  • 结果已下载到:./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 命令配合不同输入,依次处理多个视频。

试试这些提示

基础本地文件换脸
运行 /faceswap,使用视频 ./video.mp4 和人脸图片 ./face.jpg 进行换脸。
使用 YouTube 链接并裁剪
运行 /faceswap,使用视频 https://youtube.com/watch?v=xxx、人脸 https://example.com/face.jpg,裁剪 10 到 25 秒区间,使用 HD 模式并自动下载结果。
远程人脸图片与自定义输出
运行 /faceswap,使用视频 ./input.mp4、一个远程人脸图片链接,并将输出保存到 /tmp/result.mp4。
带额度检查的完整流程
先检查我的 verging.ai 额度余额,然后运行 /faceswap,使用提供的视频和人脸链接,裁剪到 15 秒,使用 HD 模式并下载结果。

最佳实践

  • 在运行技能前设置 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