About commit
A skill for staging task-related files, committing and pushing the current branch, then reporting the commit hash and branch. It also documents Git and Azure DevOps pitfalls.
Key features
- 01Stage only task-related files
- 02Commit and push the current branch
- 03Report commit hash and branch
- 04Document Git and Azure DevOps gotchas
Use cases
- 01Commit a completed task without staging unrelated files
- 02Push changes and report the resulting commit details
- 03Check commit and hook behavior in Azure DevOps
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ julianobarbosa/ claude-code-skills --skill commitAfter installing, type/commitin Claude Code to confirm it loaded.
Details
From the project READMECommit and Push Skill
- Stage only files related to the current task
- Run
git commit --no-verifyif pre-commit hooks fail on unrelated issues - Push to the current branch
- Report the commit hash and branch name
NOTE: This repo uses Azure DevOps. For PRs use az repos pr create.
NOTE: The commit-msg hook strips Co-Authored-By trailers so commits appear as sole-author.
Gotchas
git commit --no-verifybypasses pre-commit hook — logged in reflog but easy to forget. A CI check that fails on no-verify trailers prevents drift.commit-msghook transforms the message AFTER the editor closes — verify the final state withgit show -s --format=%B, not the editor draft.- Azure DevOps strips
Co-Authored-Byserver-side — local commits show co-author; PR display doesn't. Test what shows in the PR UI before assuming attribution worked. git commiton a detached HEAD creates an orphan —git checkout mainloses it unless you branch first. Reflog recovers but only for 30 days.- Trailing whitespace in commit messages: some hooks normalize, some preserve. Format-checks comparing raw vs normalized fail confusingly.
Comments
Markdown supported