agentsclimarketplace

Git commit

Skill sergeyklay/.agents/.agents/skills/git-commit

My personal, curated set of artifacts for AI coding agents

Install
npx -y skills add sergeyklay/.agents --skill git-commit

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when asked to commit, save, or persist changes to Git. Handles atomic commits, branch safety, Conventional Commits format, and project style matching. Do NOT use for pushing, creating PRs, or branch management beyond safety checks.

SKILL.md

3.9 KB, as published. Nobody here has run it

Git Commit

Workflow

Step 1: Identify changes and group atomically

git status --short
git diff
git diff --cached

Each commit = one logical change. Split unrelated changes into separate commits.

SituationCommits
New service + its tests1 commit
New feature + unrelated config fix2 commits
Multiple files for one feature1 commit
  • If user says "commit all" - group into logical atomic commits
  • If ambiguous - ask which files and grouping

Step 2: Check branch safety (BLOCKING)

git branch --show-current

Protected branches: main, master, develop, release/*, hotfix/*.

STOP if on a protected branch. Do not commit. Do not proceed to Step 3. Instead:

  1. Inform the user: "Cannot commit to <branch> - it is a protected branch."
  2. Create a feature branch: git checkout -b <type>/<kebab-description>
  3. Only then continue to Step 3.

If on a feature branch: proceed.

Branch naming convention

Format: <type>/<kebab-case-description>

TypeUse CaseExample
featNew featurefeat/bill-reminders
fixBug fixfix/null-amount-validation
refactorCode restructuringrefactor/extract-payment-service
choreMaintenance taskschore/update-dependencies
docsDocumentationdocs/api-reference
testTest additionstest/payment-service-coverage

Step 3: Match project commit style

git log --format="%s" -20

Identify vocabulary, detail level, scope patterns. Mimic the project's phrasing while following Conventional Commits format.

See references/commit-format.md for type table, rules, and anti-patterns.

Step 4: Stage and commit

git add <files>
git commit -m "<type>[scope]: <description>"

For multi-line messages:

git commit -m "<subject>" -m "<body>"

Subject line: imperative mood, under 72 chars, no period, English only. Body (if needed): wrap at 72 chars, explain what and why. The 72-char body wrap is a commit-message convention - git log and most CLI tooling render bodies as plain text in a narrow column. It does not generalize to PR descriptions (where GitHub renders soft line breaks as <br> and wrapping creates visible artificial breaks), CHANGELOG prose (which follows that file's own readability conventions, not this one), or other Markdown rendered as HTML.

Do not reference docs/architecture.md, docs/decisions/, section numbers, or ADR numbers in commit messages. Those belong in specs and plans, not in the git history.

Step 5: Verify

git log --oneline -1
git show --stat HEAD

Report: commit hash, files changed, insertions/deletions.

Error Recovery

ErrorFix
"nothing to commit"Check git status, verify files have changes
Pre-commit hook failsRead the error, fix the issue, create a NEW commit (do not amend)
Wrong files committedgit reset --soft HEAD~1, re-stage correctly, commit again

Handoff

If the user also asked to create a PR, invoke the creating-pr skill after committing. Do not hand-roll gh pr create - the skill has a required template.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.