git-commit · diff

v1.3.0 to v1.3.0

6 added, 0 removed. Audit A to A.

---
name: git-commit
version: 1.3.0
description: >
Guide for creating git commits in this repository: conventional commit format,
allowed types, and branch naming conventions.
Use when staging changes and writing a commit message, creating a branch,
or naming a branch. Trigger on: "commit", "create a commit", "git commit",
"stage changes", "write a commit message", "make a commit", "branch name",
"new branch", "create branch". Also use proactively whenever you are about
to run `git commit` — even if the user did not explicitly mention this skill.
requires_agent_teams: false
requires_claude_code: false
min_plan: starter
owns:
directories: []
patterns: []
shared_read: []
allowed-tools: ["Read", "Bash"]
composes_with: ["git-pr", "git-pr-feedback", "git-post-merge-cleanup"]
spawned_by: []
---
# Git Commit Conventions
## Commit Message Format
```text
type: short description in imperative mood
Optional body paragraph.
```
- **No scope** — use `feat: add X`, not `feat(module): add X`.
- **Lowercase** type and description.
- **Imperative mood**: "add X", "fix Y", "remove Z" — not "added", "adding", "fixes".
- **No period** at the end.
- **Max ~72 characters** on the subject line.
- Optional body (blank line after subject): use for context, not mechanics.
### Allowed Types
| Type | When to use |
|---|---|
| `feat` | New feature or behaviour |
| `fix` | Bug fix |
| `test` | Adding or fixing tests only |
| `docs` | Documentation only |
| `refactor` | Code change with no feature/fix |
| `chore` | Build, tooling, config, deps |
| `build` | Build system changes |
| `perf` | Performance improvement |
| `style` | Formatting, whitespace — no logic change |
| `revert` | Reverts a previous commit |
### Examples
A complete commit with body:
```text
feat: add retry policy to HTTP client
Wrap outbound calls in a retry with exponential backoff so
transient failures from downstream services don't fail the request.
```
A minimal commit:
```text
fix: handle null input in prompt builder
```
Subject-only quick reference:
```text
test: add unit tests for retry backoff logic
chore: update dependencies
docs: document skill frontmatter spec
refactor: extract connection string builder to helper
```
---
## Branch Naming
```text
{type}/{short-description}
```
- Use the commit type directly (`feat`, `fix`, `chore`, etc.) — not expanded forms.
- Description uses hyphens to separate words, kept to 3–5 meaningful words.
### Branch Name Examples
```text
feat/add-query-meter-api
fix/api-client-retry-policy
chore/update-skill-frontmatter
docs/add-orchestrator-guide
```
---
## Merge Strategy
PRs merge with a **squash merge** by default unless the branch has a meaningful commit history worth preserving.
---
+ ## Co-Authored-By Trailer
+
+ Commits in this repo end with a `Co-Authored-By: Claude ... <noreply@anthropic.com>` trailer and a `Claude-Session:` line. These are applied automatically from the agent's environment/system instructions — do **not** hand-type them into the message body, and do not invent or alter the email or session URL. Write your `type: description` subject and optional body as normal; the trailers are appended below the body, separated by a blank line, as the last lines of the message.
+
+ ---
+
## Quick Checklist
- [ ] Subject line: `type: description` (lowercase, imperative, no scope, no period)
- [ ] Type is one of the allowed types above
- [ ] Optional body explains the *why*, not the *what*
- [ ] Branch: `type/short-description`
---
## Anti-Pattern
> **Forbidden:** Amending commits unless the user explicitly asks. After a pre-commit hook failure, create a NEW commit.