agentleFS
emanueledenaroemanueledenaro/claude-skills/git-conventions/SKILL.md

git-conventions

Skill0 starsChanged 36 days agoMITView on GitHub

Default git naming rules for commits, branches, PR titles and merge commit subjects: Conventional Commits 1.0.0 messages, Conventional Branch 1.1.0 names, the merge subject on main, the history and tag rules, and a dependency-free Node validator with a commit-msg hook. Use when writing a commit message, naming a branch, writing a PR title or a merge commit subject, or checking whether a name is valid, also in Italian (messaggio di commit, nome del branch, titolo della PR, nome valido, crea un branch), in any project.

  • Commits and pushes

18 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use simplify, writing-for-agents and 4 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Hugging FaceSkill

    simplify

    Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.

    Also in 3 projects that use this

  • MicrosoftSkill

    writing-for-agents

    Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

    Also in 3 projects that use this

  • NVIDIASkill

    testing

    Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.

    Also in 3 projects that use this

  • SentrySkill

    security-review

    Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.

    Also in 3 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 17 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Only the first line is checked.

    line 15
  2. Very specific:

    No agent-name prefix (claude/, codex/, ai/, copilot/, cursor/) unless the project asks for it, even though the spec allows them.

    line 27
  3. Distinctive:

    No direct push to the main branch: pull requests only.

    line 34
  4. Very specific:

    Before pushing, from the project root (<skill> is the installed folder, ~/.claude/skills/git-conventions):

    line 41
  5. Distinctive:

    Every commit subject, PR title and branch name follows the format above, or the project rule that replaces it is named.

    line 56
  6. Very specific:

    No published history was rewritten and no v* tag was moved or deleted.

    line 58

“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Defaults for how commits, branches, PR titles and merge subjects are named when a project says nothing. The project wins: its AGENTS.md, CONTRIBUTING.md, commitlint config and branch protection come first, and a project rule that differs from a rule below replaces it. Type choice, examples, the merge subjects git writes, the SemVer effect and branch examples are in reference.md: read it when choosing a type or when a case is unclear. The validator and the hook are in check/; check/README.md says how to use them: read it before pushing in a project with no CI of its own, or to check a name.

1. Commits (Conventional Commits 1.0.0)

  • First line: <type>[(scope)][!]: <description>.
  • Types: feat, fix, docs, refactor, test, build, ci, chore, perf, style, revert.
  • Scope is optional and has only lowercase letters, digits and hyphens (app, release).
  • A breaking change has ! after the type or scope, or a BREAKING CHANGE: footer.
  • Description in English, with an imperative verb, saying concretely what changes: add the search palette, not updates or fix stuff.
  • Only the first line is checked. The body is free text.

2. PR titles and merge subjects

  • A PR title has the commit format.
  • The merge commit on the main branch has the PR title followed by the number: feat(app): add the search palette (#123). Replace the subject GitHub proposes (Merge pull request #123 from ...).
  • One exception: a merge that brings main, master or develop into a work branch may keep git's own subject (Merge branch 'main' into ...). Only those three branches, and only on a merge commit.

3. Branches (Conventional Branch 1.1.0)

  • Form <type>/<description>. main, master and develop have no prefix.
  • Types: feature/, bugfix/, hotfix/, chore/, release/. Prefer feature/ to feat/ and bugfix/ to fix/: the spec and the validator accept the short forms, this skill does not recommend them.
  • No agent-name prefix (claude/, codex/, ai/, copilot/, cursor/) unless the project asks for it, even though the spec allows them.
  • Description in English, lowercase, words separated by single hyphens. An issue number is recommended: feature/issue-142-assignment-contract.
  • Forbidden: uppercase, underscores, spaces, double hyphens or double dots, a hyphen or a dot at the start or the end. A dot is allowed only in a version under release/: release/v1.2.0, release/v0.3.0-beta.1.
  • dependabot/... branches skip the name check, not the commit check.

4. Main branch, history and tags

  • No direct push to the main branch: pull requests only.
  • Merge with a merge commit. No squash or rebase unless the project asks for it.
  • Pushed history is append-only: a fix after a push is a new commit, even on your own branch. No amend followed by a push, no --force, no --force-with-lease.
  • Version tags v* are immutable: never moved, never deleted. A wrong version gets a new number.

5. Check

Before pushing, from the project root (<skill> is the installed folder, ~/.claude/skills/git-conventions):

  • node <skill>/check/cli.mjs commit-range origin/main HEAD
  • node <skill>/check/cli.mjs branch-name "$(git branch --show-current)"
  • node <skill>/check/cli.mjs pr-title "<title>" before gh pr create

Exit 0 is valid, 1 is invalid with a message that names the problem and the expected format, 2 is a usage error. A commit-msg hook (check/hooks/commit-msg) checks each message as it is written.

Out of this skill

  • Rules of a single project (allowed scopes, ticket keys, changelog tooling) stay in that project's files.
  • Attribution lines on commits and PRs are decided by the harness, not by this skill.

Done when

  • Every commit subject, PR title and branch name follows the format above, or the project rule that replaces it is named.
  • The merge subject on the main branch is the PR title followed by the number.
  • No published history was rewritten and no v* tag was moved or deleted.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.