Rename documents and files (PDFs, images, screenshots, etc.) by reading their content to extract the effective/publication date, then renaming them with a "YYYY-MM-DD - Clear descriptive title.ext" format. Use when the user wants to organize files with date prefixes based on document content.
Rename files in a folder by extracting the effective date from their content and giving them a clean, human-readable title.
YYYY-MM-DD - Clear descriptive title.ext
Title casing: capitalize only the first word and proper nouns (title case), like a sentence.
Examples:
2023-11-01 - General terms and conditions.pdf2025-08-01 - Credit card fees and charges.pdf2025-12-01 - Key facts statement - Term deposits.pdf2024-06-15 - Rewards program earning structure.png2024-03-01 - Schedule of charges.pdfScreenshot 2026-01-12 at 11.07.33.png → date is 2026-01-12)$ARGUMENTS if provided)YYYY-MM-DD - Title.ext pattern (but offer to clean up their titles if needed)Screenshot 2026-01-12 at ...)YYYY-MM-DD for exact dates, YYYY-MM for month-only, YYYY for year-onlymd5 -r). Files with identical hashes are exact duplicates. Propose keeping one and trashing the others.Many legal/banking documents repeat the same content translated across several languages, organized as consecutive blocks of pages (e.g., pages 1-10 in English, 11-20 in Arabic, 21-30 in Bulgarian). When detected, propose stripping to keep only English and French pages.
qpdf or pdftk to extract only the desired pages into a new fileThis skill depends on third-party CLI tools. At the start of execution, check if each is available and propose to install any that are missing via brew install.
| Tool | Brew package | Used for |
|---|---|---|
qpdf | qpdf | Extracting page ranges from PDFs (multi-language stripping) |
pdftotext | poppler | Extracting text per page for language detection in large PDFs |
exiftool | exiftool | Reading PDF metadata (CreationDate, ModDate) as date fallback |
mdls (macOS built-in) can also be used for metadata and does not need installation.
If a missing tool is needed for the current run, propose the install command and ask the user before proceeding. If the tool is not needed (e.g., no multi-language PDFs detected, so qpdf is not required), skip silently.
mdls or exiftool. Only use file system dates (modification date) as a last resortmv for renaming — never copy-and-delete