diff --git a/.claude/skills/git-commit/SKILL.md b/.claude/skills/git-commit/SKILL.md index 45f6a40d9..92a4f2722 100644 --- a/.claude/skills/git-commit/SKILL.md +++ b/.claude/skills/git-commit/SKILL.md @@ -14,16 +14,31 @@ allowed-tools: Bash, Read, Grep, Glob, Write, Edit ## Workflow 1. Run `git status` and `git diff --stat` to assess all pending changes. -2. Group changes into **logical commits** — each commit should represent one +2. **Triage: session vs pre-existing.** Separate changes you made in this + session from changes that were already dirty when the session started. + Check the conversation history — if you didn't touch a file, it's + pre-existing. After grouping your own commits, surface any remaining + modified or untracked files to the user: + + > These files are also modified/untracked but weren't part of this + > session's work: + > - `path/to/file` — + > - `path/to/other` — + > + > Should any of these be included in a commit? + + Wait for the user's answer before staging them. Never silently skip + or silently include pre-existing changes. +3. Group changes into **logical commits** — each commit should represent one coherent change. Common groupings: - A bug fix (all files touched to fix one issue) - A new feature or system (e.g., new trait files + localization + events) - Refactoring / cleanup (encoding fixes, comment fixes, renaming) - Config / meta changes (CLAUDE.md, .claude/ skills, mod descriptor) - Data corrections (province remapping, missing fields) -3. For each logical group, stage only the relevant files and commit with a +4. For each logical group, stage only the relevant files and commit with a properly formatted message. -4. After all commits, update CHANGELOG.md. +5. After all commits, update CHANGELOG.md. ## Commit Message Format