Prompt libraryLearning Hub

Prompts that get you a better answer

Ready-made prompts for emails, meetings, spreadsheets, planning and more, at your level. Copy one, fill in the [square brackets] with your details, and paste it into ChatGPT, Claude, Gemini or any AI assistant. 32 are free; the other 64 come with Pro.

96 prompts32 free to copy12 kinds of job

2 free prompts in Coding and automation at intermediate level

Coding and automation

Explain, fix, test and automate. Mostly for confident users.

  • IntermediateFree

    Explain a piece of code

    Walks through code step by step: what it does and what could go wrong.

    The prompt

    Explain this [language] code to me. I’m [your experience, such as a beginner who knows the basics]. It’s from [where it comes from, such as a script at work or a tutorial]. Tell me: what it does overall, in two sentences; what each part does, step by step; anything risky or likely to break, such as missing error handling or a password written into the code; and the first improvement you’d make. Keep it plain and patient, and don’t rewrite the whole thing. If you’d need to see more of the code to be sure, say so. The code: [paste the code, with any passwords, keys or private data removed]

    Tips and an example: Explain a piece of code

    Tips for a better answer

    • Never paste passwords, API keys or customer data. Swap them for placeholders such as API_KEY.
    • Only run code once you understand what it does, and try it on a copy of your data first.

    An example, filled in

    Explain this Python code to me. I’m someone who can read a little Python. It’s from a script a former colleague left on our shared drive. Tell me: what it does overall, in two sentences; what each part does, step by step; anything risky or likely to break, such as missing error handling or a password written into the code; and the first improvement you’d make. Keep it plain and patient, and don’t rewrite the whole thing. If you’d need to see more of the code to be sure, say so. The code: import csv with open('orders.csv') as f: rows = list(csv.DictReader(f)) total = sum(float(r.get('amount', 0)) for r in rows if r.get('status') == 'paid') print(total)

  • IntermediateFree

    Fix an error message

    Explains what an error means, and the most likely fixes in order.

    The prompt

    I’m getting this error: [paste the whole error message, with any passwords or private details removed]. It happens when I [what you were doing]. My setup: [the language, tool or app, with versions if you know them]. What I’ve already tried: [anything you’ve tried]. Explain what the error means in plain English, the three most likely causes in order of probability, and how to check each one. Give me the smallest fix first, as exact steps. If you need more information to be sure, tell me exactly what to look at or paste next, rather than guessing.

    Tips and an example: Fix an error message

    Tips for a better answer

    • Paste the whole error, including the lines above it: the useful clue is often there.

    An example, filled in

    I’m getting this error: ModuleNotFoundError: No module named 'pandas'. It happens when I run my script from the terminal with python report.py. My setup: Python 3.12 on a Mac. What I’ve already tried: I installed pandas with pip install pandas, and it said it worked. Explain what the error means in plain English, the three most likely causes in order of probability, and how to check each one. Give me the smallest fix first, as exact steps. If you need more information to be sure, tell me exactly what to look at or paste next, rather than guessing.

The prompts are AI-assisted, like everything we publish, and written to our house style. Spotted a problem with one? Tell us and an editor will check it.