$npx -y skills add sordi-ai/skill-everything --skill git-conventionsApply when committing, branching, or opening a pull request. Conventional commit format, branch naming, PR scope.
| 1 | # Sub-Skill: Git & Workflow Conventions |
| 2 | <!-- target: ~650 tokens (real tiktoken count) | 15 rules --> |
| 3 | |
| 4 | **Purpose:** Consistent commit history, clean branches, no merge conflicts through discipline. |
| 5 | Rules that work in teams of 2–20 developers. |
| 6 | |
| 7 | --- |
| 8 | |
| 9 | ## Rules |
| 10 | |
| 11 | ### Commit Messages (Conventional Commits) |
| 12 | |
| 13 | 1. **Format:** `<type>(<scope>): <description>` — always lowercase, no period at the end. |
| 14 | - Types: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`, `perf`, `ci` |
| 15 | - Example: `feat(auth): add JWT refresh token rotation` |
| 16 | 2. **Description in imperative mood.** `add feature` not `added feature` or `adds feature`. |
| 17 | 3. **Scope is the affected module name.** `fix(user-service): handle null email` — not `fix(backend)`. |
| 18 | 4. **Mark breaking changes with `!`.** `feat(api)!: remove deprecated v1 endpoints` |
| 19 | 5. **Body for non-obvious changes.** Explains the *why*, not the *what*. |
| 20 | |
| 21 | ### Branching |
| 22 | |
| 23 | 6. **Branch names:** `<type>/<ticket-id>-<short-description>` — e.g. `feat/PROJ-123-user-export`. |
| 24 | 7. **Feature branches live max. 2 days.** Longer → rebase daily onto `main`. |
| 25 | 8. **No direct push to `main` or `develop`.** Always through a pull request. |
| 26 | 9. **Delete branch before PR merge.** Clean up merged branches from remote. |
| 27 | |
| 28 | ### Pull Requests |
| 29 | |
| 30 | 10. **PR title = commit message of the squash commit.** Consistency between PR and git log. |
| 31 | 11. **Max. 400 lines diff per PR.** Larger → split. Reviewers cannot meaningfully review more than 400 lines. |
| 32 | 12. **Self-review before opening a PR.** Read through once yourself, fix obvious mistakes. |
| 33 | |
| 34 | ### Merge Strategy |
| 35 | |
| 36 | 13. **Squash-merge for feature branches.** Clean linear history on `main`. |
| 37 | 14. **Merge commit for release branches.** So release points remain visible. |
| 38 | 15. **`git rebase -i` before PR for clean commits.** Squash WIP commits together. |
| 39 | |
| 40 | --- |
| 41 | |
| 42 | ## Why This Sub-Skill Earns Stars |
| 43 | |
| 44 | The agent automatically creates correct commit messages and branch names. |
| 45 | No manual corrections, no discussions in review about formatting. |