You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dotfiles/.claude/skills/rename-with-dates/SKILL.md
+17-5Lines changed: 17 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,8 +39,11 @@ Period documents that cover a date range (statement exports, period reports) may
39
39
## Workflow
40
40
41
41
1.**List files** in the target directory (default: current working directory, or `$ARGUMENTS` if provided)
42
+
42
43
2.**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)
44
+
43
45
3.**Read each file** to find the effective date and understand the content:
46
+
44
47
-**For PDFs**:
45
48
- Look for explicit "Effective from..." or "Effective date" statements — prefer these
46
49
- Look for version dates in footers (e.g., "08/2025", "v. August 14, 2023")
@@ -55,24 +58,33 @@ Period documents that cover a date range (statement exports, period reports) may
55
58
- If the image contains visible dates in its content, prefer those
56
59
- If no date can be found, ask the user
57
60
- Match the date precision to what the document provides: use `YYYY-MM-DD` for exact dates, `YYYY-MM` for month-only, `YYYY` for year-only
61
+
58
62
4.**Choose a clear title**:
63
+
59
64
- Use sentence case: capitalize only the first word and proper nouns
60
65
- Be descriptive but concise (e.g., "Credit card fees and charges", not "popularbankname_credit_card_fees_charges")
61
66
- For screenshots: summarize what the image shows (e.g., "Rewards program earning structure", "Account balance overview")
- Remove redundant institution names if the folder context already makes it clear
64
69
- When two documents of the same type share the same effective date but cover different product segments, disambiguate in the title (like `KFS - Credit cards (Skywards, Cash+ and Live+)` vs `KFS - Credit cards (Private Bank, Premier and Advance)`)
65
70
- Manuals and spec sheets: title as `Brand Model - Doc type` (like `Gorenje WHT923E5XUK - Cooker hood manual`); vendor doc codes often embed the publication date (Grohe `…/02.19` = February 2019)
71
+
66
72
5.**Present a summary table** showing current name, detected date, and proposed new name
73
+
67
74
6.**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
75
+
68
76
7.**Post-rename analysis** — after renaming, scan the folder for cleanup opportunities and present a report with three sections:
77
+
69
78
-**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.
79
+
70
80
-**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.
81
+
71
82
-**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.
72
83
73
84
-**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.
74
85
75
86
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.
87
+
76
88
8.**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
77
89
78
90
## Multi-language PDF stripping
@@ -110,12 +122,12 @@ Many legal/banking documents repeat the same content translated across several l
110
122
111
123
This 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`.
Copy file name to clipboardExpand all lines: dotfiles/.claude/skills/session-title/SKILL.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ When the user asks to refresh or rename the current session's title:
11
11
Use sentence case. Capitalize the first word and proper nouns only.
12
12
13
13
2.**Determine the session_id and transcript path.**
14
+
14
15
-`session_id` is in the env var `CLAUDE_SESSION_ID` if set, otherwise: take the basename (without `.jsonl`) of the most recently modified `*.jsonl` file directly under `~/.claude/projects/<sanitized-cwd>/` where `<sanitized-cwd>` is the current working directory with `/` replaced by `-`.
15
16
- The transcript path is `~/.claude/projects/<sanitized-cwd>/<session_id>.jsonl`.
0 commit comments