review-code
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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | review-code |
| description | 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. |
Analyze the provided code for logical errors, runtime bugs, and edge cases. Follow every rule:
Input validation: If no code files are selected or provided, STOP and ask the user to reference the specific files to review. Do not review imagined code.
Passive mode: Do NOT edit files. Produce a structured report in chat only.
Focus, correctness over style. Do not comment on formatting or naming unless it causes a bug. Look specifically for:
None/null values, zero/negative numbers, unicode, concurrent access.await, misuse of Pandas/NumPy/torch idioms (chained indexing, dtype surprises, device mismatches).Rank findings by severity and number them. Reference every finding as file:line. Quote the offending line.
Output template (use these exact sections, omit an empty section):
## Critical issues (will crash or produce wrong output)
1. <file:line> - <one-sentence defect>
Failing scenario: <concrete input/state that triggers it>
## Edge case gaps (unhandled scenarios)
1. <file:line> - <scenario the code misses>
## Suggested fixes
1. <numbered to match the finding> <minimal corrected snippet>
Guardrails: every critical finding MUST include a concrete failing scenario, if you cannot construct one, downgrade it to an edge-case gap or drop it; at most 10 findings, most severe first; if the code is clean, say so in one sentence rather than inventing nitpicks.
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.
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?"
Explain errors without editing files. Use when the user wants to understand an error or crash but not immediately fix it.
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.