Skip to content
Back to skills

Git Commit

ASecurity

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.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
ai-agentsgit

Works with

  • claude code
  • cursor

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add JorgeCostaMacia/agent-harness --skill git-commit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Commit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Git Commit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jorgecostamacia-git-commit/badge)](https://www.skillsdirectory.com/skills/jorgecostamacia-git-commit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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`.

Files in this skill

  • SKILL.md3.1 KB
  • references/commit-messages.md2.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.