Create git commits in the Conventional Commits format: one commit per logical change, the co-author trailer of the agent that made it, and the safety rules (no secrets staged, no --no-verify, no amend, no force push, never a commit on main, develop or a release/<major>.x branch). Use when the person asks to commit or to create a commit, and when a step of the work ends in a commit.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Git Commit?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/jorgecostamacia-git-commit)
---
name: git-commit
description: >-
Create git commits in the Conventional Commits format: one commit per logical
change, the co-author trailer of the agent that made it, and the safety rules
(no secrets staged, no --no-verify, no amend, no force push, never a commit on
main, develop or a release/<major>.x branch). Use when the person asks to
commit or to create a commit, and when a step of the work ends in a commit.
---
# Commits
## Read the changes first
If the person gives no message, look at the changes before you write one. Read `git status`, `git diff HEAD`, the untracked files and the current branch. Read the last ten commits for the scopes and words that the repository uses. The format itself comes from this skill, not from the history.
## The repository's own rules come first
If the repository's `AGENTS.md` states a commit rule (no co-author trailer, another message format, another language), follow the repository. Say once which rule of this skill the repository rule replaced. This skill fills in what the repository does not say.
## Checks before committing
- **Branch.** No commits on `main`, `develop` or a `release/<major>.x` branch. On one of them, stop and propose a branch as the repository's workflow says (its `AGENTS.md` names the workflow).
- **Secrets.** Never stage `.env*` files, keys, certificates, tokens or configuration with credentials. If the diff shows something that looks like a secret, stop and tell the person before you commit anything.
- **Files that do not belong.** Unstage them with `git restore --staged <file>`; never throw away someone's changes to tidy the index.
## One commit per logical change
- Group by reason, not by folder. A test travels with the code it covers.
- A refactor and a change of behavior are separate commits; a dependency and its lockfile are one.
- `git add -p` splits a file whose hunks belong to different changes.
- With more than one commit, show the plan first: each commit, its message and its files. If the grouping is not clear, ask before you commit. Otherwise, commit.
- When the person asks for one commit, make one.
## The message
In English, in the format of [`references/commit-messages.md`](references/commit-messages.md), unless the person dictated it.
## Co-author trailer
A commit that an agent made ends with a trailer that names the tool and the model. With it, people can find and measure the work of agents later:
```text
Co-Authored-By: {tool} - {model name} {model version} ({reasoning effort}) <{tool email}>
```
For example: `Co-Authored-By: Claude Code - Claude Opus 5.5 (high) <noreply@anthropic.com>`.
| Tool | Email |
| --- | --- |
| Claude Code | `noreply@anthropic.com` |
| Cursor | `cursoragent@cursor.com` |
| Copilot | `copilot@github.com` |
| Codex | `codex@openai.com` |
A commit a person writes without an agent carries no trailer.
## Never
- `--no-verify`. If a hook fails, fix the cause or tell the person. Never skip the hook.
- `--amend`. A new commit instead: amending a pushed commit needs a force push.
- `git push --force` or any rewrite of pushed history.
- Pushing as part of committing. Pushing follows the repository's workflow.
## Identity
Commit with the identity git already has for the repository, never one set in the command. A repository can have its own with `git config --local`.