skills/developer/git-mastery/branch-strategy-advisor/SKILL.md
Use this skill when discussing Git branching strategies. Activate when the user asks about branch naming, GitFlow, trunk-based development, feature branches, release branches, how to organize branches, branch protection, or setting up a branching workflow for their team.
npx skillsauth add latestaiagents/agent-skills branch-strategy-advisorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Choose and implement the right branching strategy for your team.
| Strategy | Best For | Release Cadence | Team Size | |----------|----------|-----------------|-----------| | Trunk-Based | Continuous deployment, experienced teams | Daily/hourly | Any | | GitHub Flow | SaaS products, simple workflow | On-demand | Small-Medium | | GitFlow | Scheduled releases, multiple versions | Weekly/Monthly | Medium-Large |
Best for: Teams with strong CI/CD, continuous deployment, feature flags.
main ─────●─────●─────●─────●─────●─────●───→
\ / \ / \ /
feature-a ●─● ●─● ●─●
(short-lived, merged within 1-2 days)
main is always deployablefeature/ABC-123-short-description
fix/ABC-456-bug-description
# Start feature
git checkout -b feature/ABC-123-user-auth main
# Keep updated (daily)
git fetch origin
git rebase origin/main
# Merge (same day or next)
git checkout main
git merge --no-ff feature/ABC-123-user-auth
Best for: SaaS products, web apps with continuous deployment.
main ───────●───────●───────●───────●───────→
\ / \ /
●───● ●───●
feature-branch bugfix-branch
(PR) (PR)
main is always deployablemain for any changemain after mergefeature/user-authentication
bugfix/login-redirect-loop
hotfix/security-patch
docs/api-documentation
# Start work
git checkout -b feature/user-authentication main
# Push and create PR
git push -u origin feature/user-authentication
gh pr create --title "Add user authentication"
# After approval
gh pr merge --squash
Best for: Products with scheduled releases, mobile apps, packages.
main ────●─────────────────●─────────────●───→
\ / \
release \───●───●───●─/ \───→
\ /
develop ───●────●───●───●───●───●───●───●───●───→
\ / \ / \ /
feature ●───● ●───● ●───●───●
| Branch | Purpose | Merges To |
|--------|---------|-----------|
| main | Production releases | - |
| develop | Integration branch | release, main |
| feature/* | New features | develop |
| release/* | Release preparation | main, develop |
| hotfix/* | Production fixes | main, develop |
feature/ABC-123-user-dashboard
release/1.2.0
hotfix/1.2.1
# Start feature
git checkout -b feature/ABC-123-dashboard develop
# Finish feature
git checkout develop
git merge --no-ff feature/ABC-123-dashboard
git branch -d feature/ABC-123-dashboard
# Start release
git checkout -b release/1.2.0 develop
# Finish release
git checkout main
git merge --no-ff release/1.2.0
git tag -a v1.2.0
git checkout develop
git merge --no-ff release/1.2.0
<type>/<ticket>-<short-description>
| Type | Usage |
|------|-------|
| feature/ | New functionality |
| fix/ or bugfix/ | Bug fixes |
| hotfix/ | Urgent production fixes |
| release/ | Release preparation |
| docs/ | Documentation |
| refactor/ | Code refactoring |
| test/ | Test additions |
| chore/ | Maintenance |
feature/AUTH-123-oauth-google-login
fix/API-456-null-pointer-exception
hotfix/SEC-789-sql-injection
release/2.1.0
docs/README-setup-instructions
main# GitHub branch protection
- Require pull request reviews (1-2 reviewers)
- Require status checks to pass
- Require branches to be up to date
- Include administrators
- Restrict who can push (CI only)
develop (GitFlow)- Require pull request reviews (1 reviewer)
- Require status checks to pass
- Allow force pushes: NO
gh api repos/{owner}/{repo}/branches/main/protection -X PUT \
-f required_pull_request_reviews='{"required_approving_review_count":1}' \
-f required_status_checks='{"strict":true,"contexts":["ci/test"]}' \
-F enforce_admins=true
developmain insteaddevelopmain branchdevelopment
Test skills for correct activation, content quality, and regression — both automated checks (frontmatter validity, lint) and manual verification (query-suite activation testing). Covers CI integration and how to catch skill regressions before users do. Use this skill when adding skills to a repo, setting up CI for a skill library, or debugging "the skill exists but doesn't work". Activate when: test skills, validate skills, skill CI, skill linting, skill activation test, skill regression.
documentation
Write the YAML frontmatter for a SKILL.md file so it activates reliably — name, description, and activation keywords that the model matches against. Covers length, tone, and the most common frontmatter mistakes. Use this skill when authoring a new skill, fixing a skill that isn't auto-activating, or reviewing skills for publication. Activate when: SKILL.md frontmatter, skill description, skill activation, skill YAML, write a skill, author a skill.
development
Design skills that fire at the right moment — neither over-eager (noise) nor under-eager (silent). Covers activation specificity, trigger phrases, disambiguation between overlapping skills, and debugging activation. Use this skill when multiple skills could fire on the same query, a skill never fires, or a skill fires too often. Activate when: skill won't activate, skill over-activates, overlapping skills, skill triggers, skill selection, skill disambiguation.
development
Structure SKILL.md content so the model reads just enough — concise summary up front, progressively deeper detail, examples on demand. Covers section ordering, length budgets, when to split into multiple skills. Use this skill when writing or refactoring a skill body, one skill has grown too long, or a skill is wordy but not useful. Activate when: SKILL.md structure, skill content, skill too long, split skill, progressive disclosure, skill body.