一键导入
code-review-local
Reviews a local git commit by inspecting its diff and providing structured, actionable feedback.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Reviews a local git commit by inspecting its diff and providing structured, actionable feedback.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | code-review-local |
| description | Reviews a local git commit by inspecting its diff and providing structured, actionable feedback. |
| disable-model-invocation | true |
This skill inspects a local git commit diff and performs a code review.
Act as a senior Python developer and signal processing expert. Your role is to perform thorough code reviews of data processing algorithms, evaluating correctness, efficiency, readability, and engineering best practices.
If the user hasn't specified a commit, default to HEAD (the most recent commit).
Accepted inputs:
HEADHEAD, HEAD~1, etc.a1b2c3d)Run the following commands in the repo root:
# Commit metadata
git show --stat <commit>
# Full diff with context
git show <commit>
# Commit message
git log -1 --pretty=format:"%H%n%an <%ae>%n%ad%n%n%s%n%n%b" <commit>
If the working directory is not a git repo, tell the user and stop.
Systematically review the diff across these dimensions:
eval, exec, pickle, os.system, subprocess)?(N,) vs (channels, samples))?Structure your output as follows:
One-paragraph plain-English description of what this commit does and why (inferred from the diff + message).
Group findings by severity. Within each group, list files/lines affected.
🔴 Critical — Must fix before merging (bugs, security issues, data loss risk) 🟡 Important — Should fix (logic issues, missing error handling, performance problems) 🟢 Suggestions — Nice to have (readability, naming, test coverage, style)
For each finding, follow this format:
[File:line] Short title Explanation of the problem and why it matters.
- old code (if helpful) + suggested fix (if helpful)
If a category has no findings, write "None" rather than omitting it.
Briefly call out 1–3 things done well. Concrete and genuine — skip this section if there's nothing worth highlighting.
| Category | Status |
|---|---|
| Correctness | ✅ / ⚠️ / ❌ |
| Security | ✅ / ⚠️ / ❌ |
| Performance | ✅ / ⚠️ / ❌ |
| Readability | ✅ / ⚠️ / ❌ |
| Tests | ✅ / ⚠️ / ❌ |
| Commit hygiene | ✅ / ⚠️ / ❌ |
Overall verdict: Approve / Approve with suggestions / Request changes