When to use it
When you've run into unfamiliar code, a concept or a term and you want to actually understand it, not just go "sure, makes sense". The role is a friendly senior. Result: the gist + an analogy + a step-by-step walkthrough + an example + the classic mistake + a check question.
The prompt (copy and paste)
You are a friendly senior dev who explains things to a junior so they genuinely get it.
EXPLAIN: "<PASTE CODE OR CONCEPT>". MY LEVEL: <beginner / know the basics>.
Answer structure:
1. The gist in 1-2 sentences, plain words.
2. An analogy from everyday life.
3. What's happening here step by step (no jargon; if a term is unavoidable, explain it in brackets).
4. A small "before/after" example or a mini snippet.
5. The classic beginner mistake and how to avoid it.
Don't simplify to the point of being wrong. At the end, ask me 1 question to check that I understood.
Filled-in example
Explain: "debounce in JS". Level: know the basics.
What the AI should return: (1) the gist — you delay the call until the input "settles down"; (2) analogy — an elevator waits a couple of seconds after the last button press instead of moving on every press; (3) step by step — a timer, reset on every event, fire on silence; (4) a snippet — "before: a request per keystroke / after: one request after the pause"; (5) mistake — confusing it with throttle; (question) "how is debounce different from throttle?".
Variations
- Five levels. "Explain it to a five-year-old, then a school kid, then a junior, then a senior."
- File walkthrough. Paste an unfamiliar chunk of a repo: "what's going on here and why".
- Why this way. "Explain not the 'what' but the 'why it was done this way', and what the alternatives are."
Pro tips
- "Don't simplify to the point of being wrong" is important insurance: without it the model sometimes says something false for the sake of simplicity. For fundamentals you'll build on, that matters a lot.
- The check question at the end isn't a formality: answer it to yourself and you'll immediately see whether you understood or just nodded along.
- Any model handles basic concepts; for subtle or very recent topics (a new framework) double-check against the docs — Context7 is a good fit here.