EliasOulkadi/shokunin / .pack/skills/git-workflow
git-workflow
VerifiedAutomate the complete Git development workflow — create feature branches with conventional naming, atomic commits with conventional commit messages, interactive rebase, squash merges, PR body generation from commit history, branch cleanup, and git worktree patterns. Use when user asks to create a branch, commit changes, make a PR, rebase, squash, clean up branches, or follow a Git workflow. Do NOT use for CI/CD pipeline configuration (use ci-cd), code review (use code-review), or GitHub Actions workflows.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.5 KB |
| references/branch-strategy.md | markdown | 6.6 KB |
| references/git-workflows.md | markdown | 7.1 KB |
| scripts/auto-commit.ps1 | script | 5.5 KB |
| scripts/cleanup-branches.ps1 | script | 3.6 KB |
| scripts/create-feature-branch.ps1 | script | 2.7 KB |
| scripts/pr-body.ps1 | script | 7.4 KB |
scripts/create-feature-branch.ps1
View on GitHub<#
.SYNOPSIS
Creates a feature branch from the latest default branch.
.DESCRIPTION
Detects the default branch (main/master), fetches and updates it,
then creates a new branch with conventional naming: type/description.
.PARAMETER Name
Short kebab-case description of the branch purpose.
.PARAMETER Type
Conventional commit type: feat, fix, docs, refactor, chore, test, style.
.PARAMETER Base
Optional base branch. Defaults to detected default branch.
.EXAMPLE
.\create-feature-branch.ps1 -Name "add-login-form" -Type feat
Creates feat/add-login-form from latest main.
.EXAMPLE
.\create-feature-branch.ps1 -Name "fix-auth-timeout" -Type fix -Base develop
Creates fix/auth-timeout from latest develop.
#>
param(
[Parameter(Mandatory)]
[string]$Name,
[Parameter(Mandatory)]
[ValidateSet('feat', 'fix', 'docs', 'refactor', 'chore', 'test', 'style')]
[string]$Type,
[string]$Base
)
$ErrorActionPreference = 'Stop'
function Get-DefaultBranch {
$branches = @('main', 'master')
foreach ($b in $branches) {
$exists = git show-ref --verify "refs/remotes/origin/$b" 2>$null
if ($exists) { return $b }
}
# fallback: ask remote
$remoteHead = git symbolic-ref refs/remotes/origin/HEAD 2>$null
if ($remoteHead) {
return $remoteHead -replace '^refs/remotes/origin/', ''
}
throw "Could not detect default branch. Specify -Base explicitly."
}
function Confirm-CleanWorkingTree {
$status = git status --porcelain
if ($status) {
Write-Warning "Working tree is not clean. Stash or commit before branching."
$choice = Read-Host "Continue anyway? [y/N]"
if ($choice -ne 'y') { exit 1 }
}
}
function Invoke-Step {
param([string]$Message, [scriptblock]$Block)
Write-Host "==> $Message" -ForegroundColor Cyan
& $Block
if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) {
throw "Step failed: $Message"
}
}
$branchName = "$Type/$Name"
$baseBranch = if ($Base) { $Base } else { Get-DefaultBranch }
$remote = 'origin'
Write-Host "=== Creating branch: $branchName from $baseBranch ===" -ForegroundColor Green
Confirm-CleanWorkingTree
Invoke-Step "Fetching latest from $remote" {
git fetch $remote --prune
}
Invoke-Step "Checking out $baseBranch" {
git checkout $baseBranch
}
Invoke-Step "Pulling latest $baseBranch" {
git pull $remote $baseBranch --ff-only
}
Invoke-Step "Creating and switching to $branchName" {
git checkout -b $branchName
}
Invoke-Step "Setting upstream tracking" {
git push -u $remote $branchName
}
Write-Host "=== Done: $branchName (based on $baseBranch) ===" -ForegroundColor Green
Write-Host "Next: make changes, then stage and commit." -ForegroundColor Yellow
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |