explain-code
Explains code with visual diagrams and analogies. Use when explaining how code works, teaching about a codebase, or when the user asks "how does this work?"
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Explains code with visual diagrams and analogies. Use when explaining how code works, teaching about a codebase, or when the user asks "how does this work?"
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Generate commit messages for staged git changes. Use when the user asks to generate a commit message or wants help writing commit messages.
Debug errors using logs and stack traces. Use when the user shares an error message, crash log, or runtime issue to fix.
Explain errors without editing files. Use when the user wants to understand an error or crash but not immediately fix it.
Analyze code for logical errors, runtime bugs, and edge cases. Use when the user wants a code review, asks to find bugs, or wants to check code correctness.
Image manipulation via a bundled script, resizing, rotation, flipping, cropping, padding, format conversion (JPEG/PNG/WebP/TIFF/HEIC), transparency operations (remove/replace/extract/blend), grayscale conversion, auto-cropping borders, and file size optimization.
Convert documents to Markdown. PDFs go through the LlamaParse API (best quality, costs credits, tier selectable) or a local PyMuPDF engine (free, offline, no API key); other formats (DOCX, PPTX, XLSX, HTML, EPUB) are converted locally with markitdown.
基于 SOC 职业分类
| name | explain-code |
| description | Explains code with visual diagrams and analogies. Use when explaining how code works, teaching about a codebase, or when the user asks "how does this work?" |
When explaining code, produce these four parts in this exact order:
Analogy first: One everyday-life comparison for what the code does overall. One or two sentences. Pick the analogy for the mechanism, not the domain (a queue worker is a restaurant kitchen ticket rail, regardless of what app it lives in).
Diagram: Show the flow, structure, or relationships. Use a mermaid code block if the output will be rendered as markdown; otherwise use simple ASCII boxes and arrows. Keep it to the 3-7 most important nodes, a diagram with everything explains nothing.
Step-by-step walkthrough: Number the steps in execution order. For each step: what happens, and which function/line does it. Quote identifiers exactly as they appear in the code.
One gotcha: The most likely mistake or misconception someone would have about this code (an easy-to-miss side effect, a surprising default, an ordering constraint).
Length rules: total answer under 60 lines; walkthrough at most 8 steps; if the code is too large for 8 steps, explain the top-level flow and offer to zoom into a part the user picks.
Guardrails: never paraphrase identifiers (use exact names); never explain line-by-line, group by meaningful step; if you are not sure what a piece does, say so rather than guessing; keep the tone conversational, not lecture-like.