Prompt library · AI · 14 prompts
Prompts from the guide
Small scripts without coding: AI writes them for you
14 prompts from this guide. Fill in whatever sits in [square brackets] — your own context, the document text or the name of your tool. That context is exactly what separates a generic answer from a usable one.
When a script makes sense, and when it doesn't
I'll describe a task, and I want your advice on whether a script is even the right fit for it. Task: [description, e.g. every month I download an order export in CSV from my online store, manually delete cancellations, total up revenue by region, and copy the result into a spreadsheet] How often I do this: [once a month] How many items: [roughly 2000 rows] What I use: [Windows 11, Excel, Google Drive] Programming experience: none Answer in three blocks: 1. Can something I already have handle this? (an Excel feature, a built-in system tool, an app feature) — if so, describe the steps and we're done. 2. If not, why a script is worth it and roughly how much work it'll be. 3. What's risky about this task — where a badly written script could irreversibly damage the data. Don't recommend a script by default. If there's a simpler path, name it.
Bulk renaming files
I have a folder with [500] PDF files. I need to bulk-rename them. Here are 15 real current filenames: [paste the list of names, feel free to copy them straight from your file manager] Target filename format: [YYYY-MM-DD_supplier_invoicenumber.pdf] The date is [inside the file / in the filename / in the file's creation date]. Write me a script in Python that: 1. only goes through .pdf files in the given folder, doesn't touch subfolders, 2. pulls the needed values out of each filename per the rules above, 3. FIRST prints a table of “original name → new name” and changes nothing, 4. only renames the files after I confirm with a keypress, 5. doesn't silently skip files where it can't find the data — it lists them at the end under “not processed, I'll handle manually”, 6. if a new name would collide with an existing file, doesn't overwrite it — adds a sequence number and reports it. Put a single variable with the folder path at the top of the script, and add a comment saying where I should type the path in. Add a comment in English to each block.
Merging many CSVs or Excel files into one
I have [12] CSV files in a folder — monthly exports from [system], one per branch. I need them merged into a single file. Header and first two rows of one of them (delimiter [semicolon], encoding [UTF-8], decimal [comma]): [paste 3 rows] Write me a script in Python (pandas) that: 1. loads all the .csv files from the folder, 2. checks that they all have the same columns — if they differ, PRINTS the difference and stops, doesn't force-merge them, 3. adds a “source” column with the filename each row came from, 4. merges them into a single file, all.csv, 5. at the end prints a checksum: how many rows each CSV had and how many the result has, so I can see nothing was lost, 6. doesn't delete duplicates — just prints how many fully identical rows it found. The script must not overwrite any of the input files.
Sorting photos by the date they were taken
I have a folder with [several thousand] photos from my phone and camera (JPG, HEIC, a few MP4s). I want to sort them into folders by the date they were taken, in the format [YYYY/YYYY-MM]. Write me a script in Python that: 1. reads the capture date from each file's metadata (EXIF), 2. when EXIF is missing (typically for downloaded images and videos), falls back to the file's modification date, but lists those files separately so I know where the date is only a guess, 3. COPIES files into the target structure, leaves the originals alone, 4. never overwrites on a name collision — adds a sequence number, 5. at the end prints stats: how many files, how many into which folder, how many without EXIF, how many skipped and why. First write me a version that only prints the sorting plan and copies nothing. Once I approve the plan, add a version that actually copies the files.
Batch format conversion
I need to bulk-convert files: from [format A] to [format B]. Input: a folder with [count] files. System: [Windows 11 / macOS]. I don't want to install anything heavy, ideally just a Python library. Write a script that: 1. goes through the input folder and finds files with extension [extension], 2. converts each one to [target format] with these settings [max width 2000 px, quality 85, keep aspect ratio], 3. saves results into a converted/ subfolder, leaves the inputs alone, 4. skips a file that's already been converted (the output already exists) and says why, 5. for a file that fails to convert, prints the name and reason and moves on — a single failure must not stop the whole run, 6. at the end summarizes: converted X, skipped Y, failed Z. Also tell me exactly what I need to install and with which command.
Extracting attachments and data from a pile of files
I have a folder with [80] PDF invoices from various suppliers. I need a table from them: file, supplier, tax ID, invoice number, issue date, due date, amount excluding VAT, amount including VAT. Write me a script in Python that: 1. reads the text layer from each PDF, 2. tries to find the listed values using patterns (e.g. the tax ID is eight digits after “Tax ID” or “VAT ID”; the amount is next to the word “Total”), 3. writes the results into a table, results.csv, 4. leaves a value blank when it can't find it, and does NOT estimate anything, 5. adds a “confidence” column: complete record / incomplete / unreadable PDF, 6. at the end lists the files that are probably just a scanned image with no text layer, which will need to be read a different way. Write the pattern rules into comments in English, so I can adjust them once I run into a supplier with a different invoice layout.
Phase 3: how to describe a task so the script works the first time
I want you to write a script for this task: [paste your request] Don't write it yet. First ask me about everything you're missing to write it correctly the first time — especially the structure of the input data, what should happen in unusual cases, and what must never happen under any circumstances. Ask one question at a time, eight questions at most, so I can realistically answer them. Once you have a clear picture, summarize the requirements as bullet points and have me confirm them. Only then write the code.
Sensitive data doesn't belong in the request
Here's a sample of my data, which contains real values: [paste 3 rows] Don't write any script yet. Instead, create me a made-up sample of 10 rows with the SAME structure: the same column names and order, the same value format (number of digits, date shape, delimiters), but completely invented content — names, addresses, numbers, and identifiers. I don't want any value from the original sample except the header.
A prompt for a plain-language explanation
Explain this script to me as if I'd never seen a line of code. For each block, write: - what happens in it, in plain language, in one or two sentences, - why that step is needed, - what happens if it runs into something unexpected in the data. Then answer these questions separately: 1. Which files or folders does the script READ? 2. Which files does it CREATE, OVERWRITE, or DELETE? List them by name. 3. Does it send anything over the internet? Where, and what? 4. What happens if I run it twice in a row? 5. What's the worst thing that could happen if there's a bug in it? Finally, write in one sentence what the script does — in a way I could repeat to a coworker. [paste the script here]
Preview mode: a script that talks before it acts
Modify this script so it has a PREVIEW = True/False switch at the top. When PREVIEW = True: - the script makes no changes on disk, - instead it prints a clear table of everything it would do: action, original path, target path, - at the end it summarizes: would rename X, skip Y, Z collisions, - for the first 20 items it also prints the reason for that particular decision. When PREVIEW = False, it performs the changes for real, but first asks “Really perform X changes? Type YES” and stops if the answer isn't YES. Keep the switch right at the top, with a comment saying the default value shouldn't be changed until the person has reviewed the preview. [paste the script here]
An error message is information, not failure
The script you wrote me crashed. Here's the situation: What I did: [ran it with command X in folder Y] What I expected: [it to print the renaming plan] What happened: [it printed 12 lines and then this] Full error message: [paste the entire output verbatim, including every line] Context: system [Windows 11], the folder has [500] items, the script ran for [about 3 seconds] and managed to [nothing / rename 12 files]. Write me: 1. what that message means in plain language, 2. whether the script managed to change anything and whether anything is left in a broken state, 3. a fixed version of the whole script (not just the one line, the whole file), 4. what I should have done differently so this doesn't happen next time.
Phase 7: Claude Code — when the script just runs
Work inside this project's folder. The invoices/ folder has [500] PDFs with inconsistent names. I want to rename them to the format [YYYY-MM-DD_supplier_number.pdf]. Follow these steps and wait for my approval after each one: 1. Go through the first 20 files and tell me what naming patterns you see, and where the date and supplier can be reliably pulled from. 2. Propose conversion rules and show them to me on those 20 examples as “original → new”. 3. Create a copy of the folder as invoices-backup/ and verify that every file was copied (compare the counts). 4. Run the rename on just the first 20 files and show me the result. 5. Only after my approval, process the rest. Don't delete anything. Leave files you're not sure about unchanged and list them for me at the end as a to-do for manual handling.
Setting up a library
Here's a script I've fine-tuned and that works for me. Write me documentation for it in a README.md file — one I'll understand three months from now, when I won't remember anything about it. Contents: 1. In one sentence: what the script does. 2. When to use it, and when not to. 3. What needs to be ready before I run it (data format, installation). 4. Exactly what I need to change in the script — list every variable that needs editing and what belongs in it. 5. How to run it, the literal command. 6. How I'll know it went well. 7. Known limitations: what it can't do, what it crashes on, what I've had to handle manually. 8. The date, and in one sentence, what I originally wrote it for. Write it for someone with no programming background, plainly and briefly. [paste the script here]
Recycling: turning a finished script into a new one
Here's a script that works for me for [renaming invoices by the date in the filename]: [paste the script] I now need almost the same thing, but for a different task: [delivery notes, where the date is inside the PDF, not in the filename, and the target format is different: [description]]. Adjust it so that: - the structure and every safeguard already in it stay intact (preview mode, overwrite protection, the list of unprocessed files), - only the parts needed for the new task change, - comments mark what you changed compared to the original version. At the end, give me a bullet list of the changes, so I know what to double-check.