Skip to main content

git-commit-reviewer

Reviews staged git changes and provides feedback on code quality, potential bugs, and security issues before committing. Use when asked to review changes or before creating a commit.

来源信息

仓库
abhiunix/community-registry
最近来源活动
2026年9月21日 11:26
检测到的 SKILL.md 语言
英语
星标
2
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
git-commit-reviewer
description
Reviews staged git changes and provides feedback on code quality, potential bugs, and security issues before committing. Use when asked to review changes or before creating a commit.
license
MIT
allowed-tools
Read Glob Grep Bash
# Git Commit Reviewer When asked to review changes or before a commit, follow this process: ## Step 1: Gather Changes Run `git diff --cached --stat` to see which files are staged, then `git diff --cached` for the full diff. If nothing is staged, check `git diff` for unstaged changes and let the user know. ## Step 2: Analyze Each File For each changed file, check: ### Code Quality - Are variable/function names descriptive? - Is there duplicated logic that should be extracted? - Are functions small and focused? - Is error handling present where needed? ### Potential Bugs - Off-by-one errors in loops or array access - Null/undefined not handled - Race conditions in async code - Missing `await` on async calls - Incorrect comparison operators (`==` vs `===`) ### Security - No secrets, API keys, or tokens in the diff - User input is validated before use - No SQL injection or XSS vectors introduced - File paths are sanitized if user-provided ### Dependencies - New dependencies are intentional and from trusted sources - No unnecessary dependency additions - Lock file is updated consistently ## Step 3: Provide Feedback Structure your review as: ``` ## Summary One-line overview of the changes. ## Issues Found ### Critical (must fix) - ... ### Suggestions (nice to have) - ... ## Looks Good - Positive observations about the changes ``` ## Rules - Be constructive — explain why something is an issue, not just that it is - If no issues found, say so clearly and briefly - Don't nitpick style if the project has a formatter configured - Focus on logic and correctness over formatting - If the diff is large (>500 lines), summarize by file group rather than line-by-line
在 GitHub 查看