ApprovedEngineeringautomationscripting
Safe automation script for a repetitive task
PL by Prompier Library
☆☆☆☆☆ New
Version 1 · updated Nov 10, 2026
Reviewed by moderator Prompier Library on Nov 10, 2026. Checked for personal data, secrets, risky instructions and a clear license.
About this prompt
Writes a robust script that automates a repetitive file, data or web task, with error handling, a dry-run mode and a plain-language explanation. Use when you want a script you can trust and run yourself.
Prompt text
You are a careful developer who writes automation scripts that are safe to run and easy to maintain. Goal: a working script for the task below, in the language I name.
Inputs:
- Task to automate, described step by step: {{task_description}}
- Language and runtime version: {{language_and_runtime}}
- Input files, folders or data sources, with a sample: {{inputs}}
- Expected result: {{expected_result}}
- Safety limits (what must never be deleted, overwritten or sent): {{safety_limits}}
Steps:
1. Restate the task and list assumptions about the files, formats and permissions. Ask at most 3 questions only if a missing detail could cause data loss.
2. Design before coding: list the steps, the failure points (missing file, bad format, network error, rate limits) and how each will be handled.
3. Write the script with clear names, comments only where the reason is not obvious, settings at the top, and no secrets in the code (read them from environment variables).
4. Include a dry-run mode that prints what would happen without changing anything, make it the default, and log every action with a summary at the end.
5. Never delete or overwrite without a backup or explicit flag. Respect the terms of any site or service the script talks to and keep request rates modest.
6. Walk through a test using my sample input and show the expected output.
Output format:
- Plan (short list)
- The complete script in one code block
- How to run it, including a dry run and a real run
- What the script does not handle
Quality bar: simple and readable over clever; no unneeded dependencies; tell me which parts you could not test.
Variables
5 variables| Variable | What to enter | Example | Default |
|---|---|---|---|
| {{task_description}} | The task to automate, step by step | Every Monday, open each sales report, copy the totals into one summary sheet | — |
| {{language_and_runtime}} | Language and runtime version | Python 3.12 | — |
| {{inputs}} | Input files, folders or data sources, with a sample | Folder reports/ with files like sales_north.xlsx; column B holds totals | — |
| {{expected_result}} | What the finished result should look like | summary.xlsx with one row per region and its total | — |
| {{safety_limits}} | What must never be deleted, overwritten or sent | Never change the original report files | — |
Try it
Live previewThe task to automate, step by step
Language and runtime version
Input files, folders or data sources, with a sample
What the finished result should look like
What must never be deleted, overwritten or sent
Your finished prompt
You are a careful developer who writes automation scripts that are safe to run and easy to maintain. Goal: a working script for the task below, in the language I name.
Inputs:
- Task to automate, described step by step: {{task_description}}
- Language and runtime version: {{language_and_runtime}}
- Input files, folders or data sources, with a sample: {{inputs}}
- Expected result: {{expected_result}}
- Safety limits (what must never be deleted, overwritten or sent): {{safety_limits}}
Steps:
1. Restate the task and list assumptions about the files, formats and permissions. Ask at most 3 questions only if a missing detail could cause data loss.
2. Design before coding: list the steps, the failure points (missing file, bad format, network error, rate limits) and how each will be handled.
3. Write the script with clear names, comments only where the reason is not obvious, settings at the top, and no secrets in the code (read them from environment variables).
4. Include a dry-run mode that prints what would happen without changing anything, make it the default, and log every action with a summary at the end.
5. Never delete or overwrite without a backup or explicit flag. Respect the terms of any site or service the script talks to and keep request rates modest.
6. Walk through a test using my sample input and show the expected output.
Output format:
- Plan (short list)
- The complete script in one code block
- How to run it, including a dry run and a real run
- What the script does not handle
Quality bar: simple and readable over clever; no unneeded dependencies; tell me which parts you could not test.
Sample output
Plan: scan the downloads folder, group files by extension, move them into subfolders, skip files modified in the last hour, log each move.
Script: (complete code block with settings at top, dry-run enabled by default, a log line per file, and a final count)
How to run:
1. Preview: run the script with no flags; it only prints planned moves.
2. Real run: add the --apply flag.
Not handled: files in use by another program (they are skipped and logged); duplicate names (a number is added to the new name).
Untested: behaviour on network drives.
An example the author shared. Your result will differ.
Reviews
No written reviews yet. If you have used this prompt, tell others how it went.
0 forks
Public forks of “Safe automation script for a repetitive task” by Prompier Library (v1).
Lineage: Original prompt → this prompt → 0 forks
No forks have been shared publicly yet.