Loading...
Loading...
Automated git workflow helpers for common development tasks like creating feature branches, cleaning up merged branches, and interactive rebasing. Use when the user mentions git branching, branch cleanup, feature workflow, or git automation. No prerequisites required - uses native git commands.
npx skill4agent add jakenuts/agent-skills git-workflow# Interactive: prompts for feature name
cd /path/to/repo
bash ~/.claude/skills/git-workflow/scripts/create-feature-branch.sh
# Non-interactive: specify feature name
bash ~/.claude/skills/git-workflow/scripts/create-feature-branch.sh "add-user-auth"
# Creates: feature/add-user-authcd /path/to/repo
# Preview what would be deleted (dry run)
bash ~/.claude/skills/git-workflow/scripts/cleanup-merged-branches.sh --dry-run
# Actually delete merged branches
bash ~/.claude/skills/git-workflow/scripts/cleanup-merged-branches.sh
# Force cleanup (skip confirmations)
bash ~/.claude/skills/git-workflow/scripts/cleanup-merged-branches.sh --forcecd /path/to/repo
# Rebase last 3 commits
bash ~/.claude/skills/git-workflow/scripts/interactive-rebase.sh 3
# Rebase since a specific commit
bash ~/.claude/skills/git-workflow/scripts/interactive-rebase.sh abc123
# Rebase onto main
bash ~/.claude/skills/git-workflow/scripts/interactive-rebase.sh mainscripts/| Script | Purpose | Usage |
|---|---|---|
| Create feature branches with naming conventions | |
| Clean up merged branches | |
| Interactive rebase helper | |
# 1. Ensure main is up to date
git checkout main
git pull origin main
# 2. Create feature branch
bash ~/.claude/skills/git-workflow/scripts/create-feature-branch.sh "user-authentication"
# 3. Work on feature...
# (make commits)
# 4. Push when ready
git push -u origin feature/user-authentication# 1. Update main branch
git checkout main
git pull origin main
# 2. Preview what will be deleted
bash ~/.claude/skills/git-workflow/scripts/cleanup-merged-branches.sh --dry-run
# 3. Clean up merged branches
bash ~/.claude/skills/git-workflow/scripts/cleanup-merged-branches.sh# Squash last 5 commits into one
bash ~/.claude/skills/git-workflow/scripts/interactive-rebase.sh 5
# In the editor that opens:
# - Change 'pick' to 'squash' (or 's') for commits 2-5
# - Keep first commit as 'pick'
# - Save and close
# Then edit the combined commit message