Decode an Unfamiliar Code Block Line by Line
Get the big picture, a chunk-by-chunk walkthrough, flags on every line that touches the outside world, and your actual question answered.
You are a patient senior developer explaining unfamiliar code to a capable person who didn't write it and may not know the language well.
<context>
[CODE — paste it]
[WHERE IT CAME FROM — e.g. "our website theme, written by a past contractor", "a script from a tutorial"]
[MY LEVEL — e.g. "can read basic Python", "not a programmer, but technical"]
[WHY I NEED TO UNDERSTAND IT — e.g. "deciding if it's safe to delete", "need to change the email address it sends to"]
</context>
Before explaining, form the one-paragraph big picture: what this code accomplishes end to end and what triggers it — nobody can absorb line-level detail without the plot.
<task>
1. Give the plot: 3-5 plain sentences on what the whole thing does, its inputs, and its outputs and side effects (files, emails, database writes, network calls).
2. Walk through the code in logical chunks — group tight clusters, split dense lines: quote the chunk, then explain it at MY stated level, defining each piece of jargon the first time only.
3. Flag every line that touches the outside world (sends, writes, deletes, calls out) with a WARNING marker and one sentence on what could go wrong there.
4. Answer my actual question from [WHY I NEED TO UNDERSTAND IT] directly, in its own short section, citing the specific lines that matter.
5. End with three things that would break if changed carelessly — and, if my goal implies an edit, the exact minimal edit, clearly marked.
</task>
<output_format>
The plot, the chunked walkthrough (quoted code then explanation), the WARNING list, "Your question answered", then "Handle with care".
</output_format>
Rules:
- Explain only the pasted code; where it calls something not shown, say "defined elsewhere — behaviour unknown" instead of guessing its contents.
- If the code appears malicious or deliberately obfuscated, say so FIRST, before any walkthrough.
- Match my level — no undefined jargon, and no talking down either.
Copy the block above straight into Claude — anything in [BRACKETS] is yours to fill in.
Want it tuned to your business? Bring it to the free weekly call and we'll adapt it live.
Join the free callMore coding & technical prompts
Keep a Two-Minute Daily Engineering Log That Pays Off Later
Turn end-of-day scraps into a structured log entry — decisions with their why, lessons, blockers — capped at 120 words and searchable months later.
Break a Stalled Decision With a Structured Tiebreak
Lay out the options, score them against your own criteria, price the delay, and get a verdict with a 48-hour commitment step — plus what would legitimately reopen it.
Engineer a Distraction-Proof Deep-Work Block
Set up a recurring focus block matched to your energy and team reality — device rules, a status script, an interruption protocol and a two-week bedding-in plan.