git-commit — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited git-commit (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
bensz-collect-bugs 规范记录到 ~/.bensz-skills/bugs/,不要直接修改用户本地已安装的 skill 源码;若有 workaround,先记 bug,再继续完成任务。gh 上传新增 bug 到 huangwb8/bensz-bugs;不要 pull / clone 整个仓库。仅用 Git 分析改动并自动生成 conventional commit 信息(可选 emoji);必要时建议拆分提交,默认运行本地 Git 钩子(可 --no-verify 跳过),提交后默认自动 push(可 --no-push 跳过)。
本技能支持两种工作模式:
| 模式 | 触发方式 | 行为特征 |
|---|---|---|
| 自动模式 | 默认(无参数) | AI 自主决策所有步骤:自动暂存、自动拆分、直接提交 |
| 审核模式 | --review 参数 | 在关键决策点暂停,等待用户确认暂存方式、拆分建议、提交信息 |
默认使用自动模式,因为大多数情况下 commit 的顺利提交比内容本身更重要;如不满意可直接回退。
git rev-parse --is-inside-work-tree 判断是否位于 Git 仓库git init 初始化仓库后继续git rev-parse --symbolic-full-name HEAD 返回 HEADgit switch -c <branch-name>)或切换到现有分支(git switch <branch-name>)"git status<<<<<<< 的文件)git add <冲突文件>git rebase --continue 或 git merge --continuegit rebase --skipgit rebase --abort / git merge --abortgit status --porcelain 与 git diff 获取已暂存与未暂存的改动git ls-files --others --exclude-standard 列出未跟踪且未被忽略的文件git add -A(除非传入 --no-all 或 --no-untracked 跳过)--no-untracked 跳过)git ls-files --others --exclude-standardgit add -- <untracked_paths...>git ls-files --others --exclude-standard -z | xargs -0 git add --git add -A)git add -- <untracked_paths...>)git add <path>...)git add -A(除非传入 --no-all 跳过)按以下决策树判断是否需要拆分提交:
1. 强制拆分条件(任一满足则建议拆分):
2. 建议拆分条件(不满足强制条件时):
3. 单一提交条件(以上都不满足):
若检测到多组独立变更或 diff 规模过大:
#### 格式规范
遵循 Conventional Commits 规范:
[<emoji>] <type>(<scope>)?: <subject>
<body>
<footer>#### 类型(type)
详见 config.yaml 中的 commit_types 定义。
#### Emoji 映射(使用 --emoji 时)
详见 config.yaml 中的 emoji_map 定义。
#### 自动识别 type 和 scope
type 自动识别:根据改动内容自动识别(如新增功能 → feat,修复缺陷 → fix)
scope 自动识别:
src/auth/login.ts → scope 为 auth)feat: add user feature)--scope 参数覆盖自动识别的 scope#### 内容要求
- 开头BREAKING CHANGE: <description>Closes #123)#### 破坏性变更检测与处理
检测规则(满足任一条件即为破坏性变更):
处理方式:
feat(api)!: redesign authentication APIBREAKING CHANGE: <description>#### 语言选择
按以下优先级动态检测提交信息语言:
--lang zh 或 --lang en 参数临时切换语言git log -n 5 --pretty=%s 获取最近 5 次提交的主题行$LANG(macOS/Linux)或系统语言设置zh_CN、zh_TW、zh_HK 等 → 使用简体中文检测示例:
# 获取最近 5 次 commit 主题
git log -n 5 --pretty=%s
# 检测设备语言
echo $LANG # 例如:zh_CN.UTF-8 → 中文;en_US.UTF-8 → 英文git commit [-S] [--no-verify] [-s] -F .git/COMMIT_EDITMSGgit add <paths> && git commit ...git add <paths> && git commit ... 指令,询问是否执行提交成功后,默认自动执行 push:
git push(除非传入 --no-push)git rev-parse --abbrev-ref --symbolic-full-name @{u}git push -u origin <branch> 设置上游并推送git pushgit pull --rebase)后再推送如误暂存,可用 git restore --staged <paths> 撤回暂存(命令会给出指令)
如误提交(未推送),可用 git reset --soft HEAD~1 撤回提交(保留改动)
如已推送,需使用 git revert 创建反向提交(避免强制推送)
--review:启用审核模式(在关键决策点暂停,等待用户确认)--no-all:在自动模式下跳过自动暂存(包括自动 git add -A 与自动补齐未跟踪文件)--no-untracked:在自动/审核模式下不自动处理未跟踪文件(避免把“新文件”自动加入暂存区)--no-verify:跳过本地 Git 钩子--no-push:提交后不自动推送(仅本地提交)--amend:修补上一次提交(⚠️ 危险操作:仅在未推送的本地分支使用,已推送的分支使用会导致历史不一致)--signoff:附加 Signed-off-by 行--emoji:在提交信息中包含 emoji 前缀--scope <scope>:指定提交作用域--type <type>:强制提交类型--lang <zh|en>:临时指定提交信息语言(覆盖自动检测)✨ feat(ui): add user authentication flow
- implement Google and GitHub third-party login
- add user authorization callback handling
- improve login state persistence logic
Closes #42feat(auth): add OAuth2 login flow
- implement Google and GitHub third-party login
- add user authorization callback handling
- improve login state persistence logicfeat(api)!: redesign authentication API
- migrate from session-based to JWT authentication
- update all endpoint signatures
- remove deprecated login methods
BREAKING CHANGE: authentication API has been completely redesigned, all clients must update their integration自动模式:自动执行以下三个提交(不询问)
审核模式:检测到多组独立变更,建议拆分为以下提交:
#### 提交 1:feat(ui): add user authentication flow
git add src/components/LoginForm.tsx src/hooks/useAuth.ts
git commit -m "feat(ui): add user authentication flow
- implement login form with email and password fields
- add authentication state management hook
Closes #42"#### 提交 2:fix(api): resolve token validation error
git add src/api/auth.ts
git commit -m "fix(api): resolve token validation error
- add proper error handling for expired tokens
- update token refresh logic"#### 提交 3:docs(auth): update authentication documentation
git add docs/auth-guide.md
git commit -m "docs(auth): update authentication documentation
- add OAuth2 integration guide
- update troubleshooting section"--no-verify 可跳过--no-push 可跳过.git/COMMIT_EDITMSG 与暂存区~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.