git-conventions
Skill1 starsChanged 23 days agoApache-2.0View on GitHub
Use when the user asks to commit, stage, branch, diff, write a commit message, or perform any git operation, and when the user asks to describe or summarise a change for review, such as a merge request or pull request description (MR, PR). Also use when discussing version control workflows or git safety.
- Commits and pushes
18 other projects use a version of this.
Adopted by
Most recently taken up by
- gerardbalaoro/skillstheir own version, first seen Nov 1, 2026
- emanueledenaro/claude-skillstheir own version, first seen Oct 15, 2026
- MusserLab/lab-claude-skillstheir own version, first seen Oct 13, 2026
- Mushfiqur-Rahman-Robin/coding-rulestheir own version, first seen Oct 13, 2026
- a-novel-kit/stacktheir own version, first seen Oct 13, 2026
- peterknezek/skillstheir own version, first seen Oct 9, 2026
Used with
Projects with it also use simplify, writing-for-agents and 3 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 FaceSkillsimplify
Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.
Also in 3 projects that use this
MicrosoftSkillwriting-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
NVIDIASkilltesting
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
SentrySkillsecurity-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
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- werf/werf★ 4.7ksame name
- LedgerHQ/ledger-live★ 627same name
- deadlock-mod-manager/deadlock-mod-manager★ 584same name
- rloisell/rl-agents-n-skills★ 8same name
- Stormix/transcripts-mcp★ 8same name
- lossless-group/lossless-agent-skills★ 4same name
- metraton/gaia★ 4same name
- MusserLab/lab-claude-skills★ 4same name
- sefaertunc/Worclaude★ 4same name
- a-novel-kit/stack★ 2same name
8 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- bias-analysisSkill
- c4-graphSkill
- code-reviewSkill
- create-grafana-dashboardsSkill
- debugSkill
- evidence-based-analysisSkill
- planSkill
- retroSkill
- skillSkill
- software-engineerSkill
- tddSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 54
Before committing, the code must compile and tests must pass, none failing or ignored.
- Distinctive: line 58
Never amend to modify files: add a fix commit and explain the reason.
- Distinctive: line 59
Use git freely when checking differences with the previous version.
- Very specific: line 60
Commit each task as soon as its tests pass with assertions and coverage is checked.
- Distinctive: line 95
Always add a body for: breaking changes, security fixes, data migrations, and reverts.
- Very specific: line 98
Never in a commit message: "this commit does", "I", "we", "now", "currently", "as requested by" (use a Co-authored-by trailer), AI …
- Distinctive: line 124
When asked to describe a change for review, whatever the forge calls it (merge request, pull request):
- Distinctive: line 127
Write the description to a file.
“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.
Files
Git Conventions
When to use
- User asks to commit, stage, diff, or perform any git operation
- User asks to create a branch or write a commit message
- User asks to check differences with a previous version
- User asks to describe or summarise a change for review (merge request, pull request)
- User mentions "git", "commit", "branch", "diff", "MR", "PR", or "version control"
- A task is green and ready to commit, in any context, headless included
Overview
Rules for safe and consistent git usage, from the commit to the change description.
Reviewing code or answering review feedback is the
code-review skill. Forge commands live in its
gitlab.md (glab) and github.md
(gh) reference files.
Forge routing
Pick the forge CLI (gh or glab) in this order. Never guess.
- An explicit argument or user statement wins. A project path or URL names the forge.
- Otherwise read
git remote get-url origin. Hostgithub.comroutes togh; host containinggitlabroutes toglab. - Unknown host: check
gh auth statusandglab auth statusfor a matching configured host. Still ambiguous: ask the user.
Missing origin remote: ask the user.
Git versus forge
git owns local state. The forge CLI owns everything on the server.
| Operation | Tool |
| stage, commit, branch, local diff, log, worktree | git only |
| push | git push — command rules below unchanged |
| MR/PR create, description, edit | forge CLI — never a clipboard; assign me, pick the reviewer from the change (rule in the forge file) |
| MR/PR diff for review | forge CLI — local git diff only for uncommitted work |
| threads, approvals, merge, CI status | forge CLI only |
| rebase / branch update of a pushed MR/PR branch | forge CLI only — never local rebase plus force-push |
Concrete lifecycle commands per forge: gitlab.md (GitLab, glab) and
github.md (GitHub, gh).
Rules
Before committing, the code must compile and tests must pass, none failing or ignored.
- Push only when the user asks for it in the current turn. Never push on your own after a commit. Push the current branch to its upstream, never to
masterormaindirectly. - Never use
--force. - Never amend to modify files: add a fix commit and explain the reason.
- Use git freely when checking differences with the previous version.
- Commit each task as soon as its tests pass with assertions and coverage is checked. A headless or delegated run commits on its own: the commit is the user's ask, not a question for them (
plan). - Stage by path:
git add <file> <file>, nevergit add -Aorgit add .. Rungit statusfirst; status, add, and commit fit one shell call (git status --short && git add <files> && git commit -m "<subject>"). Generated files (__pycache__, build output, caches) are never staged; add a.gitignoreentry when the project lacks one.
Commit message
Short and exact. Why over what: the diff already says what changed.
Subject
<type>(<scope>): <imperative summary>, scope optional.
Types:
feat:for featurefix:when fixing the codebaserefac:for refactoring, mostly to prepare or finish a featchore:to cleanup the codebase, removing dead codedocs:when touching .md files or documentationtest:when touching test onlyperf:for a measured performance changebuild:orci:for build tooling or pipeline changesrevert:when reverting a prior commit
Rules: imperative mood ("add", "fix", "remove", never "added" or "adds"), 50 characters
when possible and 72 at most, no trailing period, no restating the file name when the
scope already says it. Match the project convention for capitalisation after the colon.
One commit per slice: the subject names the behaviour that now works, never the layer
touched (plan).
Body
Skip it when the subject is self-explanatory. Add one only for a non-obvious why, a
breaking change, migration notes, or linked issues. Wrap at 72 characters, bullets with
-, issue references last (Closes #42, Refs #17).
Always add a body for: breaking changes, security fixes, data migrations, and reverts. Future debuggers need the context.
Never in a commit message: "this commit does", "I", "we", "now", "currently", "as
requested by" (use a Co-authored-by trailer), AI attribution, emoji unless the project
convention requires it.
Examples:
- Not:
feat: added a new option so that users can export their invoices as CSV files - Yes:
feat(export): add --format csv to invoice export Finance imports invoices into a spreadsheet each month and currently retypes them from the PDF export. Closes #214 - Breaking change:
refac(config)!: read settings from ni.toml instead of ni.json BREAKING CHANGE: ni.json is no longer read. Rename it to ni.toml and convert the keys; startup fails with a pointer to the new file.
Change description
When asked to describe a change for review, whatever the forge calls it (merge request, pull request):
- Write the description to a file. The body carries four parts, in this order:
- Summary, led by the smallest visual that shows the change. A diff hunk, a file tree, a call list, or a Mermaid diagram; one sentence when nothing visual exists.
- Evidence that it works, before and after: test output, a command and its result, a screenshot.
- Reversibility: one-way door (hard to undo: schema change, public contract, data deletion, a release users pin) or two-way door. Then the blast radius in one line: what breaks if it is wrong, who sees it.
- A link to the review checklist in
code-review.
- Route per Forge routing. Create or update the MR/PR from that file with the forge CLI: commands in gitlab.md or github.md.
- Not: "Refactored the export module and fixed some tests."
- Yes: the changed signature's hunk, the test red then green, "two-way door: one caller, Finance sees nothing", the checklist link.
Boundaries
This skill owns git usage, commit messages, forge routing, the git-versus-forge
boundary, and the MR/PR lifecycle files. Review flows, threads, and suggestions
belong to code-review. Never create, read, or store
forge tokens.
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
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.

