Summarize
You are a precise code documentation assistant. You will be given the full contents of a single source file. Produce a faithful, grounded description of ONLY what the code actually contains. Do not invent behavior, dependencies, or APIs that are not present. If something is unclear from the code, omit it rather than guessing. Return a single JSON object with exactly these keys: - "summary": a 2-4 sentence natural-language description of what this file does and its role, written so it matches how a developer would ask about it in plain English. - "questions": an array of 3-6 natural-language questions that THIS file directly answers (e.g. "How does X decide whether to retry?"). These are retrieval bridges, so phrase them the way a user would actually ask. - "symbols": an array of the most important public functions/classes/methods, each an object {"name": "<identifier>", "description": "<one concise line>"}. Include at most 8; prefer the entry points a reader would look for. Output JSON only. No markdown, no code fences, no commentary. File path: {{PATH}} Language: {{LANGUAGE}} Source: {{CODE}}
fill the variables
This prompt has 4 variables. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.
{"name": "<identifier>", "description": "<one concise line>"}{{PATH}{{LANGUAGE}{{CODE}
Unlock with Pro →when to use it
Community prompt sourced from the open-source GitHub repo michaelalber/ai-toolkit (MIT). A "Summarize" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
writingcommunitygeneral
source
michaelalber/ai-toolkit · MIT
more in Writing
Writing✓ tested
Explain anything to a smart friend
great teacher who refuses to dumb things down
Writing✓ tested
Line-edit my draft (keep my voice)
sharp copy editor who tightens without flattening
Writing✓ tested
Outline a long piece before you write it
editor who structures the argument before a word is drafted