Duplicate File Detector
Find exact duplicates, near-duplicates, and version variants across your files with smart recommendations - never auto-deletes.
You have report_final.docx, report_final_v2.docx, report_FINAL_FINAL.docx, and a Copy of report_final.docx — and you're not sure which one is actually final. Multiply that by every folder on your drive.
Who it's for: anyone with years of accumulated duplicate files, photographers with multiple copies of the same images, teams sharing files across drives and cloud storage, people reclaiming disk space before buying a new drive, digital organizers doing a deep clean
Example
"Find all duplicate files in my Documents folder" → Scan revealing 12 GB of exact duplicates, 3 GB of near-duplicates (same photo resized), and 8 version variants — with keep/delete recommendations for each group, nothing auto-deleted
CLAUDE.md Template
New here? 3-minute setup guide → | Already set up? Copy the template below.
npx ccplaybooks add duplicate-file-detector# Duplicate File Detector
## Your Role
You identify duplicate and near-duplicate files across folders, presenting findings with recommendations but NEVER auto-deleting anything.
## Detection Types
### Exact Duplicates
- Identical file content (same hash)
- Different filenames, same data
- Priority: Safe to remove copies
Get new playbooks like this one
One email a week with new Claude Code workflows. Free, like everything here.
No spam. Unsubscribe anytime.
What This Does
Find duplicate files eating your storage - exact copies, near-duplicates (same photo, different size), and version variants. Get smart recommendations on what to keep, but YOU decide what gets deleted.
Quick Start
Step 1: Download the Template
Click Download above to get the CLAUDE.md file.
Step 2: Place in Target Folder
mv ~/Downloads/CLAUDE.md ~/Documents/
Step 3: Run Claude Code
cd ~/Documents
claude
Step 4: Scan for Duplicates
Say: "Find duplicate files in this folder"
What Gets Detected
| Type | Description | Example |
|---|---|---|
| Exact duplicates | Identical content, different names | report.pdf and report (1).pdf |
| Near-duplicates | Same image, different quality | Full-res and compressed versions |
| Version variants | Related versions | doc_v1.docx, doc_v2.docx, doc_final.docx |
Example Output
## Exact Duplicates Found: 234 files (1.2 GB)
### Group 1: vacation-photo.jpg
| Location | Recommendation |
|----------|----------------|
| /Photos/vacation-photo.jpg | ✅ KEEP |
| /Downloads/vacation-photo.jpg | ❌ Remove |
| /Desktop/vacation-photo (1).jpg | ❌ Remove |
Potential savings: 8.4 MB
Smart Recommendations
Claude recommends keeping the file that is:
- In the most logical location (Photos > Downloads)
- Highest quality (resolution, bitrate)
- Has the most descriptive filename
Tips
- Never auto-deletes: All deletions require your approval
- Move to Trash first: Recommended over permanent delete
- Check Downloads: Most duplicates live there
- Large files first: Focus on biggest space savings
Commands
"Find duplicates in my Documents folder"
"How much space can I recover?"
"Show me duplicate photos only"
"Compare these two folders for duplicates"
Troubleshooting
Too many results Focus on one folder: "Just check Downloads for duplicates"
Want to keep both Say: "Skip this group, I want to keep both"
Uncertain about a file Claude flags uncertain cases for manual review