Image Classifier
Organizes images in a specified folder into category subfolders by content.
How it works
This skill uses a mixed approach:
- Claude's vision to analyze image content and classify into categories
- Filename/heuristic rules as a fallback for images that can't be visually assessed
Workflow
1. Gather requirements
First, ask the user:
- Folder path — Which folder contains the images to organize?
7w4.net收录了海量优质技能插件。
-
Categories — What categories to use. Offer these defaults:
风景 (landscape/scenery)
人物 (people/portraits)
美食 (food)
动物 (animals)
建筑 (architecture)
截图 (screenshots)
其他 (other)
Let the user pick from these, add custom ones, or use all of them.
- Action — Move or copy? Ask the user: "要把图片移动到分类文件夹,还是复制过去?(move/copy)"
- Image formats — Default to common formats:
jpg, jpeg, png, webp, bmp, gif, heic, heif, tiff, tif
2. Scan and classify
- List all image files in the folder (non-recursive by default — only top level; ask user if they want subfolders included)
- For each image:
- Fast path (heuristic): If the filename contains "screenshot", "截屏", "截图", "screen" → classify as
截图
- Vision path: For all other images, read the image with the Read tool and ask Claude to classify it into one of the chosen categories
- If classification confidence is low → place in
unclear
3. Organize
- Inside the source folder, create one subfolder per category
- Create an
unclear folder for images that couldn't be classified
- Move or copy each image into its category folder based on the user's choice
4. Report
After organizing, show the user a summary:
- How many images were classified into each category
- How many went to
unclear
- Total images processed
- Where the files are now
Important notes
- When reading images for classification, do NOT save or persist the image data — only use it for classification
- If a category folder name contains non-ASCII characters (Chinese etc.), make sure to handle paths correctly on Windows
- Batch reading: when there are many images (>10), process them in batches to avoid overwhelming the conversation context — classify 5-10 images per turn and use subagents if the count is very large
- For move vs copy: actually move (
mv) or copy (cp) the files — do not just print instructions the user should follow manually