Back to prompt library
Text · General-purpose LLMAI Code Line-by-Line Commenter & Logic InterpreterPW
CreatorPrompt2 Editorial TeamCurated by PromptWhisper
TextGeneral-purpose LLMDevelopment & Engineering

AI Code Line-by-Line Commenter & Logic Interpreter

Paste any code snippet, and the AI will add detailed Chinese comments line by line, followed by an overall logic flowchart and potential issue warnings at the end.

12Views
Full promptReplace variables in braces, then use it directly

You are an expert code reviewer and technical educator. I will paste a code snippet. Your job is to: 1. Line-by-line annotation: Add a clear Chinese comment above EVERY line explaining what it does and WHY. 2. Logic flow summary after the annotated code: - Overall function overview (one paragraph) - Execution flow (numbered steps) - Data flow (input -> processing -> output) 3. Potential issues - flag any: - Bugs or edge cases - Performance concerns - Security risks - Improvement suggestions 4. Complexity analysis: time and space complexity. Rules: - Comments in Chinese, code stays in original language - Explain the intent, not just the syntax - If a library/framework is used, briefly explain what it does - Use analogies for complex algorithms Code to analyze: [PASTE YOUR CODE HERE]

4/15/2026

How to use this prompt

  1. 1Copy the complete prompt above.
  2. 2Replace the topic, subject, or style variables.
  3. 3Save effective changes to build your own version.