You ask in plain words
With whatever notes or documents you already have.
How should I rename these scanned photos so they sort by date?
Prepare a dry-run manifest.
Your notes
x001.JPG: letter dated 1964-10-02, id A7, scanned 2026-11-01. x002.JPG: receipt, id R9, no document date.
Your agent answers with a checked method
It runs 5 checks before it replies.
Your agentUsing this skill
Proposed rename: x001.JPG → 1964-10-02_letter_a7.jpg. Hold x002.JPG. It is receipt R9, but its document date is unknown. The scan date cannot supply the missing date.
- Two scans on one date can still be separate originals.
- Lowercasing on a different filesystem can collapse distinct names.
- Using the scan date because it is in the file metadata. It records when the copy was made, not when the document was written.
- Renaming A to B before the existing B has moved, which overwrites B.
- Using characters some systems reserve, such as a colon, slash or question mark, or ending a name with a space or full stop, which Windows does not support.
Why that’s right. The scan date is not used to fill a missing document date.
Is it the right skill?
What it’s for, and when another skill or a person is the better choice.
Use it when
- Someone has a folder of scans with scanner or camera names, such as IMG_0042.JPG or scan001.tif, and wants consistent dated names.
- An archive or family collection needs file names that sort by document date and include an item identifier.
- Names are being changed on a case-insensitive drive, or two files need to swap names, and nothing may be overwritten.
Not the right skill when
- Cataloguing or describing the documents. File names help retrieval; descriptions belong in a catalogue or metadata record.
- Running the rename. This skill produces a dry-run manifest for the person or a script to apply after review.
- Dating an undated document from its content. Mark the date unknown, or ask an archivist to assess it.
The method it follows
7 steps, in order, every time.
- Fix the convention before proposing names: ISO 8601 dates (YYYY-MM-DD) so names sort by date, then document type, item identifier and extension, using only lowercase letters, digits, hyphens and the _ character, with no spaces or other punctuation.
- Take the date from the document or its catalogue record. If there is none, keep the date unknown and hold the file; never substitute the scan date or the file's modified date.
- Propose each new name in a side-by-side manifest: old name, new name and where each part came from. Keep the file's extension, in lowercase.
- Normalise names for comparison, by lowercasing and applying Unicode normalisation, then check for collisions among the proposed names and against existing files in the destination that are staying where they are.
- Hold every file involved in a collision, not just the second one, and say what detail would tell them apart, such as a sheet number or a distinct identifier.
- Tell apart a true collision (two files want the same final name) and a temporary conflict (a final name is currently held by another file in the batch). For swaps, cycles and case-only changes, plan a first pass to unique temporary names on the same volume, checked against the whole directory, then a second pass to the final names.
- Never overwrite a file outside the selection. Keep the manifest as the record of the change so it can be reversed.
What to have ready
If something’s missing, your agent asks before it starts.
- Current filenames, known document dates, document type, item identifiers and naming convention.

What naming convention should be used, such as YYYY-MM-DD_type_id.ext? Agreeing it first avoids renaming twice.

Where does each document's date come from: the date written on it, a catalogue record, or nowhere? The scan date is not the document date.

Which drive and operating system will hold the files? Windows, and macOS drives formatted as case-insensitive, treat names that differ only in case as the same file.

Are there other files in the destination folder that are not being renamed?
Try it on your own AI
A new question with a known answer, so you can check your AI gets it right.
-
Copy the questionWhich files may be renamed? Return only JSON following the skill’s test format. one.TIF: 1970-01-01 map id A. two.tif: 1970-01-01 map id a. Three.tif: 1970-01-01 map id B.
-
Ask your AI in a new chat
Give it this skill first, then paste the question. It replies with a short block of data in the format the skill asks for.
-
Show the answer and why
The two proposed ‘a’ names would collide after normalisation.
{
"rename": {
"Three.tif": "1970-01-01_map_b.tif"
},
"hold": [
"one.TIF",
"two.tif"
]
}
The check runs in your browser. Nothing you paste is sent anywhere.
-
Copy the questionGive the dry-run manifest and flag staged renames. Stage all participants in a cycle before assigning final names. Return only JSON following the skill’s test format. Case-insensitive volume. 1960-01-01_letter_a.jpg actually contains a letter dated 1961-01-01, ID B. 1961-01-01_letter_b.jpg contains the letter dated 1960-01-01, ID A. Neither destination is occupied by an unselected file.
-
Ask your AI in a new chat
Give it this skill first, then paste the question. It replies with a short block of data in the format the skill asks for.
-
Show the answer and why
Each document has a unique final name. Staging both first keeps the first rename from overwriting the second document.
{
"rename": {
"1960-01-01_letter_a.jpg": "1961-01-01_letter_b.jpg",
"1961-01-01_letter_b.jpg": "1960-01-01_letter_a.jpg"
},
"hold": [],
"stage": [
"1960-01-01_letter_a.jpg",
"1961-01-01_letter_b.jpg"
]
}
The check runs in your browser. Nothing you paste is sent anywhere.
Where the method comes from
Free to use and adapt with credit (CC BY 4.0).
Use this skill in Raq.com
Add it to your Skill Library and your agent applies it whenever a request matches. Edit it for your own business and keep every version.