Git workflow
π§° Opinionated Claude Code starter kit β bootstrap, git, handoff, pre-commit
npx -y skills add dominikwozniak/claude-kit --skill git-workflowAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use for any git operation in this project β commit, push, PR, sync, branch, stash. Reads conventions from CLAUDE.local.md; falls back to defaults. Trigger phrases: "commit", "push", "open PR", "create pull request", "sync with main", "stash my work", "new branch".
SKILL.md
4.5 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
git-workflow
One skill, all git ops. Configurable via CLAUDE.local.md.
Step 0: read project conventions
Before any operation, read CLAUDE.local.md (repo root) if it exists. Look for a ## Git conventions block. Use those values to override the defaults below. Examples of overridable values: commit format, default branch, branch naming, Co-Authored-By inclusion, PR title format.
If no CLAUDE.local.md or no ## Git conventions block, use the defaults documented in each section.
Operations
commit
Defaults:
- Format:
[TICKET-XXX] type: descriptionif current branch matches^[A-Z]+-\d+, elsetype: description - Subject follows Conventional Commits (
feat/fix/refactor/docs/test/chore/perf/ci/build/style/revert) - Subject: imperative, lowercase, no period, β€72 chars
- Body: explain what + why for non-trivial changes; skip for trivial
- NO
Co-Authored-Bytrailer - NO "Generated with Claude Code" or any attribution footer
- One logical change per commit β when session work spans multiple concerns, split
Workflow:
git status --shortβ see all changes- Classify files: session work (created/edited this conversation) vs pre-existing
- Stage session work by name:
git add path1 path2. Nevergit add .orgit add -Aunless explicitly asked - Sensitive files (
.env, credentials, API keys): warn and exclude git diff --stagedβ review- Extract ticket key from branch name:
git branch --show-current | grep -oE '^[A-Z]+-[0-9]+' - Generate subject. If ticket key found, prefix
[KEY] - Commit via heredoc:
git commit -m "$(cat <<'EOF'
[XYZ-123] type: imperative subject
Optional body. What changed and why.
EOF
)"
git log --oneline -1β confirm
push
Defaults:
- Plain
git pushfor regular branches - Block
--force(handled by.claude/hooks/block-dangerous-git.shif installed; otherwise warn and refuse) - Block push to
main/master/developwithout explicit confirmation
Workflow:
- Check current branch:
git branch --show-current - If branch is
main/master/develop, ask for explicit confirmation - Check upstream:
git rev-parse --abbrev-ref @{u} 2>/dev/null - If no upstream,
git push -u origin "$(git branch --show-current)". Elsegit push - Report result
PR (open PR, create pull request)
Defaults:
- Title: same format as commit subject (
[TICKET-XXX] type: description) - Body: summary + test plan from commits since base branch
- NO "Generated with Claude Code" footer
- Created via
gh pr createβ never the web UI
Workflow:
- Push branch first if not pushed (see push section)
- Determine base branch (default from CLAUDE.local.md or
git symbolic-ref --short refs/remotes/origin/HEAD) - Generate body:
## Summary
- <bullet from each commit>
## Test plan
- [ ] <test item>
- [ ] <test item>
- Title format:
[KEY] type: descriptionif ticket present in branch, elsetype: description - Create:
gh pr create --title "..." --body "$(cat <<'EOF'
## Summary
...
## Test plan
...
EOF
)"
- Print PR URL
sync (sync with main, rebase)
Defaults:
- Rebase, not merge
- Refuse if working tree dirty β ask user to commit or stash
Workflow:
git fetch origin
git rebase origin/<default-branch>
If conflicts: report them, do NOT auto-resolve, let user decide.
branch (new branch, switch branch)
Defaults:
- Use
git switch -c(notgit checkout -b) - Branch name: prompt for ticket key + slug if not provided
Workflow:
git switch -c <ticket>-<slug>
# or
git switch -c <ticket>/<slug>
stash (stash my work)
Defaults:
- Always with a message:
git stash push -m "..." - Never bare
git stash
Workflow:
git stash push -m "<short description of what's being saved>"
Notes
- All defaults assume
block-dangerous-git.shhook is installed viabootstrap-workflow. If absent, manually refuse the same patterns (force-push, hard-reset, etc.). - If the project has a PR template at
.github/PULL_REQUEST_TEMPLATE.md, use it as the body skeleton instead of the generic summary/test-plan format above.