Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

smart-cut

Content-aware video editor skill for Claude Code.

Transcribes speech with Groq Whisper (word-level timestamps), Claude reviews cuts by context and meaning, ffmpeg applies them preserving audio quality.


How it works

/smart-cut <video_path> [language]
  1. Transcribe — Groq Whisper whisper-large-v3 extracts word-level timestamps
  2. Auto-segment — script groups words by silence gaps, removes fillers, generates keep segments
  3. Contextual review — Claude reads the transcript and fixes semantic issues the script can't detect
  4. Apply cuts — ffmpeg encodes each segment and concatenates with no re-mux artifacts

Modes

Mode Description
Automatic Claude decides all cuts and applies them directly
Editable You review the segment list, mark what to remove, confirm before cutting

Cut levels

Level Gap threshold Use when
Normal > 1.0s Natural pacing, conversational videos
HARD > 0.5s Fast-paced Reels / short-form content

Both levels still respect speech context — no cut breaks a sentence.


Requirements

  • ffmpeg in PATH
  • python3 with requests (pip install requests)
  • GROQ_API_KEY in ~/.config/watch/.env

Files

SKILL.md                  # Skill instructions loaded by Claude Code
scripts/
  transcribe.py           # Calls Groq Whisper, outputs word-level JSON + gap report
  auto_segment.py         # Builds keep-segments from transcript JSON
  cut.py                  # ffmpeg encode-per-segment + concat

Setup

# Clone into your Claude Code skills directory
git clone https://github.com/josephcribeiro/smart-cut \
  ~/.claude/skills/smart-cut

Claude Code picks it up automatically via the /smart-cut trigger in SKILL.md.


Usage

/smart-cut /path/to/video.mp4
/smart-cut /path/to/video.mp4 en

Claude will ask for mode (automatic/editable) and cut level (normal/HARD) before processing.


Output

  • <video>.transcript.json — full transcript with word timestamps
  • <video>.segments.json — final keep-segments after review
  • <video_name>_edited.mp4 — H.264 + AAC 192kbps, ready to publish

About

Content-aware video editor skill for Claude Code — transcribes with Groq Whisper, Claude reviews by context, ffmpeg applies cuts.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages