commit_skill
0
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill aravhawk/claude-code-utils --skill commit- SKILL.md1.2 KB
Overview
This skill creates atomic Git commits with well-formed Conventional Commit messages. It checks your working tree for issues, stages changes appropriately, helps split unrelated edits into separate commits, and produces a justified commit message that follows conventional standards. After committing it confirms the result with the new commit hash and summary.
How this skill works
The skill first inspects the repository state (git status) and stops if there are no changes or unresolved merge conflicts. It verifies common ignores (secrets, build artifacts, OS/IDE files), stages changes (globally or per-file for atomic commits), and analyzes the staged diff to detect unrelated edits. It crafts a Conventional Commit message (type, optional scope, concise summary, wrapped body, optional footer) and runs git commit, then reports the last commit hash and message.
When to use it
- Committing a focused feature or bug fix and you want a standardized message
- Preparing commits for a shared repository or CI process that enforces Conventional Commits
- Reviewing staged changes to ensure they are atomic and logically grouped
- Avoiding accidental inclusion of secrets, build artifacts, or OS/IDE files
- Ensuring commit history is easy to read and automatable for changelogs or releases
Best practices
- Keep commits atomic: stage only files that implement a single change or concern
- Use imperative, lowercase summaries without a trailing period and limit to ~72 chars
- Include a body describing what and why, wrapped at 72 chars, when context is needed
- Use appropriate type (feat, fix, docs, chore, etc.) and add a scope when useful
- Run git diff --cached to inspect staged changes and split unrelated edits via git reset
Example use cases
- Committing a bug fix in a module: 'fix(parser): handle missing fields in input'
- Adding a new API feature: 'feat(auth): add token refresh endpoint' with body explaining behavior
- Updating documentation only: 'docs(readme): clarify setup steps'
- Removing dead code or refactoring without behavior change: 'refactor(storage): simplify interface'
- Preparing a release commit where BREAKING CHANGE or Fixes #ISSUE appears in the footer
FAQ
The skill halts and reports the conflict; resolve conflicts manually before committing.
How do I split unrelated changes into separate commits?
Use git reset HEAD <file> to unstage files, then stage and commit each logical group separately.
What commit types should I use?
Use Conventional Commit types like feat, fix, docs, style, refactor, perf, test, build, ci, chore.