AI Agent Hub
Back to skills
Intelligent File Organizer icon

Intelligent File Organizer

Office Efficiency Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please refer to https://skillhub.cn/install/skillhub.md to install @user_e4ae361c/file-organizer.

About this skill

The Problem: Taming File Chaos

Downloads, desktops, and project folders often become digital dumping grounds, cluttered with documents, images, code snippets, installers, and media files from various sources. Manually sorting them is tedious, error-prone, and makes critical files hard to locate later. For knowledge workers and developers juggling diverse file types, this disorganization creates a significant drag on workflow.

How the Skill Works: Core Capabilities

file-organizer automates this process, acting as more than a simple script—it's an agent with planning and interactive confirmation built-in.

  1. Intelligent Scanning: Using Glob patterns or Bash commands, it first inventories all files in a target directory (default depth of 1, extensible via --recursive), analyzing extensions, modification dates, or size.
  2. Multi-Mode Categorization: Based on user instructions, it applies one of three strategies:
    • By File Type (default): Maps files to predefined categories like 'Documents', 'Images', 'Code'.
    • By Date (--mode date): Creates a hierarchical directory structure like 2023/09/.
    • Custom Rules: Users can provide a custom mapping of extensions to folder names (e.g., .pdf -> 'Ebooks'), enabling highly personalized organization.
  3. The Safety Net: Preview & Confirm: This is a critical step. Before any files are moved, the agent generates a detailed organization plan, showing file counts per category and target paths. The user must review and approve this plan before execution proceeds. This prevents unintended consequences.
  4. Execution & Reporting: Once confirmed, the agent creates the necessary directories, moves (or copies) the files, and outputs a final report with statistics.

Important Constraints and Considerations

  • Scan Depth: By default, it only processes files in the root of the target folder and does not recurse into subdirectories. Explicitly request --recursive for deep-level organization.
  • Safety by Design: Files are never overwritten. Naming conflicts are resolved by appending a numeric suffix (e.g., _1). Files starting with a dot (.) are skipped by default unless explicitly instructed otherwise.
  • Permissions and Scale: Files larger than 500MB trigger a confirmation prompt. Files without read/write permissions are skipped and noted in the final report.
  • Operation Modes: Supports moving (default) or copying (--copy) files. The source directory's empty folders are preserved by default; cleanup requires a specific user request (--clean-empty-dirs).
    In essence, this is a cautious, transparent file organization assistant that ensures a controllable process through its "plan, confirm, execute" workflow.

Use Cases

  • I have a folder cluttered with mixed documents, images, and archives, and need to sort them into separate directories based on file extensions.
  • I need to automatically organize loose files in a messy project folder into a standard structure with subfolders like 'Docs', 'Source', and 'Assets'.
  • I want to take a folder of photos and screenshots accumulated over time and automatically sort them into a 'Year/Month' hierarchical directory structure.
  • I have dozens of temporary data files of various formats and want to preview the categorization plan using a dry-run mode before executing the batch organization.

Best For

  • A person who frequently downloads all kinds of materials from the internet and has a 'Downloads' folder overflowing with files.
  • A developer juggling multiple projects who needs to organize scattered code, documents, and design assets on their desktop or workspace.
  • A photographer or average user with a large, unsorted collection of digital photos and screenshots that need to be archived by date.
  • An administrative staff or project manager responsible for organizing incoming contracts, reports, and spreadsheets into a structured file system.