git-practices
Skill14 starsChanged 8 months agoMITView on GitHub
Git conventions for branches, commits, and pull requests. Load this skill whenever creating branches, writing commit messages, or opening PRs. Trigger on any git workflow operation — commits, branches, pull requests, or merge operations.
- Reads credentials
- Commits and pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- pablopetr/claude-skillstheir own version, first seen Oct 25, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- pablopetr/claude-skills★ 0same name
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 repository50 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adr-conventionSkill
- architecture-vocabularySkill
- backlog-externalSkill
- backlog-localSkill
- backlogSkill
- checkpointsSkill
- design-principlesSkill
- domain-glossarySkill
- grounded-claimsSkill
- knowledge-checkSkill
- policy-riskSkill
- positive-framingSkill
- receiving-code-reviewSkill
- skill-authoringSkill
- skill-awarenessSkill
- subagent-driven-developmentSkill
- test-driven-developmentSkill
- token-efficientSkill
- triageSkill
- verification-before-completionSkill
- workflow-bugSkill
- workflow-checkSkill
- workflow-commitSkill
- workflow-contractsSkill
- workflow-debugSkill
- workflow-decisionsSkill
- workflow-docsSkill
- workflow-doctorSkill
- workflow-epicSkill
- workflow-featureSkill
- workflow-flow-fix-pipelineSkill
- workflow-flowSkill
- workflow-grillSkill
- workflow-handoffSkill
- workflow-ideaSkill
- workflow-implementSkill
- workflow-planSkill
- workflow-proposalSkill
- workflow-prSkill
- workflow-refineSkill
- workflow-researchSkill
- workflow-reviewSkill
- workflow-startSkill
- workflow-statusSkill
- workflow-tech-reviewSkill
- workflow-update-workflowSkill
- workflow-validateSkill
- workflow-worktreeSkill
- workflow-yoloSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
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 32
No descriptions in branch name — the ticket ID is the reference
- Distinctive: line 55
Keep it concise — enough context for someone reading git log, not a full essay
- Distinctive: line 102
No co-author or AI attribution lines
- Distinctive: line 167
No screenshots unless the change is visual (then they're encouraged)
- Distinctive: line 184
When in doubt about the commit/branch type:
- Very specific: line 195
If a commit includes both a feature and its tests, use feat — the tests support the feature.
- Very specific: line 231
Creating, removing, listing, migrating: use /virtual-team:worktree — it owns the exact steps for each host.
- Distinctive: line 234
Always create worktrees from the main checkout (not from inside another worktree)
- Distinctive: line 237
Remove worktrees after the PR is merged to keep the directory clean
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git Practices
These are the conventions for all git operations in this project. Every branch, commit, and pull request follows these rules without exception.
Branch Naming
Format: <type>/<ticket-id>
Types:
feat— New feature or capabilityfix— Bug fixrefactor— Code restructuring without behavior changechore— Maintenance, tooling, config, dependencies
Examples:
feat/CTR-12
fix/CTR-45
refactor/CTR-78
chore/CTR-99Rules:
- Ticket ID matches the project tracker (JIRA, Linear, etc.)
- Lowercase everything
- No descriptions in branch name — the ticket ID is the reference
- One branch per ticket — don't combine work from multiple tickets
Commit Messages
Format:
<type>(<scope>): <short message> [<ticket-id>]
<description>Line 1 (subject):
type— Same as branch types, plus:docs(documentation),test(tests only)scope— One word indicating the module or layer affected (e.g.,auth,api,database,ui,config)short message— Imperative mood, lowercase, no period, under 50 characters after the scopeticket-id— In square brackets at the end
Line 2: Blank line (always)
Line 3+ (description):
- What was done and why, in plain sentences
- Reference related files or decisions if helpful
- Keep it concise — enough context for someone reading git log, not a full essay
Examples:
feat(document): implement search by text [CTR-12]
Added full-text search to the document module using the existing
search index. Follows the pattern established in the user search
feature.fix(auth): prevent token refresh race condition [CTR-45]
Two concurrent requests could both trigger a token refresh,
causing one to fail with an invalid token error. Added a mutex
to ensure only one refresh happens at a time.refactor(api): extract validation middleware [CTR-78]
Moved request validation logic from individual route handlers
into a shared middleware. Reduces duplication across 12 endpoints.chore(config): update dependencies to latest stable [CTR-99]
Bumped all non-major dependencies. No breaking changes detected.test(billing): add edge cases for prorated charges [CTR-33]
Covers: mid-cycle upgrade, downgrade on last day, zero-usage
month, and negative balance scenarios.docs(api): update endpoint documentation for v2 routes [CTR-55]
Reflects the new response format introduced in the API v2 migration.Rules:
- Subject line is mandatory, description is mandatory for anything beyond trivial changes
- No co-author or AI attribution lines
- One logical change per commit — if you have to use "and" in the subject, consider splitting
- The type in the commit matches the branch type (a
feat/branch should havefeat()commits, with occasionaltest()ordocs()commits for supporting work)
Pull Requests
Title format: Same as commit subject line:
<type>(<scope>): <short message> [<ticket-id>]Body format:
## Summary
[2-4 sentences: what this PR does and why. Written for a reviewer
who hasn't read the ticket — they should understand the change
from this summary alone.]
## Changes
- [Concrete change 1 — what file/module and what was done]
- [Concrete change 2]
- [Concrete change 3]
## Testing
- [How this was verified — tests added, manual testing done]
- [Specific scenarios tested]
- [Edge cases covered]
## Ticket
[TICKET-ID](link to ticket if available)Examples:
Title: feat(document): implement search by text [CTR-12]
Body:
## Summary
Adds full-text search to the document module, allowing users to
search documents by content rather than just title. Uses the existing
search index infrastructure established in user search.
## Changes
- Added search endpoint `GET /api/documents/search` with query parameter
- Created `DocumentSearchService` following the `UserSearchService` pattern
- Added search result highlighting in the response
- Added 8 unit tests covering: exact match, partial match, no results,
special characters, pagination, and sorting
## Testing
- Unit tests pass: `npm run test -- documents`
- Manual testing: verified search returns expected results with 500+ documents
- Tested edge cases: empty query, very long query, special characters
## Ticket
[CTR-12](https://tracker.example.com/CTR-12)Rules:
- PR title follows the exact same format as commit messages
- Summary explains the WHY, changes list the WHAT
- Testing section is mandatory — no PRs without describing how it was verified
- One ticket per PR — don't bundle unrelated work
- Link the ticket if possible
- No screenshots unless the change is visual (then they're encouraged)
Tool
Pull requests are created with the GitHub CLI (gh):
gh pr create --title "<title>" --body "<body>"For drafts:
gh pr create --draft --title "<title>" --body "<body>"Determining the Type
When in doubt about the commit/branch type:
| If the change... | Type |
| Adds a new user-facing capability | feat |
| Fixes something that was broken | fix |
| Changes code structure without changing behavior | refactor |
| Updates build, CI, deps, config, tooling | chore |
| Only adds or updates documentation | docs |
| Only adds or updates tests | test |
If a commit includes both a feature and its tests, use feat — the tests support the feature. If a commit is purely adding missing tests for existing code, use test.
Determining the Scope
The scope should be a single word identifying the affected module or layer. Use names that match your project's directory structure or domain concepts:
Examples of good scopes:
auth,api,database,ui,config,billing,search,notificationsuser,document,task,project,team
Avoid:
- Generic scopes:
app,code,misc,stuff - Multi-word scopes:
user-profile(useuserorprofile) - File names as scopes:
userService(useuser)
Git Worktrees
We use git worktrees instead of switching branches. Each branch lives in its own directory inside the repo, allowing parallel work across multiple features.
Folder convention:
my-repo/ ← main checkout, always on the default branch
.claude/worktrees/ ← worktree directory (git-ignored)
feat-CTR-12/ ← one worktree per branch: branch name with "/" → "-"
fix-CTR-45/- Directory name: the branch name with
/replaced by-(feat/CTR-12→feat-CTR-12). Only letters, digits,.,_and-; max 64 chars. - Branch name: unchanged,
<type>/<ticket-id>(see Branch Naming). - Ignored:
.claude/worktrees/must be in the repo's.gitignore, or the main checkout sees every worktree as untracked files. - Local files: untracked files a worktree needs to run (e.g.
.env) are listed instack.mdunderworktree_copy:and copied from the main checkout when the worktree is created:worktree_copy: - .env
Creating, removing, listing, migrating: use /virtual-team:worktree — it owns the exact steps for each host.
Rules:
- Always create worktrees from the main checkout (not from inside another worktree)
- Branch name follows the Branch Naming convention above:
<type>/<ticket-id> - One worktree per ticket — matches one-branch-per-ticket rule
- Remove worktrees after the PR is merged to keep the directory clean
- The main checkout always stays on the default branch (main/master) — never switch branches, stash, pull or edit there while working in a worktree
Story Groups
Stories within a feature can be grouped into execution tracks using backlog tags.
Backlog format with groups:
- [ ] S-010: Create user model | feature:FEAT-005 | group:1 | order:1 | service:be
- [ ] S-011: Add user API endpoints | feature:FEAT-005 | group:1 | order:2 | service:be
- [ ] S-012: Add user validation | feature:FEAT-005 | group:1 | order:3 | service:be
- [ ] S-013: User profile page | feature:FEAT-005 | group:2 | order:1 | service:fe
- [ ] S-014: User settings page | feature:FEAT-005 | group:2 | order:2 | service:feTags:
feature:FEAT-NNN— parent featuregroup:N— execution group. Stories in the same group are sequential and go on one branch.order:N— execution order within the group. Processed in ascending order.service:xx— which service/repo
Branch naming for groups:
- Feature with multiple stories → branch:
feat/FEAT-005(feature ID, not story ID) - Single-story work → branch:
feat/S-010(story ID)
Group flow:
/virtual-team:implement FEAT-005picks the first ready story, implements all stories sequentially/virtual-team:prmarks all stories as Done in one commit
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

