Created
January 10, 2026 07:32
-
-
Save winklerj/2bad0a559428a1e3901c542531e4df48 to your computer and use it in GitHub Desktop.
OpenProse file to rename desktop screenshots on your desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| session "Screenshot Renamer" | |
| # Finds macOS screenshot files on the desktop, analyzes their content, | |
| # renames them with descriptive names, and updates metadata. | |
| # Step 1: Find all screenshot files on the desktop | |
| let screenshots = session "Find screenshots" | |
| prompt: """ | |
| Use the Glob tool to find all macOS screenshot files on the desktop at ~/Desktop. | |
| macOS screenshots follow this naming pattern: | |
| - "Screenshot YYYY-MM-DD at HH.MM.SS.png" (e.g., "Screenshot 2026-01-10 at 14.32.45.png") | |
| Use the pattern: Screenshot*.png | |
| Return a list of the full file paths found, one per line. | |
| If no screenshots are found, say "NO_SCREENSHOTS_FOUND". | |
| """ | |
| # Step 2: Process each screenshot in parallel (up to 50 at a time) | |
| if **screenshots were found**: | |
| parallel for screenshot_path in screenshots (batch: 50): | |
| # Each screenshot is processed independently in parallel | |
| # Analyze, generate filename, and rename in one session per image | |
| session "Process screenshot" | |
| prompt: """ | |
| Process this screenshot by analyzing it, generating a descriptive filename, and renaming it. | |
| Screenshot path: {screenshot_path} | |
| Step 1 - Analyze the image: | |
| Use the Read tool to view the image. Describe: | |
| - The main subject/content of the image | |
| - Any key text, UI elements, or identifiable applications | |
| - The overall context or purpose | |
| Step 2 - Generate a new filename: | |
| Based on your analysis, create a descriptive filename. | |
| Extract the date from the original filename (e.g., "Screenshot 2023-04-18 at 11.01.33 PM.png" -> 2023-04-18). | |
| Rules: | |
| - Use lowercase with hyphens between words | |
| - Format: descriptive-name-YYYY-MM-DD.png | |
| - Keep the descriptive part under 40 characters | |
| - Make it descriptive but concise | |
| - Avoid special characters except hyphens | |
| Step 3 - Rename and update metadata: | |
| 1. Use Bash to rename the file with 'mv' command to ~/Desktop/<new_filename> | |
| 2. Use Bash with 'xattr -w com.apple.metadata:original_name "<original_filename>"' to store the original name | |
| Report the original filename and the new filename. | |
| """ | |
| context: screenshot_path | |
| else: | |
| session "Report no screenshots" | |
| prompt: "Inform the user that no screenshot files were found on the desktop." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment