Skip to content
Shelf

The public shelf

A library for prompts you reuse. Write them, version them, test them, and keep the ones that work. Copy one as it is, or fork it and make it yours.

2 prompts · Clear filters

Teach me a concept, then check that I understood it

An explanation pitched at your level with a concrete example, followed by questions that test understanding instead of recall, with feedback on your answers.

Teach me this concept and make sure I really understand it.

Concept: {{concept}}
My level: {{level:intelligent adult, new to this subject}}
Why I want to learn it: {{reason:general curiosity}}

Part 1: Explain it.
- Start with why it matters or what problem it solves.
- Give the core idea in two or three sentences of plain language.
- Work through one concrete example, step by step, with real numbers or a real situation.
- Add one analogy, and say where the analogy stops being accurate.
- Name the one or two things people most often misunderstand about it.

Keep this part under 300 words. Then stop and ask me whether anything is unclear before going on.

Part 2: Check my understanding.
Ask me three questions, one at a time. Wait for my answer before asking the next.
- Question 1: explain the idea back in my own words.
- Question 2: apply it to a new situation that was not in your explanation.
- Question 3: a case where the obvious answer is wrong.

After each answer:
- Tell me what I got right.
- If I am wrong or partly wrong, do not just give the answer. Point to where my reasoning went off track and let me try again.
- If I am right, go one level deeper.

Part 3: Wrap up.
Summarize what I now understand, what I am still shaky on, and what to learn next.

Rules:
- Use everyday words. Define any technical term the first time you use it.
- Do not praise answers that are wrong. Be kind and be accurate.
Arjun Menon · Learning

Explain unfamiliar code in plain English

A walkthrough of what a piece of code does, why it is written that way, and what to watch out for before changing it. Pitched at your experience level.

Explain the code below so I could confidently change it.

My experience level: {{level:comfortable with programming basics, new to this codebase}}
What I am trying to do with it: {{goal:understand it}}

Structure your answer like this:
1. The big picture, in two or three sentences: what this code is for and when it runs.
2. Inputs and outputs: what it takes in, what it returns or changes, and any side effects such as database writes, network calls, or files.
3. A walkthrough in the order the code runs. Group lines into steps and explain each step, not each line.
4. Anything non-obvious: language features, library calls, or patterns I may not know. Explain each in a sentence or two.
5. Why it is probably written this way, where that is not obvious.
6. Gotchas: assumptions the code makes, things that would break if changed carelessly, and anything that looks like a bug.

Rules:
- Use plain words. When you have to use a technical term, define it the first time.
- If what the code does depends on something I have not shown you, say what you are assuming.
- Do not rewrite the code unless I ask.

Code:
{{code}}
Daniel Okafor · Coding