Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/danielrosehill-dedupe-clips
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/dedupe-clips
Tools it pre-approves 22
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
Bash(test*),Bash(lsBash(mkdirBash(mvBash(rmBash(findBash(statBash(sha256sumBash(sortBash(uniqBash(awk
Show 10 more
Bash(ffmpegBash(ffprobeBash(jqBash(basenameBash(dirnameBash(realpathBash(printfBash(python3Read,Write
What's inside
- Skill name
dedupe-clips- Description
- Find duplicate or near-duplicate clips in a folder. Two modes — `exact` (sha256 of file bytes, fastest, catches true duplicates) and `perceptual` (sample frames + dHash, catches re-encodes / format converts of the same source). Use when the user says "find duplicate clips", "dedupe this folder", "remove duplicate videos", "flatten and dedupe". Quarantines duplicates to `_duplicates/` by default; never deletes without explicit confirmation.
- License
- MIT
- Allowed tools
- Bash(test, *),, Bash(ls, *),, Bash(mkdir, *),, Bash(mv, *),, Bash(rm, *),, Bash(find, *),, Bash(stat, *),, Bash(sha256sum, *),, Bash(sort, *),, Bash(uniq, *),, Bash(awk, *),, Bash(ffmpeg, *),, Bash(ffprobe, *),, Bash(jq, *),, Bash(basename, *),, Bash(dirname, *),, Bash(realpath, *),, Bash(printf, *),, Bash(python3, *),, Read,, Write
- Instructions
- 137 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves some shell commands
Files (1)
- SKILL.md
SKILL.md (first lines)
# Dedupe Clips
Identify duplicate or near-duplicate video clips in a folder. Always quarantine, never auto-delete.
## Procedure
### 1. Inputs
| Field | Default |
|-------|---------|
| Source folder | required |
| Mode | `exact` (sha256) — `perceptual` (frame-hash) for finding re-encodes |
| Recursive | `no` |
| Hamming threshold (perceptual) | `8` (out of 64 bits) |
| Frames to sample (perceptual) | `5` |
| Action | `quarantine` (move dups to `_duplicates/`) — `delete` requires explicit confirmation |
| Keeper | `largest` (keep biggest file) — alternatives: `oldest`, `newest`, `first` (alpha) |
### 2. Enumerate
```bash
SRC="$(realpath "$INPUT")"
test -d "$SRC" || { echo "Not a folder: $SRC"; exit 1; }
if [ "$RECURSIVE" = "yes" ]; then
mapfile -t FILES < <(find "$SRC" -type f \( -iname '*.mp4' -o -iname '*.mov' -o -iname '*.mkv' -o -iname '*.avi' -o -iname '*.m4v' -o -iname '*.webm' \) -not -path '*/_duplicates/*')
else
mapfile -t FILES < <(find "$SRC" -maxdepth 1 -type f \( -iname '*.mp4' -o -iname '*.mov' -o -iname '*.mkv' -o -iname '*.avi' -o -iname '*.m4v' -o -iname '*.webm' \))
fi
```
### 3a. Mode: exact
```bash
sha256sum "${FILES[@]}" | sort > /tmp/hashes.txt
awk '{print $1}' /tmp/hashes.txt | sort | uniq -d > /tmp/dup_hashes.txt
```
For each duplicate hash, group the files. Apply the keeper rule and mark the rest for quarantine.
### 3b. Mode: perceptual
For each file, sample `N` frames at evenly-spaced timestamps and compute a dHash per frame. Concatenate the per-frame dHashes; two clips are near-duplicates if **all** frame-pair Hamming distances are `≤ THRESHOLD`.
Use a Python helper (one-shot, inline) — only needs `Pillow` (already in many envs; if missing, instruct to `uv pip install Pillow` into the plugin venv).
```python
# /tmp/dhash_clip.py
import sys, subprocess, json, tempfile, os
from PIL import Image
def dhash(img, hash_size=8):
img = img.convert("L").resize((hash_size+1, hash_size))
bits = 0
for y in range(hash_size):
for x in range(hash_size):
left = img.getpixel((x, y))
right = img.getpixel((x+1, y))
bits = (bits << 1) | (1 if left > right else 0)
return bits
def hashes_for(path, n=5):
dur = float(subprocess.check_output(
["ffprobe","-v","error","-show_entries","format=duration","-of","default=nw=1:nk=1",path]
).strip() or 0)
if dur <= 0: return []
out = []
with tempfile.TemporaryDirectory() as td:
for i in range(n):
t = dur * (i+1) / (n+1)
jpg = os.path.join(td, f"{i}.jpg")
subprocess.run(["ffmpeg","-v","error","-ss",str(t),"-i",path,
"-frames:v","1","-vf","scale=64:64","-y",jpg], check=False)
if os.path.exists(jpg):
out.append(dhash(Image.open(jpg)))
return out
if __name__ == "__main__":
print(json.dumps({p: hashes_for(p) for p in sys.argv[1:]}))
```
Hamming compare:
```python
def hamming(a, b): return bin(a ^ b).count("1")
def near(hs1, hs2, thr):
if len(hs1) != len(hs2) or not hs1: return False
return all(hamming(a,b) <= thr for a,b in zip(hs1,hs2))
```
Run pairwise comparison; group transitively (union-find) so chains of near-dups become one cluster.
### 4. Preview
Print clusters:
```
Cluster 1 — keeping: holiday_v2.mp4 (412 MB, h264 1080p)
duplicate: holiday_v2_copy.mp4 (412 MB) [exact match]
duplicate: holiday_export.mp4 (138 MB, hevc) [perceptual, hamming=2]
Cluster 2 — keeping: GX010044.MP4 (3.2 GB)
duplicate: GX010044 (1).MP4 (3.2 GB) [exact match]
```
Show total clusters, total dup files, total reclaimable bytes. Ask the user to **confirm**. For `delete` mode, require an extra confirmation.
### 5. Apply
For `quarantine`:
```bash
mkdir -p "$SRC/_duplicates"
for f in "${DUPS[@]}"; do
mv -n "$f" "$SRC/_duplicates/"
done
```
For `delete` (only after explicit second confirmation): `rm -f --` each file.From danielrosehill/Claude-Video-Editor-Plugin, MIT.
More from danielrosehill/Claude-Video-Editor-Plugin
- 0.418score
mkv-strip-tracks
danielrosehill
Remove unwanted tracks (audio, subtitle, video) from a Matroska container and save a new, smaller file.
SkillCFreshness: C★ 6Claude Code +9 - 0.418score
agentic-edit
danielrosehill
Run an agentic / LLM-driven cut-down on a long video — "make a 60-second highlight reel of this hour-long stream", "cut the boring parts from this lecture"…
SkillCFreshness: C★ 6Claude Code +9 - 0.418score
audio-analysis
danielrosehill
Extract audio from a video (or analyze a standalone audio file) and report loudness — integrated LUFS, true peak (dBTP), loudness range — against a target…
SkillCFreshness: C★ 6Claude Code +9 - 0.418score
audio-to-music-video
danielrosehill
Turn an audio file into a music video by compositing a waveform / spectrum / circular-CQT animation over cover art or a background.
SkillCFreshness: C★ 6Claude Code +9 - 0.418score
auto-cut-silences
danielrosehill
Remove silent / dead-air segments from a video or audio file using auto-editor.
SkillCFreshness: C★ 6Claude Code +9 - 0.418score
burn-graphics
danielrosehill
Overlay graphics onto a video — lower thirds, watermarks/logos, image overlays, or text titles — at specified timestamps.
SkillCFreshness: C★ 6Claude Code +9 - 0.418score
burn-subtitles
danielrosehill
Generate subtitles (whisper.cpp / faster-whisper) for a video and either save the SRT alongside or burn them into the picture.
SkillCFreshness: C★ 6Claude Code +9 - 0.418score
clean-transcription
danielrosehill
Clean up a raw whisper transcript (SRT or TXT) — strip filler words, fix recurring mistranscriptions via a per-project glossary, and (optionally) re-flow line…
SkillCFreshness: C★ 6Claude Code +9 - 0.418score
create-render-profile
danielrosehill
Build a named, reusable render profile (codec + resolution + bitrate/QP + container) by iterating on a 30-second test clip until file size and quality are…
SkillCFreshness: C★ 6Claude Code +9 - 0.418score
cut-segment
danielrosehill
Extract one or more time-range segments from a video.
SkillCFreshness: C★ 6Claude Code +9 - 0.418score
delete-render-profile
danielrosehill
Delete a saved render profile by name.
SkillCFreshness: C★ 6Claude Code +9 - 0.418score
deps-setup
danielrosehill
Install optional video-editing tools (moviepy, auto-editor, video-use, VideoAgent, vit, LosslessCut, editly) plus media-inspection helpers (exiftool…
SkillCFreshness: C★ 6Claude Code +9
Signals
- Stars
- 6
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Apr 30, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from danielrosehill
- 0.470score
onboard
danielrosehill
First-run onboarding for the adb-ops plugin.
SkillAFreshness: A★ 2Claude Code +9 - 0.470score
context-gate
danielrosehill
One-shot context-checkpoint workflow — when the current session is getting cluttered, write a structured handover plan capturing what's done and what's…
SkillAFreshness: A★ 2Claude Code +9 - 0.470score
context-workflow-reference
danielrosehill
Reference and worked example for the CONTEXT.md / CLAUDE.md two-file workflow.
SkillAFreshness: A★ 2Claude Code +9 - 0.470score
plugin-data-storage
danielrosehill
Canonical reference for where Claude Code plugins should persist user data.
SkillAFreshness: A★ 2Claude Code +9 - 0.470score
save-plan
danielrosehill
Save a Claude Code plan (from ExitPlanMode, design discussion, or multi-step task) to persistent storage.
SkillAFreshness: A★ 2Claude Code +9 - 0.470score
scaffold-planning
danielrosehill
Create a lightweight `planning/` folder in the current repo with leftover-tasks.md, blockers.md, session-logs/, and handovers/.
SkillAFreshness: A★ 2Claude Code +9
Cite this page
dedupe-clips skill. Agent Mart. https://agentmart.dev/skills/danielrosehill-dedupe-clips (last updated 2026-10-24)