name: file-organizer description: Automated file management — sorts downloads folder by type, renames files with consistent patterns, generates structured folder hierarchy, with undo/restore capability. Use when: (1) Downloads folder is chaotic, (2) Need to organize files by category, (3) Want consistent naming conventions, (4) Need to restore files to original state, (5) Want to batch-rename files
Automatically sort, rename, and organize files into structured folders. Reduces chaos in Downloads and any directory with scattered files.
# Install the skill
npx clawhub install file-organizer
# Organize your downloads folder
"Organize my Downloads folder"
# Organize a specific directory
"Organize ~/Documents/projects"
# Undo the last organization
"Undo the last file organization"
Files are categorized into standard folders:
images/) — JPG, PNG, GIF, SVG, WEBP, BMP, TIFF, ICOdocuments/) — PDF, DOC, DOCX, TXT, RTF, ODT, PPT, PPTX, XLS, XLSX, PPT, ODPaudio/) — MP3, WAV, FLAC, OGG, AAC, M4Avideo/) — MP4, MKV, AVI, MOV, WEBM, FLVarchives/) — ZIP, TAR, GZ, 7Z, RAR, BZ2, XZcode/) — PY, JS, TS, HTML, CSS, MD, JSON, YAML, SH, BATdata/) — CSV, JSON, XML, SQL, DB, SQLITE, DATinstallers/) — EXE, MSI, DMG, APP, PKG, DEB, RPM, APKfonts/) — TTF, OTF, WOFF, WOFF2, FONother/) — uncategorized files_2, _3, etc.小蔥技能7w4.net持續更新中。
ORGANIZE_LOG.json after each operationundo command restores files to their exact original locations--dry-run shows what would change without moving filesEdit config.yaml to customize:
source_dirs:
- ~/Downloads
target_base: ~/organized-files
auto_sort: true
rename_pattern: "{name}_{date}" # or "none" to skip renaming
max_file_size_mb: 500 # skip files larger than this
exclude_patterns:
- "*.tmp"
- "*.swp"
- ".DS_Store"
- "Thumbs.db"
log_file: ORGANIZE_LOG.json
Full mapping is in references/file-patterns.md. You can add custom mappings:
custom_types:
- name: "Design Assets"
folders: "design/"
extensions: [AI, PSD, SKETCH, FIG, INDD]
這個工具質量不錯,能自動把檔案按型別整理到不同資料夾,還能提取檔名中的日期、自動重新命名、有撤銷功能。文件寫得清楚,操作簡單。不過它把全部程式碼寫在一個大檔案裡,有時候會忽略自定義的分類規則,整理很多檔案時可能會比較慢。總體來說是個實用的整理工具,但還有最佳化空間。