<h1 align="center">
<a href="https://prompts.chat">
Sign in to like and favorite skills
Automate the filing of scanned business and personal documents. Read PDF content directly to extract text and visual information, analyze the content to determine the document date and a brief description, then rename files appropriately and move them to the correct destination folder in OneDrive.
Use this skill when:
CRITICAL: Before any other processing, ALWAYS ask the user:
"Is this business filing or personal filing?"
Use the AskUserQuestion tool with options:
This determines:
Identify all PDF files in the current directory (or user-specified directory). Confirm with the user how many files were found and that processing should proceed.
For each PDF file:
Read the PDF using the Read tool to extract text and visual content
Analyze the content to determine:
YYYYMMDD format (or YYYYMM if day is not available)Type_Subtype_Description[_Person]
references/personal-filing-taxonomy.md for detailed guidance on Types, Subtypes, and formatting conventionsFlag for manual review if:
For each successfully analyzed document:
Generate new filename based on filing type:
Business filing (Simple format for tax purposes):
YYYYMMDD - receipt - description.pdf20251001 - receipt - parking in philadelphia.pdfPersonal filing (Rich format for searchability):
YYYY-MM-DD_Type_Subtype_Description[_Person].pdf2025-01-03_Medical_EOB_Dermatology_Joe.pdfreferences/personal-filing-taxonomy.md for complete details on Types, Subtypes, Description formatting, and Person usageRoof-Repair, Adobe-CC)Handle filename conflicts in current directory: If renamed file already exists, append numeric suffix:
20251001 - receipt - parking in philadelphia (1).pdf2025-01-03_Medical_EOB_Dermatology_Joe (1).pdfRename the file in place (stays in current directory):
# Business example: mv "original-filename.pdf" "20251001 - receipt - parking in philadelphia.pdf" # Personal example: mv "scan1.pdf" "2025-01-03_Medical_EOB_Dermatology_Joe.pdf"
Provide rename summary: Show user what files were renamed and their new names
STOP and ask user to verify: "I've renamed all files. Please review the new filenames. Should I proceed with moving them to their final locations?"
Wait for user confirmation before proceeding to Step 5.
After user confirms the renamed files look correct:
Determine target directory based on filing type:
Business filing:
~/OneDrive/Family Room/Taxes/{YYYY} - Taxes/~/OneDrive/Family Room/Taxes/2025 - Taxes/Personal filing (Hybrid approach):
~/OneDrive/Family Room/Active/~/OneDrive/Family Room/Active/2025-01-03_Medical_EOB_Dermatology_Joe.pdf~/OneDrive/Family Room/Archive/{YYYY}/~/OneDrive/Family Room/Archive/2020/2020-05-15_Home_Invoice_Roof-Repair.pdfFor both types:
Handle filename conflicts at destination: If file already exists at destination, append numeric suffix:
20251001 - receipt - parking in philadelphia (1).pdf2025-01-03_Medical_EOB_Dermatology_Joe (1).pdfMove the files:
# Business example: mv "20251001 - receipt - parking in philadelphia.pdf" "~/OneDrive/Family Room/Taxes/2025 - Taxes/" # Personal example (recent): mv "2025-01-03_Medical_EOB_Dermatology_Joe.pdf" "~/OneDrive/Family Room/Active/" # Personal example (older): mv "2020-05-15_Home_Invoice_Roof-Repair.pdf" "~/OneDrive/Family Room/Archive/2020/"
After processing all files, provide a summary:
For flagged items, include:
User request:
"Process the receipts in this folder"
Workflow:
receipt1.pdf, receipt2.pdf, receipt3.pdfreceipt1.pdf → 20251015 - receipt - office depot supplies.pdf~/OneDrive/Family Room/Taxes/2025 - Taxes/User request:
"File these documents"
Workflow:
scan1.pdf, scan2.pdf, scan3.pdfscan1.pdf: date=2025-03-20, type=Medical, subtype=EOB, description=Cardiology-Visit, person=Joescan2.pdf: date=2024-11-03, type=Home, subtype=Invoice, description=Roof-Repairscan3.pdf: date=2019-11-15, type=Legal, subtype=Inspection, description=Home-Purchase-288-Greenscan1.pdf → 2025-03-20_Medical_EOB_Cardiology-Visit_Joe.pdfscan2.pdf → 2024-11-03_Home_Invoice_Roof-Repair.pdfscan3.pdf → 2019-11-15_Legal_Inspection_Home-Purchase-288-Green.pdf~/OneDrive/Family Room/Active/ (recent, 2023+)~/OneDrive/Family Room/Archive/2019/ (older)YYYYMMDD - receipt - description.pdf~/OneDrive/Family Room/Taxes/{YYYY} - Taxes/YYYY-MM-DD_Type_Subtype_Description[_Person].pdf~/OneDrive/Family Room/Active/~/OneDrive/Family Room/Archive/{YYYY}/references/personal-filing-taxonomy.md for complete taxonomy with examplesRoof-Repair, Adobe-CC, Purchase-288-Green)fd and rg# Find all medical docs for Joe fd "_Medical_.*_Joe" ~/OneDrive/Family\ Room/ # Find anything about 288 Green St fd "288-Green" ~/OneDrive/Family\ Room/ # Find all insurance policies fd "_Insurance_Policy" ~/OneDrive/Family\ Room/ # Full-text search rg "roof replacement" ~/OneDrive/Family\ Room/