About commit
A skill for structuring Git commits, guiding developers to split changes by logical concern, follow the repository’s commit style, and verify working-tree status. It can scope work to specified paths and explicitly avoids pushing.
Key features
- 01Split changes into atomic commits
- 02Follow recent repository message style
- 03Limit commits to specified paths
- 04Stage explicitly and verify status
- 05Create a new commit after hook failures
Use cases
- 01Commit work spanning multiple concerns
- 02Commit changes only within selected paths
- 03Write concise messages in the project’s style
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ helderberto/ agent-skills --skill commitAfter installing, type/commitin Claude Code to confirm it loaded.
Details
From the project READMEGit Commit
Group all unstaged/untracked changes into atomic commits — one commit per logical concern. A single concern is just the degenerate case: one commit. Never push — pushing belongs to /hb:to-pr.
Paths in $ARGUMENTS scope the run: commit only those files and leave the rest of the tree as it is.
Message style
Match the repo's existing commit patterns from git log. Extreme concision — sacrifice grammar for brevity. Focus on "why" not "what". Imperative mood. Conventional commits (feat/fix/refactor/docs/chore + scope) when the repo uses them.
Workflow
- Review full diff and status; read recent log for style.
- Identify logical groups: feature/fix, its tests, config, formatting-only, docs, assets.
- Per group: stage those files explicitly by name, commit with a HEREDOC message, confirm
git statusbefore the next group. - Finish with a clean working tree (scoped run: every listed file committed). Unsure how to group a file → ask.
Grouping rules
- Formatting-only changes (whitespace, quotes, indentation) get their own commit, separate from logic.
- A file with both logic and formatting changes stays in the logic commit.
- Tests and the code they test can share a commit.
- Pre-commit hook fails → fix, re-stage, create a new commit; never
--amend, never skip hooks.