kizemo

Ad Cut — AI skill for Claude Code

AI community

去除讲师课程录像中的赞助口播片段.

How to install Ad Cut

This entry records only its repository, not the path inside it, so there is no exact command to give. Open kizemo/ad-cut and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Ad Cut does

去除讲师课程录像中的赞助口播片段。LLM 关键词扩展 + faster-whisper 转写 + LLM 二次裁判 + ffmpeg 剪辑。

Alternatives in AI

  • Jcodemunch MCP — Cut AI token costs 95%+ on code exploration 2.6k ★
  • Azure OpenAI .net — GPT-4, embeddings, DALL-E, and Whisper client 1.8k ★
  • AI Avatar System — 🎭 AI Avatar / digital human platform — upload a photo, clone a voice, talk to any face in real time with lip 422 ★

README

ad-cut Skill · v0.4.1

去除讲师课程录像中的赞助口播片段。**自动识别 + 二次裁判 + 精确剪辑**。

⚠️ **v0.4.1 是 2026-10-13 从 handoff 文档反向重建的版本**,**不是** 2026-08-15 ship 的 v0.3.0 原版。Stage 1/4 LLM prompt 和 Stage 6 ffmpeg filter graph 完整命令为重建版本。Stage 0/3/5/7 结构性逻辑忠实于 handoff。

用法

# 设置环境(Windows Git Bash)
export ADCUT_PYTHON="/path/to/venv/Scripts/python.exe"   # faster-whisper 所在的 Python
export HF_ENDPOINT="https://hf-mirror.com"              # 国内必设
export HF_HUB_DISABLE_XET=1

# 触发
/ad-cut /path/to/lecture.mp4              # interactive
/ad-cut /path/to/lecture.mp4 --yes        # 跳 Stage 0 前的确认(Stage 5 仍 STOP)
"帮我把 lecture.mp4 的赞助剪掉"           # 自然语言触发

产物

产物 说明
_no-ads.mp4 剪后视频
_no-ads.edl.json Edit Decision List(可手动修改后重跑 Stage 6)
ad-cut//keywords.json Stage 1 扩展关键词
ad-cut//transcript.json Stage 2 ASR 转写
ad-cut//candidates.json Stage 3 关键词命中
ad-cut//judged.json Stage 4 LLM 二次裁判

安装

1. 系统依赖

winget install ffmpeg        # ffmpeg + ffprobe
winget install jqlang.jq     # jq(可选,SKILL.md 默认用 awk)

3. Python venv(⚠️ 必须 3.12,3.14 装不上 faster-whisper)

# Windows
py -3.12 -m venv myvenv
myvenv/Scripts/pip install faster-whisper

**Python 3.14 警告**:faster-whisper 依赖 cython,3.14 当前无 cython wheel。请用 Python 3.12。

2. 环境变量

写入 `~/.bashrc`(Git Bash)或 PowerShell profile:

export ADCUT_PYTHON="/c/Users//myvenv/Scripts/python.exe"
export HF_ENDPOINT="https://hf-mirror.com"
export HF_HUB_DISABLE_XET=1

验证

详见 `F:\soft\00selfmade\ad-cut\handoff-ad-cut-skill-2026-08-15.md`(v0.3.0 原版的 e2e 证据)。

FAQ

**Q: 重建版与原版 v0.3.0 有什么不同?** A: Stage 0/3/5/7 结构同原版;Stage 1/4 LLM prompt 措辞可能微调;Stage 6 ffmpeg filter graph 完整命令由"两个独立 concat"改为"单 concat interleaved"(per handoff VERIFY-FINDING-03 fix)。

**Q: Stage 3 0 命中就 STOP,合理吗?** A: 合理。课程录像本身可能没有广告,强行截几段会让视频逻辑断裂。STOP 提示用户"未检测到广告"。

**Q: Stage 5 dry-run gate 能否跳过?** A: 不能。`--yes` 标志只跳过 Stage 0