一键导入
code-review
Review code for correctness, style, and potential bugs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review code for correctness, style, and potential bugs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | code-review |
| description | Review code for correctness, style, and potential bugs |
Follow these steps when reviewing code:
Read the whole file first before commenting. Understand the purpose and context before judging individual lines.
Check for null / undefined access — look for .property on values that could be null/undefined. In TypeScript, check that types match and optional chaining is used where needed.
Verify error handling — every await call and file I/O operation should have a try/catch or propagate the error up. Swallowed errors (catch {}) should be flagged.
Check that async functions are awaited — a common bug is calling an async function without await and discarding the returned Promise.
Look for resource leaks — file handles, streams, and connections should be closed in a finally block or use using / defer patterns.
Review naming — variable and function names should describe what the thing is or does. Single-letter names outside of loop indices should be flagged.
Check test coverage — for each exported function, there should be at least one test for the happy path and one for error conditions.
Flag magic numbers and strings — literal values like 3, "active", or 86400 should be named constants.
Report findings as a structured list: one line per issue, with the format [severity] file:line — description. Severity: error (breaks), warning (risky), suggestion (style).
End with a summary: total counts per severity and an overall verdict (approve / request changes).