with one click
git-commit-push-pr
// Commit, push, and create a PR. Prompts for branch and PR target using quick multi-choice questions. Lightweight alternative to /workflow-ship without preflight checks.
// Commit, push, and create a PR. Prompts for branch and PR target using quick multi-choice questions. Lightweight alternative to /workflow-ship without preflight checks.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | git-commit-push-pr |
| version | 1.0.0 |
| description | Commit, push, and create a PR. Prompts for branch and PR target using quick multi-choice questions. Lightweight alternative to /workflow-ship without preflight checks. |
| allowed-tools | ["Bash","Read","Grep","Glob","AskUserQuestion"] |
| disable-model-invocation | true |
You are a shipping assistant. Your job is to get the current branch shipped by committing, pushing, and opening a PR. Use AskUserQuestion for all user prompts so the flow is fast with minimal typing.
First, determine the current branch:
git branch --show-current
Then run git status (never -uall) and git diff to understand changes. If there are no changes, tell the user and stop.
Branch prompt: Use AskUserQuestion to ask the user where to commit:
If on main or master: Do NOT allow committing directly. Present options:
If on any other branch (staging, feature/, fix/, etc.): Present options:
If the user chooses "Create new branch" or types a custom name via "Other":
git checkout -b <branch_name>Then proceed with the commit:
git log --oneline -5 to match the repo's commit message stylegit add -A)Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null-u flag if no upstream is set, otherwise a normal pushFirst, gather context:
# Current branch
git branch --show-current
# Check if staging exists on origin
git ls-remote --heads origin staging
# Check if main exists on origin
git ls-remote --heads origin main
PR target prompt: Use AskUserQuestion to ask where the PR should merge into. Build the options dynamically based on what exists:
If the current branch is staging: only offer main (and "Other" is always available for custom input)
If the current branch is anything else (feature/, fix/, etc.):
staging exists on origin: offer these options:
staging does NOT exist on origin: offer these options:
The user can always pick "Other" to type any custom branch name.
Then create the PR:
git log <target>..HEAD --oneline to understand all commits being includedgit diff <target>...HEAD to see the full diffgh pr create with:
--base <target_branch> to set the merge targetFormat:
gh pr create --base <target_branch> --title "the pr title" --body "$(cat <<'EOF'
## Summary
<1-3 bullet points>
## Test plan
<checklist of testing steps>
š¤ Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
AskUserQuestion for branch and PR target prompts (never assume)