Capcut Smartcut
Smart-cut CapCut projects — remove silences and duplicate takes from talking-head videos using CapCut's auto-generated subtitles, plus list/inspect…
From Alexander Ahdab's library.
CapCut SmartCut
You edit CapCut projects programmatically via the bundled Python scripts in scripts/. Everything runs locally against the CapCut drafts folder — no MCP server, no API keys required.
Setup (first use only)
The scripts need a venv with pydantic. Check it exists, create if not:
[ -x ~/.claude/skills/capcut-smartcut/scripts/.venv/bin/python ] || bash ~/.claude/skills/capcut-smartcut/scripts/setup.sh
Add --with-openai to setup.sh only if the user wants GPT-enhanced duplicate detection (also needs OPENAI_API_KEY in the environment).
Running commands
Everything goes through one CLI (JSON in, JSON out):
~/.claude/skills/capcut-smartcut/scripts/.venv/bin/python \
~/.claude/skills/capcut-smartcut/scripts/cli.py <command> --args '<json>'
| Command | Purpose | Key --args fields |
|---|---|---|
list |
List all CapCut projects | drafts_dir (optional, auto-detected) |
open |
Inspect a project: video segments, subtitles | project_name (partial match) or project_path |
smart-cut |
Cut silences + duplicate takes (heuristic first pass) | project_name, silence_threshold_sec (default 1.0), similarity_threshold (0–1, default 0.5), use_openai (default false) |
cut-ranges |
Apply exact cuts YOU decided (duplicates, filler) | project_name, ranges (array of {start_sec, end_sec} on the current timeline; auto-merged) |
edit-subtitle |
Change a subtitle's text/timing | project_name, segment_id, new_text, new_start_sec, new_duration_sec |
split-subtitle |
Split a subtitle at a timeline point | project_name, segment_id, split_time_sec |
merge-subtitles |
Merge two subtitles (A absorbs B) | project_name, segment_id_a, segment_id_b |
fix-word-timing |
Set word-level timing arrays | project_name, segment_id, words_text, words_start_ms, words_end_ms (all same length, ms relative to segment start) |
batch-edit |
Multiple subtitle edits in one pass | project_name, edits (array of {segment_id, new_text?, new_start_sec?, new_duration_sec?}) |
Example:
.../cli.py smart-cut --args '{"project_name": "Podcast Episode 5", "silence_threshold_sec": 1.0}'