File Organizer
by @indigas
Automatically sort and rename files by type into structured folders with undo support, configurable filters, and dry-run preview for safe batch organization.
clawhub install claw-file-organizerπ About This Skill
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
File Organizer Skill
Automatically sort, rename, and organize files into structured folders. Reduces chaos in Downloads and any directory with scattered files.
Quick Start
# Install the skill
npx clawhub install file-organizerOrganize your downloads folder
"Organize my Downloads folder"Organize a specific directory
"Organize ~/Documents/projects"Undo the last organization
"Undo the last file organization"
Core Features
1. Automatic Sorting
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 files2. Smart File Renaming
_2, _3, etc.3. Undo / Restore
ORGANIZE_LOG.json after each operationundo command restores files to their exact original locations4. Preview Mode
--dry-run shows what would change without moving filesConfiguration
Edit config.yaml to customize:
source_dirs:
- ~/Downloadstarget_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
File Type Patterns
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]
Safety
Integration
π‘ Examples
# Install the skill
npx clawhub install file-organizerOrganize your downloads folder
"Organize my Downloads folder"Organize a specific directory
"Organize ~/Documents/projects"Undo the last organization
"Undo the last file organization"
βοΈ Configuration
Edit config.yaml to customize:
source_dirs:
- ~/Downloadstarget_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