/dotfiles:rename-with-dates [directory or files]from Kevin's dotfiles skills
Renames documents (PDFs, images, screenshots, etc.) by extracting publication dates from content and applying a YYYY-MM-DD - Title format. Handles PDFs, images, Office docs, and email exports.
Ships in Kevin's dotfiles skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.pdfPeriod documents that cover a date range (statement exports, period reports) may extend the prefix to YYYY-MM-DD--YYYY-MM-DD - Title.ext — preserve that convention where a folder already uses it.
pdftoppm -png -r 30 and view those insteadScreenshot 2026-01-12 at 11.07.33.png → date is 2026-01-12).xlsx, read docProps/core.xml inside the zip (unzip -p file.xlsx docProps/core.xml) for dcterms:created; for Apple .numbers, the package often embeds a readable preview.jpg or preview.pdf. A stray .~lock.*# file next to a document is a LibreOffice lock: the document may be open somewhere (possibly on another synced machine); stale locks are trash candidatesIMG_1234.jpeg dumps) is an archive, not a document set — propose skipping it wholesale instead of dating each file. Rename a photo only when it acts as a document (appliance rating plate, meter photo, signed-form snapshot), dating it from EXIF DateTimeOriginal via exiftoolList files in the target directory (default: current working directory, or $ARGUMENTS if provided)
Skip files that already follow the YYYY-MM-DD - Title.ext pattern (but offer to clean up their titles if needed). A bare date with no title (like 2023-08-17.pdf) is not compliant — read the file and add the missing title (often just Invoice or Receipt inside a provider folder, where the folder name already gives context)
Read each file to find the effective date and understand the content:
V160701.1 reads as YYMMDD but may be template artwork — if the same code appears on documents with different effective dates, it is not a date. Reference codes (like CRN FRM021121) often embed a MMDDYY date and corroborate other evidence at month precisionLICDSO202600109568.pdf or bill-3733181.pdf) are almost always invoices or receipts — open them; the code itself rarely matters to the userScreenshot 2026-01-12 at ...)YYYY-MM-DD for exact dates, YYYY-MM for month-only, YYYY for year-onlyChoose a clear title:
KFS - Credit cards (Skywards, Cash+ and Live+) vs KFS - Credit cards (Private Bank, Premier and Advance))Brand Model - Doc type (like Gorenje WHT923E5XUK - Cooker hood manual); vendor doc codes often embed the publication date (Grohe …/02.19 = February 2019)Present a summary table showing current name, detected date, and proposed new name
Rename all files after presenting the plan. On case-insensitive filesystems (macOS APFS), a case-only rename fails with "are the same file" — do it in two steps through a temporary name
Post-rename analysis — after renaming, scan the folder for cleanup opportunities and present a report with three sections:
Duplicates: Compare files with similar titles using MD5 checksums (md5 -r). Files with identical hashes are exact duplicates. Propose keeping one and trashing the others. If an undated file is an exact duplicate of an already-compliant one, do not rename it into a name collision — leave its name untouched and propose trashing it. Also compare content when hashes differ but titles match: re-downloads of the same document often differ only in PDF metadata. Printed document numbers (invoice number, receipt number, DocuSign envelope ID) are reliable fingerprints for catching these content-duplicates.
Superseded documents: Identify files that are older versions of the same document type (e.g., "Personal banking general T&C" from 2023 vs 2025). The newer version supersedes the older. Propose trashing the older version.
Expired documents: For time-bound documents (campaigns, offers, promotions) that specify a validity period (e.g., "1 November 2025 – 31 December 2025"), check if the end date has passed relative to today. Propose trashing expired ones. Do not flag standing T&Cs, KFS documents, or privacy policies — only documents with explicit campaign/offer end dates.
Not applicable: documents covering products or services the user does not hold (other product tiers' T&C, KFS for products never subscribed, forms for other customer segments). Ask the user to confirm their actual holdings, then propose trashing the rest — documents for held products stay, as they are the contractual record of the terms in force.
When the user approves trashing, move the files into a dated subfolder like ~/.Trash/{folder} cleanup YYYY-MM-DD/ so the whole batch stays grouped and recoverable. Writing into ~/.Trash is typically blocked by the command sandbox — run that step outside the sandbox.
Verify by listing the final result with plain binaries — ls may be aliased (eza, lsd) and print nothing when piped — and run a compliance sweep: /usr/bin/find . -type f | sed 's|.*/||' | grep -Ev '^[0-9]{4}(-[0-9]{2})?(-[0-9]{2})?(--[0-9]{4}-[0-9]{2}-[0-9]{2})? - ' should return only intentionally held files
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 to extract only the desired pages into a new file (qpdf in.pdf --pages . 1-4 -- out.pdf)qpdf --show-npages must match the detected page total, and the stripped output must match the kept range length — skip the file on any mismatch~/.Trash/{folder} cleanup YYYY-MM-DD/pre-strip originals/) as a safety netThis 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), page counts (--show-npages) |
pdftoppm | poppler | Rendering PDF pages — the Read tool depends on it to view PDFs at all |
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.
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.
If the target folder contains any PDFs, install poppler first thing: without pdftoppm the Read tool cannot render PDF pages, so no PDF can be inspected at all. Note that brew install writes to /opt/homebrew and usually needs to run outside the command sandbox.
mdls or exiftool. Only use file system dates (modification date) as a last resortmv for renaming — never copy-and-deletepdftotext -layout, OCR the image-only ones with tesseract on a pdftoppm -r 200 render, and grep the dumps; open a page only where the text leaves the date or the content unclear. Normalize the dumps to NFC before matching accented words: pdftotext can emit é as e plus a combining accent, so a pattern for décembre misses without an errorWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub kdeldycke/dotfiles --plugin dotfiles10 skills in this plugin
/agent-config-self-tuneAudit and tune the configuration of coding agents across Claude Code and pi - settings files (settings.json, settings.local.json), permission rules, instruction files (CLAUDE.md, AGENTS.md), skill bodies and agent definitions. Use when an instruction file, a skill or an agent definition gets bloated or too big, or when asked to slim down, spread, deduplicate, relocate or compress it. Reads each source once, drops what another layer states, moves each rule beside the code, test or docs page it governs, then re-encodes what stays in a dense register to cut token count and context bloat. Also compresses system prompts and tool descriptions, percolates recurring local patterns into the global config, and reviews past session transcripts for tool calls denied by the sandbox or allow/deny rules to propose allowlist refinements./audit-repo-issuesAnalyze a GitHub repository's issues and PRs to find unaddressed feature requests, dismissed ideas, maintenance signals, and opportunities relevant to the current project. Use when you want to scout a related or competing repo for gaps your project could fill./fill-web-formFill a web form using data extracted from local documents (PDFs, images, spreadsheets). Uses Claude Desktop (Cowork) with Chrome integration to read source documents and navigate/fill browser forms. Use when the user wants to automate filling an online form from document data./memory-reviewReview, prune and repair the persistent memory of Claude Code (~/.claude/projects/*/memory). Verify every memory against the code, the docs, the skills and the upstream state, fix or delete the stale ones, merge duplicates, and keep each MEMORY.md index in step with its folder. Use when a memory misled a session, when memories look stale or bloated, when asked to clean up, prune, audit or consolidate memories, or every few months./pr-triageAudit open PRs across multiple repos for duplicates, stale drafts, Renovate noise, and conflicts. Produces a unified priority report./session-titleRefresh the current Claude Code session's title (shown in /resume picker and terminal tab). Trigger on "rename session", "refresh session title", "update tab title", "set session title to ...".Other plugins' skills for the same job