
- Updated
Python script to automate a task
This prompt writes a Python script for a task you describe. You give the input, the output you want and your skill level, and it produces a script you can run. Read it before running it on important files.
Write a Python script to automate this task. Task: [e.g. rename files by date, merge CSVs, send daily email] Input: [FILE TYPE / LOCATION] Output: [WHAT I WANT] My skill level: [BEGINNER] OS: [WINDOWS / MAC] Keep the code simple and commented. Explain how to install what is needed, how to run it, and add a dry-run mode so it does not change anything on the first try.
Test on copies of your files first.
Get a better result
A simple, commented Python script for your task, with install steps, how to run it and a dry-run mode that shows what it would do without changing any files on the first try.
The script changes files straight away.
Fix: Keep the dry-run requirement, run it first and read the printout. Work on copies, as the tip says.
- It needs libraries you do not have. State your operating system and skill level, and ask for steps using only the standard library where possible.
- An error appears and you are stuck. Paste the whole error message, plus the line it points to, and ask for the cause and a fix.
Ask how to schedule the script to run every morning on your system, with the exact steps for Windows or Mac and how to stop it.
Add a dry-run flag that only prints what it would do, and a log file listing every action taken when it runs for real.
Guides that use this prompt
More chat & writing prompts
See all 465 →More like this
- Write a CLAUDE.md file for your projectClaude Code · Cursor
- Build a small command-line toolClaude · ChatGPT · Gemini
- Storytime video scriptChatGPT · Gemini · Claude
- Carousel post scriptChatGPT · Gemini · Claude
- Fix a flaky test that passes and fails at randomClaude · ChatGPT · Gemini



