conventional-git skill
✓ VerifiedEnforces standardized branch naming, git worktree organization, and commit message formats for automated changelogs and SemVer releases.
- GitHub stars
- 243
- Files
- 2
- Last commit
- Nov 1, 2026
- License
- MIT
- Allowed tools
- 7
What does the conventional-git skill do?
conventional-git enforces standardized branch naming, git worktree organization, and commit message formats for automated changelogs and SemVer releases.
Summary generated from the skill's SKILL.md.
About the conventional-git skill
Maintaining standardized git history and automated release cycles is what this skill enables for developers using Claude Code or Codex. It enforces Conventional Commits v1.0.0 standards across branch names, worktree organization, and commit messages to ensure that changelogs are parseable and Semantic Versioning bumps occur correctly. An agent should load this skill when a user needs to create new branches, manage local worktrees, or write commit messages that trigger automatic issue closing in GitHub or GitLab.
The skill relies on the git binary and provides specific formatting rules for different commit types like feat, fix, and refactor. It manages local checkout directories by directing worktrees to be placed under a specific hidden folder and ensures names are transformed to avoid illegal characters. By following these strict patterns, the tool produces a clean, machine-readable history that supports automated major, minor, and patch versioning without manual intervention.
What an agent can do with it
- 1Standardize branch and worktree namingCreate a new git worktree following the required directory structure and naming conventions.
- 2Generate SemVer compliant commitsWrite a commit message that correctly identifies a breaking change to trigger a major version bump.
- 3Automate issue resolutionFormat a commit footer so that a specific GitHub or GitLab issue is automatically closed upon merging.
- 4Maintain clean git historyReview a proposed commit message to ensure it follows imperative mood and character limits.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the conventional-git skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the conventional-git skill in Claude Code
~/.claude/skills/conventional-git/SKILL.md
$ npx degit samber/cc-skills/skills/conventional-git ~/.claude/skills/conventional-gitInstall the conventional-git skill in Claude Code (project)
.claude/skills/conventional-git/SKILL.md
$ npx degit samber/cc-skills/skills/conventional-git .claude/skills/conventional-gitInstall the conventional-git skill in Codex
~/.agents/skills/conventional-git/SKILL.md
$ npx degit samber/cc-skills/skills/conventional-git ~/.agents/skills/conventional-gitInstall the conventional-git skill in Gemini CLI
~/.gemini/skills/conventional-git/SKILL.md
$ npx degit samber/cc-skills/skills/conventional-git ~/.gemini/skills/conventional-gitInstall the conventional-git skill in Claude.ai
npx degit samber/cc-skills/skills/conventional-git conventional-git && zip -r conventional-git.zip conventional-git # claude.ai → Customize → Skills → + → Create skill → Upload a skill → conventional-git.zip
Automated checks
Ran Nov 15, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work
- Source repository linked and reachablesamber/cc-skills/skills/conventional-git is public and reachablegithub.com/samber/cc-skills/tree/HEAD/skills/conventional-gi ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit 2026-11-01github.com/samber/cc-skills/commits ↗Pass
- No download-and-run or credential theft in scriptsNo scripts in the skill folderPass
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/samber/cc-skills/blob/HEAD/skills/conventional-gi ↗Pass
- Pre-approved tools are scopedPre-approved: Read, Edit, Write, Glob, Grep, Bash(git:*), …github.com/samber/cc-skills/blob/HEAD/skills/conventional-gi ↗Pass
- SKILL.md follows the Agent Skills formatValid name and description; says when to use it; 166 linesgithub.com/samber/cc-skills/blob/HEAD/skills/conventional-gi ↗Pass
SKILL.md
View on GitHubConventional Commits & Branch Naming
Follow Conventional Commits v1.0.0 for both branch names and commit messages — consistent naming lets tools auto-generate changelogs, enforce SemVer bumps, and filter history by concern.
Branch Naming
Format: <type>/[issue-]<description> — lowercase, hyphens only, no special chars except /.
feat/user-authentication
feat/42-user-authentication
fix/login-race-condition
fix/87-login-race-condition
docs/api-reference-update
refactor/payment-module
Prefix with the issue number when one exists — GitHub and GitLab auto-link it and it makes git log immediately traceable to the tracker. Keep the description under 50 characters — most git UIs truncate branch names in lists around that length. Match the type to the work you're doing — this is the contract readers use to understand the branch purpose at a glance.
NEVER include worktree in a branch name — git worktrees are a local checkout mechanism, not a branch concept; the name would leak implementation details into the remote and confuse other contributors.
Worktree Naming
Worktrees are local checkout directories — they never appear in the remote. Place them under .claude/worktrees/ and name them by replacing the branch / separator with -.
git worktree add .claude/worktrees/feat-user-authentication feat/user-authentication
git worktree add .claude/worktrees/fix-87-login-race-condition fix/87-login-race-condition
The directory name mirrors the branch name so git worktree list stays readable and each worktree is immediately traceable to its branch without inspecting the checkout. Run git worktree list before creating a new one — reuse an existing worktree if it already covers the same branch.
Keep worktrees scoped to a single branch. Doing unrelated work inside someone else's worktree obscures which changes belong where and makes cleanup error-prone.
Remove the worktree once its branch is merged — either after a local merge or after the pull/merge request is closed on the remote. Stale worktrees accumulate and make git worktree list unreadable.
git worktree remove .claude/worktrees/feat-user-authentication # branch merged locally
git worktree prune # remove refs to already-deleted directories
Commit Message Format
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Types:
| Type | SemVer | When |
|---|---|---|
feat |
MINOR | New feature |
fix |
PATCH | Bug fix |
docs |
— | Docs only |
style |
— | Formatting, no logic change |
refactor |
— | Restructure, no feature/fix |
perf |
— | Performance improvement |
test |
— | Add/fix tests |
build |
— | Build system, deps |
ci |
— | CI config |
chore |
— | Anything else (not src/test) |
revert |
— | Reverts a previous commit |
Rules:
- Subject line ≤ 72 characters — git log and GitHub/GitLab UIs silently truncate longer subjects
- Imperative mood: "add" not "added" — reads as an instruction, not a history log
- No capital letter, no trailing period — enforces uniform parsing by changelog tools
- Body separated by blank line — parsers split header/body at the first blank line
- Breaking changes: use
!after type/scope, or addBREAKING CHANGE:footer (triggers MAJOR bump) — body-only descriptions are invisible to changelog tools revertcommits SHOULD includeThis reverts commit <hash>.in the body —git revertgenerates this automatically; don't strip it- NEVER add a Claude signature, AI agent attribution, or
Co-authored-bytrailer for Claude or any other AI agent to commits
Examples:
feat(auth): add JWT token refresh
fix: prevent race condition on concurrent requests
Introduce request ID and reference to latest request.
Dismiss responses from stale requests.
refactor!: drop support for Go 1.18
BREAKING CHANGE: Go 1.18 no longer supported; uses stdlib APIs from 1.21+
Closing Issues via Commit Messages
Both GitHub and GitLab detect keywords in commit messages and automatically close the referenced issue when the commit lands on the default branch. Place the reference in the footer (preferred — keeps the subject line clean).
Keywords: close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved — case-insensitive.
GitHub:
fix(auth): prevent token expiry race condition
Closes #42
Closes owner/repo#99
- Triggers when merged into the default branch (usually
main) - Cross-repo:
Closes owner/repo#42 - Close multiple:
Closes #42, closes #43 - Works in PR descriptions too
GitLab:
feat: add dark mode support
Resolves #101
Closes group/project#42
- Triggers when merged into the default branch (configurable per project)
- Cross-project:
Closes group/project#42 - Close multiple:
Closes #101, closes #102 - Works in MR descriptions too
Tip: Pair with the commit type — fix: closing a bug issue, feat: closing a feature request — keeps the changelog semantically coherent.
Common Mistakes
| Mistake | Fix |
|---|---|
feat: Added login page |
feat: add login page — imperative, no capital |
fix: fix bug. |
fix: fix bug — no trailing period |
| Subject over 72 chars | Shorten; move detail to body |
| Breaking change only in body | Add ! or BREAKING CHANGE: footer — tools won't detect body-only |
feat(adding-auth): ... |
feat(auth): ... — scope is a noun, not a verb |
| Closes #42 in subject line | Move to footer — keeps subject clean and parseable |
Best Practices
- Align branch type and commit type —
feat/auth-*branch →feat(auth):commits - One concern per branch — mixing fixes into feature branches obscures the changelog
- Use scope consistently within a branch —
feat(auth):throughout, notfeat(user):mid-way - Squash merge: when squash-merging a PR/MR, the branch commits are collapsed into one — the PR/MR title becomes the commit message. If the title doesn't follow conventional commits format, changelog generation breaks silently. Always set the PR title before squashing.
Files in this skill
2conventional-git skill questions
How do I install the conventional-git skill in Claude Code?
Run npx degit samber/cc-skills/skills/conventional-git ~/.claude/skills/conventional-git. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the conventional-git skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
How should I name git worktrees?
Place worktrees under .claude/worktrees/ and replace the branch's forward slash with a hyphen to ensure the directory name mirrors the branch.
What is the correct format for a commit message subject line?
The subject line should be 72 characters or less, use the imperative mood (e.g., 'add' instead of 'added'), and contain no capital letters or trailing periods.
How can I trigger a breaking change in the versioning?
You can signal a breaking change by adding an exclamation mark after the type/scope or by including a 'BREAKING CHANGE:' footer in the commit message.
How do I automatically close issues in GitHub or GitLab using commits?
Include keywords like 'close', 'fix', or 'resolve' followed by the issue number in the commit footer.