Skip to main content

git-commit

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.

来源信息

仓库
spinabot/brigade
最近来源活动
2026年5月22日 03:23
检测到的 SKILL.md 语言
英语
星标
11,367
Forks
79

安装方式

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

检查来源文件

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

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
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 status` and `git diff --staged` to see exactly what's going in. Never `git add -A` blindly — 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 `.gitignore` covers 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>` then `gh 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.
在 GitHub 查看