Explain this code to me at the depth I ask for
Paste the code and pick one paragraph or a full walkthrough. You get what it does, why it might be written that way and what to watch for.
Explain this code to someone competent but new to this codebase. ``` [PASTE CODE] ``` Depth: [ONE PARAGRAPH | FULL WALKTHROUGH] Cover, in this order: 1. What it does, in two sentences. 2. Why it might be written this way rather than the obvious alternative. 3. Anything that would surprise a reader — edge cases handled implicitly, assumptions about callers, side effects. Do not restate the code line by line. Assume [LANGUAGE] fluency. If part of it only makes sense with code you cannot see, name what you would need to read.
Highlighted parts are placeholders. Replace them before you send.
Worked example
The input is invented for this page. The output shows what the prompt asks for with that input.
Example input (invented)
Code
import time
from functools import wraps
def retry(times=3, delay=0.5):
def decorator(fn):
@wraps(fn)
def wrapper(*args, **kwargs):
for attempt in range(times):
try:
return fn(*args, **kwargs)
except ConnectionError:
if attempt == times - 1:
raise
time.sleep(delay * 2 ** attempt)
return wrapper
return decorator
Depth: One paragraph
Language: Python
Example output
retry builds a decorator that calls the wrapped function up to times times and returns the first result that arrives without a ConnectionError. Between failed attempts it sleeps, doubling the wait each time, and after the last failed attempt it re-raises the error. It is a decorator factory and not a loop at each call site, so the retry policy sits next to the function definition and every caller gets it without asking. @wraps keeps the function's name and docstring for logs and debuggers. Five things would surprise a reader. Only ConnectionError is retried, so a TimeoutError fails on the first attempt. The sleep blocks the calling thread. With the defaults, a call that keeps failing waits 0.5 s and then 1 s, 1.5 s in total, before it raises. The wrapper assumes the function is safe to run twice, and if a request reached the server before the connection dropped, the retry sends it again. With times=0 the loop never runs, so the wrapper returns None without calling the function. To say whether retrying is safe here I would need to read the functions this decorates.
More Coding prompts
3 of the 7 other prompts filed under Coding.
Find the bug from a stack trace
Works backwards from an error to a specific line and a specific cause.
Plan a refactor before touching anything
Turns a vague urge to clean something up into an ordered, revertible sequence.
Review a diff like a senior engineer
Looks for defects and consequences, not style opinions a linter already covers.
Coding tools and skills
3 of the 9 tools and 3 of the 7 skills filed under Coding, the same category as this prompt.
Aider
Pair programming with an LLM in the terminal, wired directly to git.
Claude Code
Anthropic's agentic coding tool for the terminal and IDE.
Cline
An open-source coding agent that runs inside VS Code with your own API key.
Accessibility reviewer
Reviews a component against WCAG failures that automated tools miss.
API endpoint reviewer
Checks a handler for the auth, validation and error gaps that recur.
Code reviewer
Reviews a diff for defects, and refuses to pad the list with style opinions.
Coding guides
3 of the 6 guides filed under Coding, the same category as this prompt.
Claude Code guide: setup, CLAUDE.md, permissions and skills
Install Claude Code, write a short CLAUDE.md, choose a permission mode, then add hooks, skills and MCP servers. Each step comes from Anthropic's docs and links to the page.
Claude Code alternatives: agentic coding tools compared
What Claude Code needs from you today, which agents replace it in the terminal, in an editor, on your own models or in the cloud, and which of them read your SKILL.md files.
GitHub Copilot alternatives: AI coding assistants compared
What Copilot Free covers today, which tools on this index replace it in your editor, in the terminal, on your own models or across a large codebase, and the catch of each.