chore(skills): git-commit — triage pre-existing changes before committing
Add a mandatory step between assessing changes and grouping commits: surface any modified/untracked files that weren't touched in the current session and ask the user whether to include them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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` — <brief description of the diff>
|
||||
> - `path/to/other` — <untracked, N files>
|
||||
>
|
||||
> 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user