Skip to content
Back to skills

Commits

ASecurity

Commit message rules: the header format (task key and imperative subject), body and footers, revert messages, one logical change per commit, and the regexes that validate headers and branch names. Load before committing.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
developmentgitapi

Works with

  • api

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add the-up/ai --skill commits --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commits?

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

Security grade badge for Commits
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/the-up-commits/badge)](https://www.skillsdirectory.com/skills/the-up-commits)

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: commits
description: "Commit message rules: the header format (task key and imperative subject), body and footers, revert messages, one logical change per commit, and the regexes that validate headers and branch names. Load before committing."
---

# Commits

- Use the header format `<TASK-KEY>: <Subject>`, or `<Subject>` when there's no task; at most 100 characters:
  - **TASK-KEY:** required when there's a task; the key from the project management tool (for example `PROJ-123`). Jira, GitHub, and GitLab link the commit, branch, and PR to the task by this key.
  - **Subject:** imperative mood, starts with a capital letter, no trailing period, and describes what the change does.
- Separate the body and the footers with a blank line each, and wrap lines at 100 characters. In the body, explain what changed and why, not how; skip the body when the header is enough.
- Write footers as `Token: value`: `BREAKING CHANGE: <description>` for a backward-incompatible change, `Refs: <additional-task-key>`, and trailers that the repository's tools require, such as `Signed-off-by:`. Never add Claude attribution, as the [Core Rules](../core-rules/SKILL.md) say.
- For a revert, use the message Git generates: the header `Revert "<reverted header>"` and the body `This reverts commit <hash>.`
- Each commit contains one logical change.
- A repository uses another format for commits, branches, or PR titles, such as Conventional Commits, only when something states or enforces it: its instructions, or a validator such as commitlint, a Git hook, or a CI check. Then follow that format and propose the switch to this one as separate work.
- The Git history alone doesn't set the format: earlier commits in another style, such as a `feat:` prefix, aren't a rule, so don't copy them; use this format. When recent commits by authors other than the user follow another style and nothing states or enforces it, ask the user once which format the repository keeps, and record the answer in the repository's instructions as a standing instruction, as the [Task Management](../task-management/SKILL.md) rules describe, so that no later session has to ask again. The user's own commits, including the ones an agent made for the user, never raise this question.

Examples:

```text
PROJ-123: Prevent duplicate payment requests
PROJ-140: Reject expired refresh tokens
Update the editorconfig
```

## Enforcement

- Validate the header in the commit-msg hook and the PR title in CI with the same regex and the 100-character limit; exempt messages that Git generates and messages that start with `Merge ` or `Revert "`. Use the first regex in repositories with a task tracker and the second one in repositories without one:

  ```text
  ^[A-Z][A-Z0-9]+-[0-9]+: [A-Z].*[^.]$
  ^[A-Z].*[^.]$
  ```

- Validate the branch name in the pre-push hook or in CI with the regex in the [Worktrees and Branches](../worktrees-and-branches/SKILL.md) rules.
- If the repository has commitlint or another validator, follow its configuration and report how it differs from these rules.

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 development →

Comments

Loading comments…

Newsletter

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