AI Agent Hub
Back to skills
File Organizer icon

File Organizer

Office Efficiency Updated 2026.08.29

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

Please follow https://skillhub.cn/install/skillhub.md and install @user_4eb5ad63/ljs.

About this skill

Reducing directory clutter

When a workspace accumulates screenshots, reports, scripts, installers, and config files, locating files by extension quickly becomes tedious. In download folders, shared drives, and project roots, manual dragging can miss duplicate names and already organized files. File Organizer moves top-level files in a target directory into underscore-prefixed category folders, such as _图片, _文档, _压缩包, and _代码, so category folders stay near the top of the file list.

How it works

  • Parameter handling: the first argument may be a target directory; if omitted, it uses the current working directory. --dry previews the move summary, --recursive processes subdirectories, and --undo restores the last operation from .organize_undo.json.
  • Safe moves: the skill maps each file to a category by extension, creates missing folders, and moves the file. Conflicting target names receive a numeric suffix, such as file_1.pdf, to avoid overwrites. The default rules cover images, documents, archives, video, audio, code, installers, fonts, databases, and config files.
  • Traceability and undo: each run writes .organize_undo.json with source paths. Undo can return files to their original locations, delete empty category folders, and remove the log.

Boundaries

It focuses on top-level files and a single organization snapshot, and does not repeatedly reorganize files already placed inside _图片 or other category folders. If a target category folder already contains the same file name, a numeric suffix is added. For complex directory trees or cross-drive moves, run --dry first to review the summary before performing the actual move.

Use Cases

  • After taking over a shared drive, sort downloads such as images, PDFs, and archives into fixed folders by type.
  • Run --dry before moving files to confirm that files in existing category folders will not be reorganized.
  • After organizing a project root, restore misplaced scripts or documents to their original locations using --undo.
  • Process exported files from subdirectories, placing top-level assets into folders such as _图片 or _文档 by extension.

Best For

  • IT support staff maintaining shared download drives, who need screenshots, reports, and installers kept in predictable folders.
  • Product operations members organizing handover materials, who need client screenshots, requirement docs, and archives split into browsable directories.
  • Engineering leads maintaining script repositories, who want downloaded code, databases, and config files moved out of the project root.
  • Project assistants handling delivery materials across projects, who need image, document, and installer sorting with undo support.