Catalogue / invoice-receipt-filer
invoice-receipt-filer
Older skill: source not recordedSignedCleans up messy folders of invoices and receipts. Reads each PDF, scan or screenshot, captures the vendor, date, invoice number, amount and description, renames every file to one consistent pattern, arranges them in a folder scheme the user picks, and writes a summary CSV for bookkeeping or tax fili…--- name: invoice-receipt-filer description: > Cleans up messy folders of invoices and receipts. Reads each PDF, scan or screenshot, captures the vendor, date, invoice number, amount and description, renames every file to one consistent pattern, arranges them in a folder scheme the user picks, and writes a summary CSV for bookkeeping or tax filing. Use when the user points at a disordered pile of invoice PDFs, downloaded receipts or scanned expense documents and asks to sort, rename, or file them. Not for creating or sending invoices, converting bank statements into transactions, or deciding what counts as tax-deductible. ---
Invoice and Receipt Filer
Take a dumping-ground folder full of invoice PDFs, camera photos of receipts, and email saves, and turn it into a consistently named, well-filed archive plus one spreadsheet the user can hand to an accountant.
Step 1 — Inventory the folder
Scan the target folder recursively for documents: PDF, JPG, PNG, HEIC, and anything that looks like a saved email attachment. Before reading anything, report:
- Total file count, broken down by extension.
- The rough date span you can guess from filenames.
- Anything that is clearly not a financial document (photos, installers, zip archives) so you can propose skipping it.
Step 2 — Read each document
For every file, attempt to capture six fields and tag each one as read (found in the document), inferred (only from the filename or file timestamp), or missing:
| Field | Where it usually appears | |---|---| | Vendor | Letterhead or the shop name at the top of a receipt | | Date | Labeled "date of issue", "invoice date", "billing date", or printed on a receipt | | Invoice number | Near the header, often after "No.", "#", "REF", or "order number" | | Amount | The total line — prefer "total due", "amount payable", or "grand total" over any subtotal | | Currency | Symbol or ISO code exactly as printed; record it, assume nothing | | Description | The main line item or plan name, condensed to a few words |
Extract text from PDFs; read visible text in images. Two hard rules while reading:
- Record only what the document states. If a value is absent, leave it empty. Never estimate an amount, guess a year, or assign a vendor from surrounding context.
- If a PDF is password-protected, list it for the user and move on. Never try to get around the protection.
Step 3 — Agree on a filing scheme
If the user did not specify a structure, offer these and default to year-then-category:
| Scheme | Example path | Best suited for | |---|---|---| | By vendor | Invoices/Figma/ | Few suppliers, frequent per-vendor lookups | | Year, then category | Invoices/2025/Software/ | Annual tax prep (default) | | Year, quarter, category | Invoices/2025/Q1/Travel/ | Quarterly expense reporting | | Tax status | Invoices/Deductible/, Invoices/Personal/ | Accountant hand-off; apply only labels the user assigns, never decide deductibility yourself |
Use sensible categories such as Software, Hardware, Office, Travel, Meals, Professional Services, and let the user rename or add to the list.
Step 4 — Build the rename plan
Rename every file to: YYYY-MM-DD_Vendor_Type_Short-description.ext
- ISO date first so the folder sorts chronologically.
- Type is
InvoiceorReceipt; description is 2–4 hyphenated words. - Strip characters that confuse filesystems; keep the original extension.
- If two files would collide, append
-2,-3.
Sample rows for the plan:
| Current name | New name | Destination | |---|---|---| | download(3).pdf | 2025-04-02_Figma_Invoice_Professional-Seat.pdf | Invoices/2025/Software/ | | IMG_2847.jpg | 2024-11-19_Uline_Receipt_Shipping-Labels.jpg | Invoices/2024/Office/ | | fw9812.pdf | 2023-08-30_Heroku_Invoice_Postgres-Mini.pdf | Invoices/2023/Software/ |
If a date came only from a file timestamp, use it but mark the file for review and say so in the plan.
Step 5 — Show the plan and get an explicit yes
Present the proposed folder tree and the before/after table, then stop and ask for a clear yes or no. These rules exist because this skill rearranges the user's financial records:
- Default to copying files into the new structure and leaving every original untouched. Move or rename in place only when the user plainly requested that in this session.
- Never delete or overwrite anything to "tidy up", not even duplicates. Flag duplicates in the summary; any deletion happens only if the user asks for it in plain words and then confirms a second time.
- Files missing vendor, date, or amount go to a
Needs-Review/folder under their original names.
Step 6 — Execute
Only after approval: create the directories, copy (or move, if chosen) each file per the plan, and route flagged files to Needs-Review/. For duplicates, if two files are byte-identical, file one copy and note the other in the summary; if they merely look alike, keep both and note them. Keep multi-part invoices filed adjacently with part numbers in the description and a note in the CSV — this skill does not merge PDFs.
Step 7 — Write the summary CSV and report
Write one CSV with columns Date,Vendor,InvoiceNumber,Type,Description,Amount,Currency,Category,FilePath,Flags:
Date,Vendor,InvoiceNumber,Type,Description,Amount,Currency,Category,FilePath,Flags 2025-04-02,Figma,FIG-88214,Invoice,Professional seat,180.00,USD,Software,Invoices/2025/Software/2025-04-02_Figma_Invoice_Professional-Seat.pdf, 2024-11-19,Uline,,Receipt,Shipping labels,64.30,USD,Office,Invoices/2024/Office/2024-11-19_Uline_Receipt_Shipping-Labels.jpg,date-inferred
Then close with a report: files processed, files skipped, needs-review count, unique vendor count, per-category totals computed only from amounts you actually read, and the CSV location.
What you must never do
- Never create, alter, or remove any file before the plan is approved in Step 5.
- Never fill a blank field with a guess — an empty cell plus a flag is always better than a plausible invention.
- Never send invoice contents or the CSV anywhere off the user's machine; everything stays local.
This skill does not cover persistent folder-watching automation; it processes folders on demand only.
| File | Size | SHA-256 |
|---|---|---|
| SKILL.md | 6.3 kB | 7ae8bcee7502 |
| examples.json | 2.3 kB | 1de27495528e |
Published verbatim from the pinned commit. Nothing is rewritten.
| Version | Pinned commit | Signed | |
|---|---|---|---|
| 1.0.0 Current | Not recorded | 6 Oct 2026 |
Locking a skill to one version needs Pro.