Sort Thousands of Photos and Videos with Claude Code and CLIP
Claude Code can tag photos and videos, sort them into folders and find duplicates with the free CLIP model on your computer. A safety rule and 7 prompts.

My archive had piled up to 20,000 photos and videos, and for years I couldn’t face sorting them. The tool that got me out of that mess was Claude: Claude Code can sort thousands of photos and videos on your computer by what is in them rather than by file name. It tags each file, copies them into folders, finds identical or blurry shots and lets you search your photos with a sentence. It does this with the free CLIP image model running on your own computer, so the photos never need to be uploaded. Below you’ll find the safety rule first and then seven prompts you can copy step by step.
I put this method together for my own archive. Videos are included too: Claude Code tags mp4 and mov files by looking at their first, middle and last frame. The prompts don’t promise one result for everyone, because every archive is different. That’s why the first step is always a small test with 200 photos.
How does Claude Code sort photos?
Claude Code is Anthropic’s coding assistant that runs on your computer and can read your files and run commands. For photo sorting, Claude Code writes a small Python script, installs the CLIP model and compares every photo with the list of tags you give it. CLIP is a model OpenAI released as open source in 2021 that matches images and text in the same space of meaning, so it can compare phrases like “food”, “screenshot” or “red dress by the sea” with your photos.
What you need:
- Claude Code (the version of Claude that runs on your computer; it needs a Claude subscription or an API account).
- Your photos in one folder. If they are on your phone, move them to your computer first (step 6).
- A graphics card is not required; without one the work just takes longer.
How do you keep your photos safe?
You keep your photos safe by giving Claude Code three rules in the first message: don’t touch the originals, upload nothing, and start with a small test. Claude Code shows you each command before it runs and asks for your approval, so you can check the packages and scripts it uses. Always give this prompt first:
0. Safety (give this one first)
Never touch my original photo folder, and never delete or move anything. Do everything by copying into a new "Organised" folder. Don't upload the photos to the internet; use a free image model (CLIP) running on my computer. Start with a test of 200 photos and show me the result.
If you don’t like the test result, change the tag list and try again. Move on to the whole archive only once the 200-photo test looks right.

How do you sort photos with Claude Code step by step?
Sorting photos takes six steps: tagging, sorting into folders, finding duplicates, setting aside blurry shots, searching with a sentence and adding the photos from your phone. Give the prompts in order and replace the parts in square brackets with your own details.
1. Look at every photo
Scan all photos (jpg, png, heic) and videos (mp4, mov) in [folder path]; for videos, look at the first, middle and last frame. Give each one of these tags: selfie, group of people, screenshot, document and receipt, travel and nature, food, animal, other. Write the results into a table.
2. Sort into folders
Copy the photos into separate folders inside the Organised folder according to their tags. Each folder gets year subfolders (by the date taken). At the end, tell me how many photos are in each folder.
3. Find duplicates
Find photos that are identical or very similar. In each group keep the one with the highest resolution and sharpest image, and put the others into a "Duplicates" folder. Tell me how many duplicates you found and how many GB that would free up.
4. Set aside blurry photos
Find photos that are blurry, very dark or taken by accident and put them into a "Check" folder. Don't delete anything; I'll look and decide.
5. Search with a sentence
Make the photos searchable by sentence. When I type "[what you're looking for, e.g. red dress by the sea]", copy the 20 best matches into a folder and show them to me.
6. Add the photos from your phone
Explain step by step how to move my iPhone (or Android) photos to this computer: by cable and by downloading from the cloud. Make sure you can read HEIC files too, then run the same sorting on that folder.
For the transfer itself, Apple’s guide to moving iPhone photos to a computer and Google’s guide to transferring files from Android show the official steps.

What is it useful for?
Sorting photos with Claude Code helps most with archives that have piled up for years and never been organised. Examples:
- Cleaning up a phone gallery: separating screenshots, receipts and documents from the real photos.
- Freeing up space: reducing dozens of copies of the same shot to the single best one.
- An archive for creators: finding old shots with a sentence like “photos of me talking into a microphone”.
- Small businesses: collecting product photos, event shots and documents in separate folders.
I covered other ways to teach Claude Code repeat tasks in my Claude Skills guide, which also has Remotion motion-effect prompts for video. If you’d like AI workflows set up for your business, take a look at my services.
To see Claude tips like this as videos, subscribe to my YouTube channel @benalpercengiz.
FAQ
Does Claude Code upload my photos to the internet?
Not with the prompts in this guide. The first prompt tells Claude Code to look at the photos with the free CLIP model running on your computer and never upload them. Claude Code shows you each command before it runs, so you can check what gets installed and executed when you approve it.
What is CLIP?
CLIP is a model OpenAI released as open source in 2021 that compares images and text in the same space of meaning. That lets you tag a photo as “food” or “screenshot”, or search your photos with a sentence like “red dress by the sea”. It runs on your own computer; a graphics card is not required, it just makes the work faster.
Will my original photos be deleted?
Not if you give the safety prompt first. It tells Claude Code never to touch the original folder, never to delete or move anything, and to copy everything into a new Organised folder. Duplicates and blurry photos are not deleted either: they go into separate folders and you decide.
How do I sort the photos on my phone?
Move them to your computer first, by cable or by downloading them from iCloud Photos or Google Photos, then run the same prompts on that folder. iPhone photos are often in HEIC format, so ask Claude Code to make sure it can read HEIC files.
Want to see these articles more often in Google?Add as a preferred source on Google


