file-organizer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFile Organizer
文件整理工具
This skill acts as your personal organization assistant, helping you maintain a clean, logical file structure across your computer without the mental overhead of constant manual organization.
此工具可作为你的个人整理助手,帮助你在电脑上维持清晰、合理的文件结构,无需持续手动整理的脑力负担。
When to Use This Skill
何时使用此工具
- Your Downloads folder is a chaotic mess
- You can't find files because they're scattered everywhere
- You have duplicate files taking up space
- Your folder structure doesn't make sense anymore
- You want to establish better organization habits
- You're starting a new project and need a good structure
- You're cleaning up before archiving old projects
- 你的下载文件夹杂乱无章
- 因为文件分散各处而找不到所需内容
- 存在占用空间的重复文件
- 现有的文件夹结构不再合理
- 你想要养成更好的整理习惯
- 你正在启动新项目,需要一个良好的结构
- 你在归档旧项目前进行清理
What This Skill Does
此工具的功能
- Analyzes Current Structure: Reviews your folders and files to understand what you have
- Finds Duplicates: Identifies duplicate files across your system
- Suggests Organization: Proposes logical folder structures based on your content
- Automates Cleanup: Moves, renames, and organizes files with your approval
- Maintains Context: Makes smart decisions based on file types, dates, and content
- Reduces Clutter: Identifies old files you probably don't need anymore
- 分析当前结构:检查你的文件夹和文件,了解现有内容
- 查找重复项:识别系统中的重复文件
- 建议整理方案:根据内容提出合理的文件夹结构
- 自动执行清理:在你确认后移动、重命名并整理文件
- 保留上下文:根据文件类型、日期和内容做出智能决策
- 减少杂乱:识别你可能不再需要的旧文件
How to Use
使用方法
From Your Home Directory
从主目录开始
cd ~Then run Claude Code and ask for help:
Help me organize my Downloads folderFind duplicate files in my Documents folderReview my project directories and suggest improvementscd ~然后运行Claude Code并请求帮助:
Help me organize my Downloads folderFind duplicate files in my Documents folderReview my project directories and suggest improvementsSpecific Organization Tasks
特定整理任务
Organize these downloads into proper folders based on what they areFind duplicate files and help me decide which to keepClean up old files I haven't touched in 6+ monthsCreate a better folder structure for my [work/projects/photos/etc]Organize these downloads into proper folders based on what they areFind duplicate files and help me decide which to keepClean up old files I haven't touched in 6+ monthsCreate a better folder structure for my [work/projects/photos/etc]Instructions
操作流程
When a user requests file organization help:
-
Understand the ScopeAsk clarifying questions:
- Which directory needs organization? (Downloads, Documents, entire home folder?)
- What's the main problem? (Can't find things, duplicates, too messy, no structure?)
- Any files or folders to avoid? (Current projects, sensitive data?)
- How aggressively to organize? (Conservative vs. comprehensive cleanup)
-
Analyze Current StateReview the target directory:bash
# Get overview of current structure ls -la [target_directory] # Check file types and sizes find [target_directory] -type f -exec file {} \; | head -20 # Identify largest files du -sh [target_directory]/* | sort -rh | head -20 # Count file types find [target_directory] -type f | sed 's/.*\.//' | sort | uniq -c | sort -rnSummarize findings:- Total files and folders
- File type breakdown
- Size distribution
- Date ranges
- Obvious organization issues
-
Identify Organization PatternsBased on the files, determine logical groupings:By Type:
- Documents (PDFs, DOCX, TXT)
- Images (JPG, PNG, SVG)
- Videos (MP4, MOV)
- Archives (ZIP, TAR, DMG)
- Code/Projects (directories with code)
- Spreadsheets (XLSX, CSV)
- Presentations (PPTX, KEY)
By Purpose:- Work vs. Personal
- Active vs. Archive
- Project-specific
- Reference materials
- Temporary/scratch files
By Date:- Current year/month
- Previous years
- Very old (archive candidates)
-
Find DuplicatesWhen requested, search for duplicates:bash
# Find exact duplicates by hash find [directory] -type f -exec md5 {} \; | sort | uniq -d # Find files with same name find [directory] -type f -printf '%f\n' | sort | uniq -d # Find similar-sized files find [directory] -type f -printf '%s %p\n' | sort -nFor each set of duplicates:- Show all file paths
- Display sizes and modification dates
- Recommend which to keep (usually newest or best-named)
- Important: Always ask for confirmation before deleting
-
Propose Organization PlanPresent a clear plan before making changes:markdown
# Organization Plan for [Directory] ## Current State - X files across Y folders - [Size] total - File types: [breakdown] - Issues: [list problems] ## Proposed Structure[Directory]/ ├── Work/ │ ├── Projects/ │ ├── Documents/ │ └── Archive/ ├── Personal/ │ ├── Photos/ │ ├── Documents/ │ └── Media/ └── Downloads/ ├── To-Sort/ └── Archive/## Changes I'll Make 1. **Create new folders**: [list] 2. **Move files**: - X PDFs → Work/Documents/ - Y images → Personal/Photos/ - Z old files → Archive/ 3. **Rename files**: [any renaming patterns] 4. **Delete**: [duplicates or trash files] ## Files Needing Your Decision - [List any files you're unsure about] Ready to proceed? (yes/no/modify) -
Execute OrganizationAfter approval, organize systematically:bash
# Create folder structure mkdir -p "path/to/new/folders" # Move files with clear logging mv "old/path/file.pdf" "new/path/file.pdf" # Rename files with consistent patterns # Example: "YYYY-MM-DD - Description.ext"Important Rules:- Always confirm before deleting anything
- Log all moves for potential undo
- Preserve original modification dates
- Handle filename conflicts gracefully
- Stop and ask if you encounter unexpected situations
-
Provide Summary and Maintenance TipsAfter organizing:markdown
# Organization Complete! ✨ ## What Changed - Created [X] new folders - Organized [Y] files - Freed [Z] GB by removing duplicates - Archived [W] old files ## New Structure [Show the new folder tree] ## Maintenance Tips To keep this organized: 1. **Weekly**: Sort new downloads 2. **Monthly**: Review and archive completed projects 3. **Quarterly**: Check for new duplicates 4. **Yearly**: Archive old files ## Quick Commands for You ```bash # Find files modified this week find . -type f -mtime -7 # Sort downloads by type [custom command for their setup] # Find duplicates [custom command]Want to organize another folder?undefined
当用户请求文件整理帮助时:
-
明确范围提出澄清问题:
- 需要整理哪个目录?(下载文件夹、文档文件夹、整个主目录?)
- 主要问题是什么?(找不到文件、重复文件、过于杂乱、没有合理结构?)
- 有没有需要避开的文件或文件夹?(当前项目、敏感数据?)
- 整理的激进程度?(保守型 vs 全面清理)
-
分析当前状态检查目标目录:此字段的代码块内容保留不变bash
# Get overview of current structure ls -la [target_directory] # Check file types and sizes find [target_directory] -type f -exec file {} \; | head -20 # Identify largest files du -sh [target_directory]/* | sort -rh | head -20 # Count file types find [target_directory] -type f | sed 's/.*\.//' | sort | uniq -c | sort -rn总结发现:- 文件和文件夹总数
- 文件类型分布
- 大小分布
- 日期范围
- 明显的整理问题
-
识别整理模式根据文件内容确定合理的分组方式:按类型分组:
- 文档(PDF、DOCX、TXT)
- 图片(JPG、PNG、SVG)
- 视频(MP4、MOV)
- 压缩包(ZIP、TAR、DMG)
- 代码/项目(包含代码的目录)
- 电子表格(XLSX、CSV)
- 演示文稿(PPTX、KEY)
按用途分组:- 工作 vs 个人
- 活跃项目 vs 归档项目
- 特定项目
- 参考资料
- 临时/草稿文件
按日期分组:- 当前年/月
- 往年
- 非常旧的文件(归档候选)
-
查找重复文件当用户请求时,搜索重复文件:此字段的代码块内容保留不变bash
# Find exact duplicates by hash find [directory] -type f -exec md5 {} \; | sort | uniq -d # Find files with same name find [directory] -type f -printf '%f\n' | sort | uniq -d # Find similar-sized files find [directory] -type f -printf '%s %p\n' | sort -n对于每组重复文件:- 显示所有文件路径
- 显示大小和修改日期
- 建议保留哪一个(通常是最新的或命名最规范的)
- 重要提示:删除前务必请求确认
-
提出整理方案在进行更改前先呈现清晰的方案:此字段的代码块内容保留不变markdown
# Organization Plan for [Directory] ## Current State - X files across Y folders - [Size] total - File types: [breakdown] - Issues: [list problems] ## Proposed Structure[Directory]/ ├── Work/ │ ├── Projects/ │ ├── Documents/ │ └── Archive/ ├── Personal/ │ ├── Photos/ │ ├── Documents/ │ └── Media/ └── Downloads/ ├── To-Sort/ └── Archive/## Changes I'll Make 1. **Create new folders**: [list] 2. **Move files**: - X PDFs → Work/Documents/ - Y images → Personal/Photos/ - Z old files → Archive/ 3. **Rename files**: [any renaming patterns] 4. **Delete**: [duplicates or trash files] ## Files Needing Your Decision - [List any files you're unsure about] Ready to proceed? (yes/no/modify) -
执行整理操作获得批准后,系统地进行整理:此字段的代码块内容保留不变bash
# Create folder structure mkdir -p "path/to/new/folders" # Move files with clear logging mv "old/path/file.pdf" "new/path/file.pdf" # Rename files with consistent patterns # Example: "YYYY-MM-DD - Description.ext"重要规则:- 删除任何内容前务必确认
- 记录所有移动操作以便撤销
- 保留原始修改日期
- 妥善处理文件名冲突
- 遇到意外情况时停止并询问
-
提供总结和维护建议整理完成后:此字段的代码块内容保留不变markdown
# Organization Complete! ✨ ## What Changed - Created [X] new folders - Organized [Y] files - Freed [Z] GB by removing duplicates - Archived [W] old files ## New Structure [Show the new folder tree] ## Maintenance Tips To keep this organized: 1. **Weekly**: Sort new downloads 2. **Monthly**: Review and archive completed projects 3. **Quarterly**: Check for new duplicates 4. **Yearly**: Archive old files ## Quick Commands for You ```bash # Find files modified this week find . -type f -mtime -7 # Sort downloads by type [custom command for their setup] # Find duplicates [custom command]Want to organize another folder?undefined
Examples
示例
Example 1: Organizing Downloads (From Justin Dielmann)
示例1:整理下载文件夹(来自Justin Dielmann)
User: "My Downloads folder is a mess with 500+ files. Help me organize it."
Process:
- Analyzes Downloads folder
- Finds patterns: work docs, personal photos, installers, random PDFs
- Proposes structure:
- Downloads/
- Work/
- Personal/
- Installers/ (DMG, PKG files)
- Archive/
- ToSort/ (things needing decisions)
- Downloads/
- Asks for confirmation
- Moves files intelligently based on content and names
- Results: 500 files → 5 organized folders
用户:"我的下载文件夹里有500多个文件,乱七八糟的。帮我整理一下。"
流程:
- 分析下载文件夹
- 识别模式:工作文档、个人照片、安装程序、随机PDF文件
- 提出结构:
- Downloads/
- Work/
- Personal/
- Installers/ (DMG、PKG文件)
- Archive/
- ToSort/ (需要决策的文件)
- Downloads/
- 请求确认
- 根据内容和名称智能移动文件
- 结果:500个文件 → 5个整理好的文件夹
Example 2: Finding and Removing Duplicates
示例2:查找并删除重复文件
User: "Find duplicate files in my Documents and help me decide which to keep."
Output:
markdown
undefined用户:"查找我文档文件夹中的重复文件,帮我决定保留哪些。"
输出:
markdown
undefinedFound 23 Sets of Duplicates (156 MB total)
Found 23 Sets of Duplicates (156 MB total)
Duplicate Set 1: "proposal.pdf"
Duplicate Set 1: "proposal.pdf"
- (2.3 MB, modified: 2024-03-15)
/Documents/proposal.pdf - (2.3 MB, modified: 2024-03-15)
/Documents/old/proposal.pdf - (2.3 MB, modified: 2024-03-10)
/Desktop/proposal.pdf
Recommendation: Keep (most recent in correct location)
Delete the other 2 copies?
/Documents/proposal.pdf[Continue for all duplicates...]
undefined- (2.3 MB, modified: 2024-03-15)
/Documents/proposal.pdf - (2.3 MB, modified: 2024-03-15)
/Documents/old/proposal.pdf - (2.3 MB, modified: 2024-03-10)
/Desktop/proposal.pdf
Recommendation: Keep (most recent in correct location)
Delete the other 2 copies?
/Documents/proposal.pdf[Continue for all duplicates...]
undefinedExample 3: Restructuring Projects Folder
示例3:重构项目文件夹结构
User: "Review my ~/Projects directory and suggest improvements."
Output:
markdown
undefined用户:"检查我的~/Projects目录,提出改进建议。"
输出:
markdown
undefinedAnalysis of ~/Projects
Analysis of ~/Projects
Current Structure Issues
Current Structure Issues
- Mix of active and archived projects (3+ years old)
- No consistent naming convention
- Some projects at root, others in random subfolders
- Duplicate folders (project-name, project-name-old, project-name-v2)
- Mix of active and archived projects (3+ years old)
- No consistent naming convention
- Some projects at root, others in random subfolders
- Duplicate folders (project-name, project-name-old, project-name-v2)
Proposed Structure
Proposed Structure
Projects/
├── Active/
│ ├── client-work/
│ ├── side-projects/
│ └── learning/
├── Archive/
│ ├── 2022/
│ ├── 2023/
│ └── 2024/
└── Templates/Projects/
├── Active/
│ ├── client-work/
│ ├── side-projects/
│ └── learning/
├── Archive/
│ ├── 2022/
│ ├── 2023/
│ └── 2024/
└── Templates/Specific Changes
Specific Changes
- Move 12 projects not touched since 2022 → Archive/
- Consolidate 4 duplicate project folders
- Rename projects to consistent format: "client-name-project-name"
- Create Archive for old work
Want me to implement this?
undefined- Move 12 projects not touched since 2022 → Archive/
- Consolidate 4 duplicate project folders
- Rename projects to consistent format: "client-name-project-name"
- Create Archive for old work
Want me to implement this?
undefinedExample 4: Organizing Photos by Date
示例4:按日期整理照片
User: "Organize my photo folders by year and month."
Output: Creates structure like:
Photos/
├── 2023/
│ ├── 01-January/
│ ├── 02-February/
│ └── ...
├── 2024/
│ ├── 01-January/
│ └── ...
└── Unsorted/Then moves photos based on EXIF data or file modification dates.
用户:"按年份和月份整理我的照片文件夹。"
输出:创建如下结构:
Photos/
├── 2023/
│ ├── 01-January/
│ ├── 02-February/
│ └── ...
├── 2024/
│ ├── 01-January/
│ └── ...
└── Unsorted/然后根据EXIF数据或文件修改日期移动照片。
Common Organization Tasks
常见整理任务
Downloads Cleanup
下载文件夹清理
Organize my Downloads folder - move documents to Documents,
images to Pictures, keep installers separate, and archive files
older than 3 months.Organize my Downloads folder - move documents to Documents,
images to Pictures, keep installers separate, and archive files
older than 3 months.Project Organization
项目整理
Review my Projects folder structure and help me separate active
projects from old ones I should archive.Review my Projects folder structure and help me separate active
projects from old ones I should archive.Duplicate Removal
重复文件移除
Find all duplicate files in my Documents folder and help me
decide which ones to keep.Find all duplicate files in my Documents folder and help me
decide which ones to keep.Desktop Cleanup
桌面清理
My Desktop is covered in files. Help me organize everything into
my Documents folder properly.My Desktop is covered in files. Help me organize everything into
my Documents folder properly.Photo Organization
照片整理
Organize all photos in this folder by date (year/month) based
on when they were taken.Organize all photos in this folder by date (year/month) based
on when they were taken.Work/Personal Separation
工作/个人文件分离
Help me separate my work files from personal files across my
Documents folder.Help me separate my work files from personal files across my
Documents folder.Pro Tips
实用技巧
- Start Small: Begin with one messy folder (like Downloads) to build trust
- Regular Maintenance: Run weekly cleanup on Downloads
- Consistent Naming: Use "YYYY-MM-DD - Description" format for important files
- Archive Aggressively: Move old projects to Archive instead of deleting
- Keep Active Separate: Maintain clear boundaries between active and archived work
- Trust the Process: Let Claude handle the cognitive load of where things go
- 从小处着手:从一个杂乱的文件夹(如下载文件夹)开始,建立信任
- 定期维护:每周对下载文件夹进行清理
- 统一命名:对重要文件使用“YYYY-MM-DD - 描述”格式
- 积极归档:将旧项目移至归档文件夹而非删除
- 区分活跃与归档:清晰划分活跃工作和归档工作的界限
- 信任流程:让Claude处理文件归类的认知负担
Best Practices
最佳实践
Folder Naming
文件夹命名
- Use clear, descriptive names
- Avoid spaces (use hyphens or underscores)
- Be specific: "client-proposals" not "docs"
- Use prefixes for ordering: "01-current", "02-archive"
- 使用清晰、描述性的名称
- 避免使用空格(使用连字符或下划线)
- 具体化:用“client-proposals”而非“docs”
- 使用前缀排序:“01-current”、“02-archive”
File Naming
文件命名
- Include dates: "2024-10-17-meeting-notes.md"
- Be descriptive: "q3-financial-report.xlsx"
- Avoid version numbers in names (use version control instead)
- Remove download artifacts: "document-final-v2 (1).pdf" → "document.pdf"
- 包含日期:“2024-10-17-meeting-notes.md”
- 描述性:“q3-financial-report.xlsx”
- 避免在文件名中使用版本号(改用版本控制)
- 移除下载后缀:“document-final-v2 (1).pdf” → “document.pdf”
When to Archive
何时归档
- Projects not touched in 6+ months
- Completed work that might be referenced later
- Old versions after migration to new systems
- Files you're hesitant to delete (archive first)
- 6个月以上未触碰的项目
- 已完成但可能需要后续参考的工作
- 迁移到新系统后的旧版本
- 你犹豫是否删除的文件(先归档)
Related Use Cases
相关使用场景
- Setting up organization for a new computer
- Preparing files for backup/archiving
- Cleaning up before storage cleanup
- Organizing shared team folders
- Structuring new project directories
- 为新电脑设置整理规则
- 为备份/归档准备文件
- 清理存储空间前的整理
- 整理团队共享文件夹
- 为新项目目录构建结构