一键导入
git-commit
Generate high-quality git commits with context-awareness and multi-commit support
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate high-quality git commits with context-awareness and multi-commit support
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | git-commit |
| description | Generate high-quality git commits with context-awareness and multi-commit support |
Generate well-structured git commits following the seven rules of great commit messages. This skill handles single commits, multi-commit plans, and interactive workflows. Of the seven rules, Rule 7 — use the body to explain what and why, not how — is the most important to internalize.
Guidelines based on: https://cbea.ms/git-commit/
Git tools (log, shortlog, rebase) depend on this separation.
Simple changes need only a subject. Add a body when the motivation
isn't obvious from the code, when there are side effects to explain,
or when the change requires context.
50 characters is the target — it forces concise thinking. Around 72 characters is a commonly recommended maximum; many tools wrap or truncate beyond this. If you struggle to summarize, the commit may be doing too many things.
Start with an uppercase letter. No exceptions.
Trailing punctuation is unnecessary in a title-style line.
The subject should complete: "If applied, this commit will [subject]"
Imperative mood is required only in the subject. The body can be conversational.
Git doesn't wrap automatically. 72 characters leaves room for indentation while staying under 80 columns.
This is the most important rule. The diff shows WHAT changed and the code shows HOW. The commit message's job is to explain WHY.
Specifically explain:
For simple, self-explanatory changes:
Add fish abbreviation for git status
When motivation isn't obvious from the diff:
Switch default shell history to atuin
The built-in fish history doesn't sync across machines. Atuin stores
history in a local SQLite database and optionally syncs it, which
makes it easier to recall commands run on other hosts.
Write commit message bodies as natural prose — like explaining a change to a colleague. Prefer flowing paragraphs that tell the story of why the change was needed. Bullet points are acceptable when listing genuinely helps clarity, but default to prose. Avoid "Files changed:" sections — the diff already shows what changed.
These demonstrate the preferred style: natural prose focused on the WHY.
Add ripgrep to Homebrew bundle
Using rg as the default search backend for fzf and neovim's telescope.
Declaring it explicitly here ensures it's present after a fresh
bootstrap rather than relying on it being a transitive dependency.
Extract editor config into separate fish function
The editor selection logic was duplicated between the interactive
config and the non-interactive profile. Moving it into a dedicated
set_editor function keeps both paths in sync and makes it easier
to add fallback editors later.
Fix WezTerm failing to start on macOS Sequoia
The lua config was referencing wezterm.target_triple to detect the
platform, which was removed in a recent release. Switch to checking
wezterm.running_under_wayland() and the TERM_PROGRAM env var instead,
which works across versions.
Exclude .env files from rcm symlinking
Accidentally symlinking .env files would expose secrets on any
machine that runs rcup. Adding them to EXCLUDES in rcrc prevents
that without requiring manual cleanup after each bootstrap.
git diff --cached). If nothing is staged, stop and inform the user.This is a dotfiles repository. All commits go directly to master —
there are no feature branches or pull requests. Run
git log -5 --oneline to get a sense of recent activity and commit
style. The last 5 commits may be entirely unrelated to each other;
use them to calibrate tone and style, not to infer a narrative.
Most dotfiles changes warrant a single commit. If changes span genuinely unrelated concerns, group them into separate atomic commits, each with a clear subject.
Apply all seven rules. Use the recent commit history to match tone and style, but describe only what the specific commit does. If you cannot deduce the motivation with confidence, ask the user rather than inventing reasoning.
Show the proposed message in a gitcommit block and wait for approval.
The user may iterate on the message before accepting. For multiple
commits, present the full plan first, then execute sequentially only
after approval.
This repository has a .gitmessage commit template — check it for any
additional guidance before drafting.