git-workflow-designer

from eddiebe147/claude-settings

No description

6 stars1 forksUpdated Jan 22, 2026
npx skills add https://github.com/eddiebe147/claude-settings --skill git-workflow-designer

SKILL.md

Git Workflow Designer Skill

Overview

This skill helps you design and implement effective Git branching strategies for teams of any size. Covers Git Flow, GitHub Flow, trunk-based development, release management, and branch protection policies.

Workflow Selection Philosophy

Key Factors

  1. Team size: Solo vs. small team vs. large organization
  2. Release frequency: Continuous vs. scheduled releases
  3. Environment complexity: Single vs. multiple deployment targets
  4. Risk tolerance: Move fast vs. stability first

Workflow Comparison

WorkflowBest ForRelease FrequencyComplexity
Trunk-BasedSmall teams, CI/CDContinuousLow
GitHub FlowMost web appsOn-demandLow
Git FlowVersioned softwareScheduledHigh
GitLab FlowEnvironment-basedMixedMedium

GitHub Flow (Recommended for Most)

Overview

Simple, effective workflow for continuous deployment.

main ─────●─────●─────●─────●─────●─────●
            \       /   \       /
feature/x    ●─────●     ●─────●

Process

  1. Branch from main

    git checkout main
    git pull origin main
    git checkout -b feature/user-authentication
    
  2. Commit regularly

    git add .
    git commit -m "feat: add login form component"
    
  3. Push and create PR

    git push -u origin feature/user-authentication
    gh pr create --title "Add user authentication" --body "..."
    
  4. Review and merge

    • CI runs tests
    • Peer review
    • Squash merge to main
  5. Deploy

    • Automatic deploy on merge to main

Branch Naming Convention

feature/  - New features
fix/      - Bug fixes
docs/     - Documentation
refactor/ - Code refactoring
test/     - Test additions
chore/    - Maintenance tasks

Configuration

# .github/branch-protection.yml (pseudo-config)
main:
  required_status_checks:
    strict: true
    contexts:
      - "ci/tests"
      - "ci/lint"
      - "ci/build"
  required_pull_request_reviews:
    required_approving_review_count: 1
    dismiss_stale_reviews: true
  enforce_admins: false
  restrictions: null

Git Flow (For Versioned Releases)

Overview

Structured workflow for scheduled release cycles.

main     ─────●─────────────────●─────────────●
               \               /               \
release         ●─────●─────●─                  ●───
                 \     \   /                   /
develop   ●─────●─●─────●─●─────●─────●─────●─●
            \   /   \       /     \       /
feature      ●─●     ●─────●       ●─────●

Branches

BranchPurposeMerges To
mainProduction-ready code-
developIntegration branchmain
feature/*New featuresdevelop
release/*Release preparationmain, develop
hotfix/*Emergency fixesmain, develop

Feature Development

# Start feature
git checkout develop
git pull origin develop
git checkout -b feature/new-dashboard

# Work on feature
git commit -m "feat: add dashboard layout"
git commit -m "feat: add dashboard charts"

# Complete feature
git checkout develop
git merge --no-ff feature/new-dashboard
git branch -d feature/new-dashboard
git push origin develop

Release Process

# Start release
git checkout develop
git checkout -b release/1.2.0

# Bump version
npm version 1.2.0 --no-git-tag-version
git commit -am "chore: bump version to 1.2.0"

# Fix release issues
git commit -m "fix: correct typo in release notes"

# Complete release
git checkout main
git merge --no-ff release/1.2.0
git tag -a v1.2.0 -m "Release 1.2.0"
git push origin main --tags

git checkout develop
git merge --no-ff release/1.2.0
git push origin develop

git branch -d release/1.2.0

Hotfix Process

# Start hotfix
git checkout main
git checkout -b hotfix/1.2.1

# Fix the issue
git commit -m "fix: critical security vulnerability"

# Complete hotfix
git checkout main
git merge --no-ff hotfix/1.2.1
git tag -a v1.2.1 -m "Hotfix 1.2.1"
git push origin main --tags

git checkout develop
git merge --no-ff hotfix/1.2.1
git push origin develop

git branch -d hotfix/1.2.1

Trunk-Based Development

Overview

Everyone commits to main with short-lived branches.

main ─●─●─●─●─●─●─●─●─●─●─●─●─●─●─●─●
        \─/   \─/       \─/
        PR    PR        PR

Principles

  1. Short-lived branches (< 1 day)
  2. Small, frequent commits
  3. Feature flags for incomplete work
  4. Comprehensive CI/CD

Feature Flags Integration

// src/lib/features.ts
export const features = {
  newCheckout: process.env.FEATURE_NEW_CHECKOUT === 'true',
  darkMode: process.env.FEATURE_DARK_MODE === 'true',
};

// Usage
if (features.newCheckout) {
  return <NewCheckout />;
}
return <OldCheckout />;

Branch Rules

# Quick feature (< 4 hours)
gi

...
Read full content

Repository Stats

Stars6
Forks1