Commit Skill
Pre-flight
- •Build gate — A
PreToolUsehook in.claude/settings.local.jsonautomatically runsmake allbefore anygit commitand blocks the commit if the build fails. Do NOT runmake allmanually — the hook handles it. If the hook reports a build failure, fix the issue before retrying. - •Submodule check — Run
git submodule status. The only submodule islib/rmlui. If prefixed with+, the pointer has moved.- •If the user's work involved RmlUI submodule changes, those need to be committed inside the submodule first, then the updated pointer committed in the main repo.
- •If the submodule pointer moved but the user didn't intentionally change it, ask before staging it — it may be an accidental pointer drift.
- •Use
git diff --submodule=logto show what commits the pointer moved across.
Staging
- •Review all changes — Run
git statusandgit diff(unstaged) andgit diff --staged(staged).- •Show the user a clear summary of what's staged vs unstaged.
- •Flag any files that look like they don't belong (
.cfgwritten by the engine, accidental binary files, etc.). - •Never stage
game/contents (it's gitignored runtime data).
Commit message
- •Match existing style — Check
git log --oneline -5for recent message patterns. This repo uses:- •
Area: short imperative descriptionformat (e.g.RmlUI: add Modern HUD toggle) - •Common prefixes:
RmlUI,Post-process,Sprint FOV,Engine,Build,UI - •Keep subject under 72 characters
- •Add body paragraph only if the change needs explanation beyond the subject line
- •
Confirmation
- •
Show summary and ask — Present:
- •Files to be committed (with submodule pointer changes called out separately)
- •Proposed commit message
- •Ask user to confirm, edit the message, or make additional changes before committing
- •
Commit — Only after user confirms. Use
Co-Authored-Bytrailer as required.
Submodule workflow reference
The only submodule is lib/rmlui. When committing RmlUI submodule changes:
code
# 1. Inside the submodule — commit and push cd lib/rmlui/ git add <files> git commit -m "Description of submodule change" git push origin rmlui # 2. Back in main repo — stage the updated pointer cd /path/to/project-root git add lib/rmlui git commit -m "Update RmlUI submodule (description of why)"
Submodule pointer commits should explain what changed in the submodule, e.g.:
- •
Update RmlUI submodule (add custom element support)