Skip to content
Back to skills

Common Git Collaboration

ASecurity

Enforce version control best practices for commits, branching, pull requests, and repository security. Use when writing commits, creating branches, merging, or opening pull requests.

  • 549 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 6, 2026
developmentgitsecurity

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned June 6, 2026

npx -y skills add HoangNguyen0403/agent-skills-standard --skill common-git-collaboration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Common Git Collaboration?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Common Git Collaboration
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hoangnguyen0403-common-git-collaboration/badge)](https://www.skillsdirectory.com/skills/hoangnguyen0403-common-git-collaboration)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: common-git-collaboration
description: Enforce version control best practices for commits, branching, pull requests, and repository security. Use when writing commits, creating branches, merging, or opening pull requests.
metadata:
  triggers:
    keywords:
    - commit
    - branch
    - merge
    - pull-request
    - git
---
# Git & Collaboration

## **Priority: P0 (OPERATIONAL)**

## 1. Write Conventional Commits

- Format: `<type>(<scope>): <description>` (e.g., `feat(auth): add login validation`).
- Types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`.
- Use imperative mood: "add feature" not "added feature".
- One commit = one logical change — no mega-commits.

See [implementation examples](references/implementation.md) for conventional commit examples.

## 2. Manage Branches

- Name with prefixes: `feat/`, `fix/`, `hotfix/`, `refactor/`, `docs/`.
- Create new branch for every task to keep main stable and deployable.
- Never push directly to `main` or `develop` — use Pull Requests.
- Pull before you push to resolve conflicts locally.
- Prefer `git rebase` over merge for linear history on feature branches.
- Use `git rebase -i` to squash messy commits before pushing.

## 3. Submit Quality Pull Requests

- Limit to < 300 lines of code for effective review.
- State what changed, why, and how to test. Link issues (`Closes #123`).
- Self-review for obvious errors before requesting peers.
- PRs must pass all CI checks (lint, test, build) before merging.

## 4. Protect Secrets and Metadata

- Never commit `.env`, keys, or certificates — use `.gitignore` strictly.
- Use `husky` or `lefthook` for local Git Hooks enforcement.
- Tag releases with SemVer (`vX.Y.Z`) and update `CHANGELOG.md`.

## Anti-Patterns

- **No direct push to main**: All changes via PR, no exceptions.
- **No mega-commits**: One commit = one logical change. Split large ones.
- **No secrets in history**: Use `git filter-repo` to purge; rotate secret.

## References

- [Clean Linear History & Rebase Examples](references/CLEAN_HISTORY.md)

Files in this skill

  • SKILL.md2 KB
  • references/CLEAN_HISTORY.md850 B
  • references/implementation.md217 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.