Agent Skills
› spinabot/brigade
› git-commit
git-commit
GitHub指导如何规范地进行 Git 提交和创建 Pull Request。包括谨慎暂存文件、保持提交逻辑单一、遵循 Conventional Commits 格式编写消息,以及使用 gh CLI 高效创建 PR 并验证基础分支。
触发场景
用户询问如何格式化 Git 提交信息
用户需要创建或优化 Pull Request
用户在提交代码前寻求最佳实践建议
安装
npx skills add spinabot/brigade --skill git-commit -g -y
SKILL.md
Frontmatter
{
"name": "git-commit",
"description": "Stage, write, and structure git commits and pull requests cleanly. Read this before committing — for conventional-commit message format, when to split commits, and how to open a PR with the gh CLI.",
"requires-bins": "git"
}
Git commits & PRs
Use this when committing changes or opening a pull request.
Before committing
- Run
git statusandgit diff --stagedto see exactly what's going in. Nevergit add -Ablindly — stage the files that belong to this change. - Keep one logical change per commit. If the diff does two unrelated things, make two commits.
- Don't commit secrets, large binaries, or generated artifacts. Check
.gitignorecovers them.
Message format
Conventional Commits:
<type>(<optional scope>): <short imperative summary>
<optional body — what changed and WHY, wrapped at ~72 cols>
Types: feat, fix, docs, refactor, test, chore, perf, build, ci.
- Summary in the imperative mood ("add", not "added"), ≤72 chars, no trailing period.
- The body explains the reasoning a future reader needs — not a restatement of the diff.
Pull requests (gh CLI)
git push -u origin <branch>thengh pr create --fill(or--title/--body).- PR body: what changed, why, and how it was verified (tests run, manual checks).
- Confirm the base branch is correct before creating.
Conventions to honor
Match the repository's existing style — read recent git log --oneline first and follow whatever format the project already uses if it differs from the above.
版本历史
- db99206 当前 2026-07-05 10:58


