← Back to Directory
🍳

File Organization Agent

Monitor your Downloads folder (or any directory). Auto-organize files by type, date, and project. Keep your filesystem tidy without thinking about it.

🤖 00 ↓  |  👤 00
beginner10 min setup

🧂 Ingredients

📋 Step-by-Step Build Guide

STEP 1

Monitor target directory for new files

Monitor target directory for new files

Monitor target directory for new files

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 2

Classify file by extension: images, documents, code, archives, media

Classify file by extension: images, documents, code, archives, media

Analyze the input and classify it into the defined categories.

Classification approach:
1. Extract key signals from the content (keywords, sender, urgency markers, topic)
2. Match against category definitions
3. Assign confidence score (high/medium/low)
4. For ambiguous cases, classify as the more important/urgent category (err on the side of caution)

Output for each item: { category, priority, confidence, reasoning }

If an item could belong to multiple categories, pick the primary one and note the secondary.
STEP 3

Extract date from filename or file metadata

Extract date from filename or file metadata

Parse the input data and extract the specified fields.

Processing steps:
1. Parse the raw input (JSON response, transcript text, HTML content)
2. Identify and extract each required field
3. Normalize data formats: dates to ISO 8601, amounts to numbers, text trimmed
4. Validate extracted data — flag missing or malformed fields
5. Structure the output as a clean JSON object

For text extraction (transcripts, articles):
- Use pattern matching for structured data (dates, amounts, URLs)
- Use semantic understanding for unstructured data (key decisions, action items, sentiment)

Return both the extracted data and a confidence indicator for each field.
STEP 4

Move to organized folder structure: ~/Organized/{type}/{YYYY-MM}/

Move to organized folder structure: ~/Organized/{type}/{YYYY-MM}/

Move to organized folder structure: ~/Organized/{type}/{YYYY-MM}/

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 5

For screenshots, extract text via OCR and name descriptively

For screenshots, extract text via OCR and name descriptively

For screenshots, extract text via OCR and name descriptively

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 6

Log all moves to file-org-log.json

Log all moves to file-org-log.json

Log all moves to file-org-log.json

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 7

Clean up empty folders periodically

Clean up empty folders periodically

Clean up empty folders periodically

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.

🤖 Example Agent Prompt

Monitor target directory for new files

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.

Copy this prompt into your agent to get started.