其他Oct 4, 2026·7 min read

Safety Brief Before an Agent Sorts Your Images

A reusable prompt that turns your folder, rename and undo answers into a one-page brief an image-sorting helper must follow.

Agent ready

Review-first install path

This asset needs a review step. The copied prompt tells the agent to dry-run, show the writes, then proceed only after confirmation.

Needs Confirmation · 62/100Policy: confirm
Agent surface
Any MCP/CLI agent
Kind
Prompt
Install
Single
Trust
Trust: Established
Entrypoint
PROMPT.md
Review-first command
npx -y tokrepo@latest install c84b0798-fd53-44fc-8797-7a729a4ac6ba --target codex

Dry-run first, confirm the writes, then run this command.

Start here

What to paste: copy the complete prompt below into an ordinary AI chat that accepts text. Before that, paste your own answers to the eight questions it asks. If you leave any answer out, the prompt tells the assistant to insert [NEEDS MY INPUT] instead of guessing.

Where to paste it: any text chat with an AI assistant. No terminal, account setup or file upload is required.

How to check the output: the reply should be Markdown with ten numbered headings, fit on roughly one page, and end with a three-line "Before I approve" checklist. Compare it against your own answers:

Check Should be true
Scope names one root folder you approved
Off-limits list contains the folders you listed as untouchable
Rename example uses only separators you actually supplied
Deletion shows NO unless you explicitly allowed it
Undo plan understandable without the helper present

The brief is preparation only. It schedules nothing, reads no files and sends no messages.

What this is for

Sorting photos is exactly the kind of chore worth handing to a helper, and exactly the kind where guessing goes wrong. This prompt makes you answer eight short questions first — root folder, off-limits folders, current and target naming, destination folders, unmatched files, deletion, and how you want to undo — then turns them into a brief the helper must follow.

Missing inputs and privacy

If two of your answers contradict each other, the prompt asks which one wins rather than choosing for you. If you never state what happens to unmatched files, it defaults to "leave in place and list them" and labels that as a default you can change.

Treat folder paths as private. Only put into the chat what you are comfortable writing there, and keep the saved original-to-new path list somewhere you control.

Limitations

This produces a document, not an act. It does not give anyone live access to storage, connect to a service, or schedule sorting. Deletion defaults to NO. Any batch size, overwrite or cross-folder move needs your explicit approval before it happens.

FAQ

Can I reuse this with a different photo collection? Yes. Start a fresh chat, answer the eight questions again for the new root folder, and check the ten headings against your new answers.

The helper already moved files and something looks wrong — does this fix it? No. The brief includes an undo plan you follow yourself, typically a saved list of original-to-new paths plus manual move-back. Keep that list before any sorting begins.

Complete reusable prompt

You are helping me write a SAFETY BRIEF that I will hand to an image-sorting assistant (a person or an agent) before any file is moved, renamed or deleted. This brief is preparation only. Nothing in this prompt moves files, opens folders, browses my device or contacts anyone. I will perform or approve every action later.

What to collect from me first

If I have not provided the items below, pause and ask me for them one at a time. Do not guess folder names, file counts or rename rules.

  1. The single root folder I am willing to let the helper work inside (full path).
  2. Any subfolders that must stay untouched ("do not enter" list).
  3. How I currently name image files (one or two real-looking examples of the pattern).
  4. How I want them named after sorting (target pattern), including date order and separators I use.
  5. The destination subfolders I want images sorted into, with a short plain-language rule for each.
  6. What should happen to files that match nothing.
  7. Whether deletion is allowed at all. Default answer is NO.
  8. My preferred undo method: manual move-back, a saved list of original-to-new paths, or a copy-first approach where originals stay in place.

Task

Write the brief in this exact order, using my answers verbatim where I gave them and the label [NEEDS MY INPUT] where I did not:

  1. Scope statement — one sentence naming the root folder and stating that nothing outside it may be read, moved or renamed.
  2. Allowed folders — a numbered list. Mark each as read-only or read-and-sort.
  3. Off-limits folders — a numbered list, with the instruction that the helper must stop and ask if a task seems to require them.
  4. Rename pattern — show my current pattern, the target pattern, and one worked example built only from the patterns I supplied. Flag any character or ordering ambiguity I should resolve.
  5. Sorting rules — one line per destination folder: condition, example filename that would land there.
  6. Catch-all behavior — state clearly what happens to unmatched files.
  7. Deletion policy — restate YES or NO, and if NO, say that the helper must never delete or empty anything and should instead list candidates for me to review.
  8. Undo plan — a numbered recovery procedure a non-expert could follow, including where the original-to-new path list is stored and how to verify a restore worked.
  9. Stop-and-ask list — actions requiring my explicit approval first: crossing folders, overwriting, deleting, renaming files whose pattern does not match, and any batch over the limit I give.
  10. Dry-run request — ask the helper to first report what it WOULD do and make no changes until I approve.

Output format

Markdown with the ten numbered headings above. Keep it under one page. Put [NEEDS MY INPUT] inline, not in a separate section. End with a three-line "Before I approve" checklist I can tick off.

Uncertainty and missing input

If two of my answers conflict, say so plainly and ask which wins. Never invent a folder, a rename rule, a file count or a permission I did not give. If I did not specify unmatched-file behavior, default to "leave in place and list them" and label it as a default I can change.

Review checks before any file action

  • Every folder named is inside the root I approved.
  • No delete step appears unless I explicitly said deletion is allowed.
  • The rename example uses only characters and separators from my target pattern.
  • The undo plan can be followed without the helper being present.
  • The stop-and-ask list covers overwrite, delete, cross-folder and oversized-batch cases.

Boundaries

This brief prepares instructions only. It does not give the helper live access, does not connect to any storage service, and does not schedule or perform sorting. I remain the person who approves and, if I choose, executes each action.


Worked example (fictional, for shape only): Input: root = /home/me/Photos; off-limits = /home/me/Photos/Tax; current names like IMG_2043.jpg; target pattern like 2024-06-14_trip_001.jpg; destinations Trip, Family, Receipts, Unsorted; unmatched = leave in place and list; deletion = NO; undo = saved path list plus manual move-back. Output shape (abridged): "1. Scope: only /home/me/Photos... 3. Off-limits: Tax — stop and ask... 4. Rename: IMG_2043.jpg -> 2024-06-14_trip_001.jpg (date source [NEEDS MY INPUT])... 7. Deletion: NO — list candidates only... 10. Dry run: report planned moves first." Pass/fail checks for this example: PASS if the Tax folder appears in off-limits and every destination lies under /home/me/Photos; FAIL if any step deletes or if the rename example introduces a separator I never supplied.

References and reuse

Original TokRepo prompt · CC BY 4.0. Reference documents retain their own rights.

🙏

Source & Thanks

Original TokRepo prompt (CC BY 4.0), category: everyday agents. Reference context: ChatGPT release notes (reviewed 2026-10-04). The worked example in the prompt is fictional and shown for shape only. Source reviewed; runtime not tested — no command or tool was executed.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets