flaibo
Sign in
Code Explainer Script

Explain a Script Line by Line in Plain Language

Get a plain-language explanation of a script or macro: what it does, what it changes, the risks, questions for the author and whether to run it.

No card required

What this prompt does

A script nobody understands is a risk even when it works: it may overwrite files, send data somewhere or depend on a folder that no longer exists, and the only way to find out is to run it. Reading code is a skill, but understanding what a script does is a different one, and it can be learned from a good explanation. This prompt gives a summary, a block-by-block account in plain words, a table of what the script reads, creates, changes, deletes and sends, the assumptions it makes, the ways it could fail and whether it is safe to run. It also drafts questions for the author. If the pasted code contains something that looks like a secret, you are told to remove and change it before anything else.

The prompt

You are helping me understand a script or macro that I have inherited or been given. I am not a programmer. Explain it so that I can decide whether to run it, change it or keep it, and so that I could explain it to a colleague.

The code: [PASTE IT, AFTER REMOVING ALL PASSWORDS, API KEYS, TOKENS, PERSONAL DATA, CUSTOMER DATA AND INTERNAL ADDRESSES; REPLACE THEM WITH [REDACTED]]
Where it came from: [WHO WROTE IT, WHEN, IF KNOWN]
What I think it does: [MY GUESS]
What I want to do with it: [RUN IT, CHANGE ONE THING, HAND IT TO SOMEONE]
My background: [WHAT I KNOW ABOUT CODE, IF ANYTHING]

Produce: 1. A two-sentence summary of what it does. 2. A section-by-section explanation: for each block, what it does in plain words and why, with any technical terms explained when first used. 3. What it reads, what it creates, what it changes or deletes, and what it sends elsewhere, as a table: item, action, where. 4. Assumptions it makes: files that must exist, settings, formats, access. 5. What could go wrong: failure points and what would happen. 6. Is it safe to run? Name anything that deletes, overwrites or sends data, and what to back up first. 7. Questions to ask the author. 8. If I want to change [THING I WANT TO CHANGE], where in the code that would be and what to be careful about.

Rules: if the code contains what looks like a secret, tell me first to remove it and rotate it; do not guess about parts you cannot see; label uncertain statements LIKELY; do not rewrite the code unless I ask.

Before answering, check that every section of the code I pasted is covered by the explanation.

How to use it

Before pasting, remove passwords, keys, tokens, personal data, customer data and internal addresses, and replace them with [REDACTED]. Never run a script you do not understand on real files; test it on a copy first. Use the table of changes to decide what to back up.

See it in action

Filled-in prompt

The code: folder = 'reports' files = list_files(folder) for f in files: if f.age_days > 90: delete(f) send_summary(to=[REDACTED], count=len(files)) Where it came from: A former colleague, last year. What I think it does: Cleans up the reports folder. What I want to do with it: Run it monthly. My background: None.

Expected output

1. Summary: It deletes files in the 'reports' folder older than 90 days and then sends a summary to a recipient. 2. Sections Block 1: sets the folder to 'reports'. Block 2: lists every file in it. Block 3: for each file older than 90 days, deletes it. 'Age' is the number of days since the file was last changed (LIKELY). Block 4: sends a message with a count. 3. Table Files in reports | read | reports folder Old files | deleted | reports folder Summary | sent | the redacted recipient 6. Safe to run? Not yet. It deletes files permanently, and the count it sends is of all files, not just deleted ones (LIKELY a mistake). Back up the folder and test on a copy. 7. Questions for the author: Is there a recycle step? Who receives the summary? Does 'age' mean created or modified?

Inherited scripts run on trust because nobody can read them.

The explanation covers each section in plain words, with terms defined.

A script deletes or sends something unexpectedly.

A table lists what it reads, creates, changes, deletes and sends.

Secrets are pasted into the prompt by habit.

The prompt asks you to redact first and flags anything that looks like a secret.

Frequently asked questions

Is it safe to paste my code?

Only after removing passwords, keys, tokens, personal data, customer data and internal addresses. Replace them with [REDACTED]. Never paste credentials.

Does the explanation prove the script is safe?

No. It is a reading aid. Test on a copy, back up first, and ask the author or a technical colleague when it matters.

Can I use it for a spreadsheet macro?

Yes. Paste the macro text, redacted, and say what it is.

Ready to use Explain a Script Line by Line in Plain Language?

Keep this explainer prompt in your Flaibo Vault, unlimited on the free plan, and understand a script before it touches your files.

Get started free

Your context everywhere