🗂️ Agent File Organizer
An intelligent, safety-first, cross-platform file organizer for Windows, macOS, and Linux — powered by AI Agent Skills, FastMCP, and CLI.
Whether you use Windows File Explorer, macOS Finder, or Linux desktop managers (Nautilus, Dolphin, Thunar, etc.), Agent File Organizer works directly at the filesystem level. It delivers the careful, nuanced organization a human would do, rather than mechanically dumping files into broad buckets by extension alone.
🌟 Why Agent File Organizer?
Traditional file organizers blindly sort by file extension (e.g. all .jpgs to Pictures). Agent File Organizer uses semantic understanding and content heuristics:
- 📸 Smart Image Sorting: Distinguishes between screenshots, camera/phone captures (via EXIF metadata), receipts/invoices, and ambiguous images.
- 🎮 Minecraft & Mod Support: Identifies Minecraft mod
.jarfiles (fabric,forge,quilt,neoforge,optifine,sodium) and routes them cleanly away from generic application JARs. - 🎵 Music & Audio Hierarchy: Organizes music by
<Artist>/<Album>using ID3 tags or filename patterns, while respecting existing flat music folders. - 🎥 Video Classification: Separates screen recordings (OBS, Zoom, screencasts) from clips and movies.
- 💻 Universal Compatibility: Works natively on Windows, macOS, and Linux without requiring any proprietary file-manager plugins or APIs.
- 🔒 100% Reversible & Safe: Every run performs a dry-run plan first, prevents accidental overwrites with collision suffixing, and writes append-only undo logs.
🚀 3 Ways to Use
1. 🤖 As an AI Agent Skill (Antigravity, Claude Code, OpenAI Codex, & More)
This repository includes a drop-in Agent Skill compliant with the Agent Skills standard (SKILL.md).
🪐 Antigravity
- Global (All Projects):
cp -r skills/file-organizer ~/.gemini/config/skills/
- Project-Level:
mkdir -p .agents/skills cp -r skills/file-organizer .agents/skills/
🧠 Claude Code
mkdir -p ~/.claude/skills
cp -r skills/file-organizer ~/.claude/skills/
⚡ OpenAI Codex / ChatGPT Developer Mode
- Place
skills/file-organizerin your repository root under.agents/skills/or.codex/skills/. - Alternatively, include
skills/file-organizer/SKILL.mdin your agent's system prompt or workspace instructions.
🌐 Other AI Agents (Cursor, Windsurf, Aider, Devin, etc.)
This skill works seamlessly with any AI agent or coding assistant that supports external skills, custom rules, or runbooks. Simply copy the skills/file-organizer directory into your project's .agents/skills/ folder or reference SKILL.md.
Once installed, simply prompt your agent:
"Organize my Downloads folder" or type
/file-organizer
2. ⚡ As a Model Context Protocol (MCP) Server
Compatible with ChatGPT for Desktop, Claude Desktop, Cursor, Zed, Windsurf, and Antigravity across Windows, macOS, and Linux.
Installation:
pip install -e ".[mcp,media]"
Client Configuration (mcpServers):
Add the following to your MCP settings file (e.g. claude_desktop_config.json, ChatGPT Desktop MCP settings, or Cursor MCP config):
{
"mcpServers": {
"file-organizer": {
"command": "file-organizer-mcp",
"args": []
}
}
}
Available MCP Tools:
detect_folder_structure— Detects whether target directories are flat, by-year, or custom-organized.generate_organize_plan— Scans files and produces a dry-run move plan with confidence ratings.modify_plan_move— Interactively alters or resolves a planned destination.remove_move_from_plan— Drops a move to keep a file untouched.execute_move_plan— Safely applies confirmed moves with collision protection and creates an undo log.undo_past_moves— Reverses moves from any previous run log.
3. 💻 As a Standalone CLI Tool
Install from source:
pip install -e .
Cross-Platform Commands:
1. Quick Sort (Fresh-only mode with safe defaults):
file-organizer scan --targets ~/Downloads --quick --output /tmp/plan.json
2. Detect Existing Schemes Before Organizing:
file-organizer detect --targets ~/Pictures ~/Videos ~/Music
3. Apply Confirmed Plan:
file-organizer apply --plan /tmp/plan.json
4. Undo Any Past Run:
file-organizer undo ~/.file-organizer/logs/moves-<timestamp>.log
🛡️ Non-Negotiable Safety Rails
- Dry-Run First: Nothing moves without explicit inspection and confirmation of the plan.
- Move, Never Delete: True duplicates are flagged for your manual review; files are never deleted automatically.
- No Silent Overwrites: When filenames collide at destination, a numeric suffix
(1),(2)is appended. - Append-Only Undo Log: Every single move is safely recorded and can be reversed with one command (
file-organizer undo). - No System / Hidden Files: Hidden files (
.config,.git,Thumbs.db,.DS_Store) and in-progress downloads (.crdownload,.part,.tmp) are strictly ignored. - Prior Run Memory: Files already placed by a previous run will not be re-flagged or churned.
📁 Repository Structure
├── README.md # Master Guide & Documentation
├── SKILL.md # Agent Skill definition (root)
├── pyproject.toml # Package definition & CLI/MCP entrypoints
├── LICENSE # MIT License
├── .gitignore # Git ignore rules
├── file_organizer/ # Python Core Package
│ ├── __init__.py # Package version & API
│ ├── cli.py # CLI entrypoint (`file-organizer`)
│ ├── server.py # FastMCP server (`file-organizer-mcp`)
│ ├── taxonomy.py # File rules, extensions, regexes
│ └── core/
│ ├── scanner.py # Classification engine & planner
│ ├── structure.py # Existing scheme detector
│ ├── applier.py # Safe move executor with undo logger
│ ├── undo.py # Undo engine
│ └── plan_editing.py # Plan editor functions
├── skills/ # Drop-in Agent Skill
│ └── file-organizer/
│ ├── SKILL.md # Agent guide with YAML frontmatter
│ ├── scripts/ # Standalone runner scripts
│ ├── references/ # Taxonomy & behavior specs
│ └── assets/ # Example YAML config
└── tests/ # Unit tests
├── test_scanner.py
├── test_structure.py
└── test_applier_undo.py
📄 License
Released under the MIT License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_file_organizer-1.0.0.tar.gz.
File metadata
- Download URL: agent_file_organizer-1.0.0.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddafa057b36960a0a2363e60c7d7b098d98ba409ae7338ab137639d0a59d80c2
|
|
| MD5 |
db0ac29ef84e32ff8cd1866a5ef37434
|
|
| BLAKE2b-256 |
9e435f6ede27b05f58e10d57a2e98ee6f45d3abb3b0fae441471579be43d996c
|
File details
Details for the file agent_file_organizer-1.0.0-py3-none-any.whl.
File metadata
- Download URL: agent_file_organizer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 23.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5d47c6ac05425f85357b72d9ff7ce9fbe7039f1d125516d196abf9b4410143b
|
|
| MD5 |
b57eaf524f43b18dccfa6c1c4bc71f73
|
|
| BLAKE2b-256 |
05ddb3e248bcfe34dd5a9b40490e8e882f00a5a4f2b828fa5839a97e1191b183
|